Edit a file in the current file's directory

1 Point

Rom Grk Rom Grk

8 years ago

Opens the command line with the directory of the current file already typed. The final <C-D> is optional, but it lists the content of the directory as well.

nnoremap <C-n> :edit <C-R>=expand("%:p:h")<CR>/<C-D>