My .vimrc includes the following lines:
if filereadable("my_source")
:source my_source
endif
That is, if the file 'my_source' exists in the folder where I open vim and it is readable, it is loaded automatically.
However, if I am editing a file in that folder and open another file (also in that same folder) via :tabe, the source file 'my_source' is not loaded in the latter. Why? How can I have it automatically loaded when I open a new tab?
Error detected while processing BufRead Auto commands for "*": E15: Invalid expression: filereadable('my_source') source my_source endif– Godoy Jul 21 '18 at 05:58ifsyntax is a bit...particular in an autocmd statement. I've edited the answer. – ZeroKnight Jul 21 '18 at 07:55