diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-07-05 13:38:44 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-07-05 13:38:44 +0800 |
commit | b2c650c9c3a5cb67a642eb97c226072b0f4174a6 (patch) | |
tree | 667564ac712c7f84f36a74d52dcf70b003f1848d /vim/init/keymaps.vim | |
parent | 99f1573ba9083eb1d4c92d6e415824cc2d39ee79 (diff) |
Update
Diffstat (limited to 'vim/init/keymaps.vim')
-rw-r--r-- | vim/init/keymaps.vim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vim/init/keymaps.vim b/vim/init/keymaps.vim index 345ebb2..9128b8d 100644 --- a/vim/init/keymaps.vim +++ b/vim/init/keymaps.vim | |||
@@ -80,8 +80,9 @@ map <leader>pp :setlocal paste!<CR> | |||
80 | 80 | ||
81 | " Switch CWD to the directory of the open buffer | 81 | " Switch CWD to the directory of the open buffer |
82 | nnoremap cd :cd %:p:h<CR>:pwd<CR> | 82 | nnoremap cd :cd %:p:h<CR>:pwd<CR> |
83 | " Switch CDW to root git directory | 83 | " Switch CWD to root git directory |
84 | nnoremap cdg :execute 'cd' fnameescape(fnamemodify(finddir('.git', escape(expand('%:p:h'), ' ') . ';'), ':h'))<CR>:pwd<CR> | 84 | nnoremap cdg :execute 'cd' fnameescape(fnamemodify(finddir('.git', escape(expand('%:p:h'), ' ') . ';'), ':h'))<CR>:pwd<CR> |
85 | |||
85 | " alias for cd | 86 | " alias for cd |
86 | nnoremap cdd :cd<space> | 87 | nnoremap cdd :cd<space> |
87 | nnoremap cd.. :cd .. <CR>:pwd<CR> | 88 | nnoremap cd.. :cd .. <CR>:pwd<CR> |