I would like to be able to access the current working directory in my vimrc.
For example, I can access the current file by using %.
Specifically,
I have the following line in my vimrc:
map ,l :!latex %
When it runs everything works fine, except the resulting dvi and other files are stored in my home directory instead of my current working directory.
Any suggestions?
See
:help autochdir. Vim can automatically change the current working directory to the directory where the file you are editing lives.Otherwise, if you want to do this manually, see
:help cdand:help lcd.