commit 8786477ea1ab1e9feb443fdc84c3c5c6067f16b2 (patch)
parent 00cf685107f59ba10ab1aa5fc7039a94809e4806
Author: Alexander Karle <akarle@umass.edu>
Date: Sun, 2 Dec 2018 21:04:03 -0500
vim: Fix dir-open mapping to work for empty buffer
It should ideally open the cwd . This requires %:p:h instead of %:h
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vim/vimrc b/vim/vimrc
@@ -240,7 +240,7 @@ nnoremap <leader>D :set background=dark<CR>
nnoremap <expr> <leader>C ToggleColorColumn()
" Quick open current directory of file being edited
-nnoremap <leader>d :e %:h/<CR>
+nnoremap <leader>d :e %:p:h/<CR>
" easier tab switching (good for use w terminal wher gt doesn't work)
nnoremap <C-w>t :tabnext<CR>