aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/init
diff options
context:
space:
mode:
Diffstat (limited to 'vim/init')
-rw-r--r--vim/init/basic.vim4
-rw-r--r--vim/init/keymaps.vim7
2 files changed, 7 insertions, 4 deletions
diff --git a/vim/init/basic.vim b/vim/init/basic.vim
index 945c134..cdb5210 100644
--- a/vim/init/basic.vim
+++ b/vim/init/basic.vim
@@ -108,7 +108,7 @@ function! ToggleQuit()
108 echo message 108 echo message
109endfunction 109endfunction
110 110
111nnoremap gl :call ToggleQuit()<CR> 111nnoremap <leader><leader>gl :call ToggleQuit()<CR>
112 112
113" Simply exit when closing the last buffer 113" Simply exit when closing the last buffer
114 114
@@ -117,7 +117,7 @@ function! Bye()
117 if g:quitVimWhenPressingCtrlC 117 if g:quitVimWhenPressingCtrlC
118 :silent! quit 118 :silent! quit
119 else 119 else
120 :echo "Press gl to allow quit with <C-c>" 120 :echo "Press <leader><leader>gl to allow quit with <C-c>"
121 endif 121 endif
122 else 122 else
123 :bdelete 123 :bdelete
diff --git a/vim/init/keymaps.vim b/vim/init/keymaps.vim
index 26a3787..048b737 100644
--- a/vim/init/keymaps.vim
+++ b/vim/init/keymaps.vim
@@ -83,10 +83,13 @@ vnoremap <leader>, :terminal<CR>
83" Toggle paste mode on and off 83" Toggle paste mode on and off
84map <leader>pp :setlocal paste!<CR> 84map <leader>pp :setlocal paste!<CR>
85 85
86" Switch CDW to root git directory
87nnoremap cdg :execute 'cd' fnameescape(fnamemodify(finddir('.git', escape(expand('%:p:h'), ' ') . ';'), ':h'))<CR>:pwd<CR>
88" Switch CWD to the directory of the open buffer 86" Switch CWD to the directory of the open buffer
89nnoremap cd :cd %:p:h<CR>:pwd<CR> 87nnoremap cd :cd %:p:h<CR>:pwd<CR>
88" Switch CDW to root git directory
89nnoremap cdg :execute 'cd' fnameescape(fnamemodify(finddir('.git', escape(expand('%:p:h'), ' ') . ';'), ':h'))<CR>:pwd<CR>
90" alias for cd
91nnoremap cd.. :cd .. <CR>:pwd<CR>
92nnoremap cd... :cd ../.. <CR>:pwd<CR>
90 93
91" Move one line up and down 94" Move one line up and down
92nnoremap <C-j> ddp 95nnoremap <C-j> ddp