by wahnfrieden · 13y ago · 0 comments
cabbr <expr> %% expand('%:p:h')
You could also use :. instead of :p to get the relative path, see :help c_% and :help filename_modifiers map <leader>e :e <C-r>=expand("%:p:h") . "/" <cr>
you can make one that splits: map <leader>v :vs <C-r>=expand("%:p:h") . "/" <cr>