diff options
Diffstat (limited to 'vim/init/keymaps.vim')
-rw-r--r-- | vim/init/keymaps.vim | 10 |
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 | ||
48 | let g:last_path = execute("pwd") | 48 | let g:last_path = execute("pwd") |
49 | augroup SaveLatestDir | 49 | if has('nvim') |
50 | au! | 50 | augroup SaveLatestDir |
51 | autocmd DirChangedPre * let g:last_path = split(execute('pwd'), "\n")[0] | 51 | au! |
52 | augroup END | 52 | autocmd DirChangedPre * let g:last_path = split(execute('pwd'), "\n")[0] |
53 | augroup END | ||
54 | endif | ||
53 | 55 | ||
54 | " Switch CWD to the directory of the open buffer | 56 | " Switch CWD to the directory of the open buffer |
55 | nnoremap cd :cd %:p:h<CR>:pwd<CR> | 57 | nnoremap cd :cd %:p:h<CR>:pwd<CR> |