vim:keys: Map <leader>gg only with fugitive
This commit is contained in:
@@ -89,8 +89,6 @@ nnoremap <expr> gp '`[' . strpart(getregtype(), 0, 1) . '`]'
|
|||||||
|
|
||||||
" Git bindings
|
" Git bindings
|
||||||
|
|
||||||
nmap <leader>gg :G<CR>
|
|
||||||
|
|
||||||
" Insert a commit's subject behind the SHA1 that the cursor is currently on.
|
" Insert a commit's subject behind the SHA1 that the cursor is currently on.
|
||||||
" Mnemonic: "git reference commit"
|
" Mnemonic: "git reference commit"
|
||||||
" NOTE: This uses `system` and not `:r!` to insert the text directly at the
|
" NOTE: This uses `system` and not `:r!` to insert the text directly at the
|
||||||
@@ -103,6 +101,8 @@ nmap <leader>gs :!git stash -- %<CR>
|
|||||||
nmap <leader>gu :!git checkout -- %<CR>
|
nmap <leader>gu :!git checkout -- %<CR>
|
||||||
|
|
||||||
if exists('g:loaded_fugitive')
|
if exists('g:loaded_fugitive')
|
||||||
|
" Interactive `git status`
|
||||||
|
nmap <leader>gg :G<CR>
|
||||||
" Using fugitive.vim, start a commit and open the message in a new split
|
" Using fugitive.vim, start a commit and open the message in a new split
|
||||||
nmap <leader>gc :G commit<CR>
|
nmap <leader>gc :G commit<CR>
|
||||||
" Move to root of directory
|
" Move to root of directory
|
||||||
|
|||||||
Reference in New Issue
Block a user