aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/init/keymaps.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/init/keymaps.vim')
-rw-r--r--vim/init/keymaps.vim10
1 files changed, 6 insertions, 4 deletions
diff --git a/vim/init/keymaps.vim b/vim/init/keymaps.vim
index bf3d7ab..2d58fe9 100644
--- a/vim/init/keymaps.vim
+++ b/vim/init/keymaps.vim
@@ -46,10 +46,12 @@ nnoremap q: :
46" WORKING_DIR {{{ 46" WORKING_DIR {{{
47 47
48let g:last_path = execute("pwd") 48let g:last_path = execute("pwd")
49augroup SaveLatestDir 49if has('nvim')
50 au! 50 augroup SaveLatestDir
51 autocmd DirChangedPre * let g:last_path = split(execute('pwd'), "\n")[0] 51 au!
52augroup END 52 autocmd DirChangedPre * let g:last_path = split(execute('pwd'), "\n")[0]
53 augroup END
54endif
53 55
54" Switch CWD to the directory of the open buffer 56" Switch CWD to the directory of the open buffer
55nnoremap cd :cd %:p:h<CR>:pwd<CR> 57nnoremap cd :cd %:p:h<CR>:pwd<CR>