Open The Current Directory

dailyvim:

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)

  1. dailyvim reblogged this from boncey
  2. boncey reblogged this from dailyvim and added:
    I put this into my .vimrc autocmd BufEnter * cd %:p:h That way, Vim automatically changes
  3. dailyvim posted this