Comment on Vim Splits – Move Faster and More NaturallyComments−indrekju13y" Edit another file in the same directory as the current file" uses expression to extract path from current file's pathmap <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>
Comments
" 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>