News for hackers. Stuff that matters.
Re:Vim Splits – Move Faster and More Naturally by indrekju on Thursday April 18, 2013 @01:06PM (#5571745)
" Edit another file in the same directory as the current file

" uses expression to extract path from current file's path

map <leader>e :e <C-R>=expand("%:p:h") . '/'<CR><C-M>

map <leader>s :split <C-R>=expand("%:p:h") . '/'<CR><C-M>

map <leader>v :vnew <C-R>=expand("%:p:h") . '/'<CR><C-M>

There are no comments on this comment yet.