Jul. 12, 2011 at 5:11pm with 4 notes
Reblogged from dailyvim
Open The Current Directory
You probably can come up with other creative ways to use
%:p:h
I put this into my .vimrc
autocmd BufEnter * cd %:p:h
That way, Vim automatically changes to the directory of whatever buffer I have open.
Makes it very easy to use :e to open files in the same directory etc.
(Source: vim.wikia.com)