nvim: Move key mappings for fzf & gitgutter to after/plugin

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2020-06-26 19:30:15 +05:30
parent 0c8f59bcec
commit a649021325
3 changed files with 33 additions and 34 deletions

View file

@ -0,0 +1,22 @@
nnoremap <Leader>b :Buffers<CR>
nnoremap <Leader>/ :GFiles?<CR>
nnoremap <Leader>ff :GFiles<CR>
nnoremap <Leader>fF :Files<CR>
nnoremap <Leader>fL :Lines<CR>
nnoremap <Leader>fl :BLines<CR>
nnoremap <Leader>ft :exe ':Tags ' . expand('<cword>')<CR>
nnoremap <Leader>fT :Tags<SPACE>
nnoremap <Leader>fc :BCommits<CR>
nnoremap <Leader>fC :Commits<CR>
nnoremap <Leader>fh :History:<CR>
nnoremap <Leader>fH :History/<CR>
nnoremap <Leader>fm :Commands<CR>
nnoremap <Leader>fo :Locate<SPACE>
nnoremap <Leader>fk :Maps<CR>
nnoremap <Leader>f/ :Rg<CR>
nnoremap <Leader>fs :exe ':Rg ' . expand('<cword>')<CR>
imap <C-x><C-w> <Plug>(fzf-complete-word)
imap <C-x><C-p> <Plug>(fzf-complete-path)
imap <C-x><C-f> <Plug>(fzf-complete-file)
imap <C-x><C-l> <Plug>(fzf-complete-line)

View file

@ -0,0 +1,11 @@
nnoremap ]c :GitGutterNextHunk<CR>
nnoremap [c :GitGutterPrevHunk<CR>
nnoremap ghs :GitGutterStageHunk<CR>
nnoremap ghu :GitGutterUndoHunk<CR>
nnoremap ghp :GitGutterPreviewHunk<CR>
nnoremap ghq :GitGutterQuickFix<CR>
nnoremap ghf :GitGutterFold<CR>
omap ih <Plug>(GitGutterTextObjectInnerPending)
omap ah <Plug>(GitGutterTextObjectOuterPending)
xmap ih <Plug>(GitGutterTextObjectInnerVisual)
xmap ah <Plug>(GitGutterTextObjectOuterVisual)

View file

@ -11,28 +11,6 @@ nnoremap Q <Nop>
nnoremap <LocalLeader>b :Make<CR> nnoremap <LocalLeader>b :Make<CR>
nnoremap <LocalLeader>B :LMake<CR> nnoremap <LocalLeader>B :LMake<CR>
" For Fuzzy
nnoremap <Leader>b :Buffers<CR>
nnoremap <Leader>/ :GFiles?<CR>
nnoremap <Leader>ff :GFiles<CR>
nnoremap <Leader>fF :Files<CR>
nnoremap <Leader>fL :Lines<CR>
nnoremap <Leader>fl :BLines<CR>
nnoremap <Leader>ft :exe ':Tags ' . expand('<cword>')<CR>
nnoremap <Leader>fT :Tags<SPACE>
nnoremap <Leader>fc :BCommits<CR>
nnoremap <Leader>fC :Commits<CR>
nnoremap <Leader>fh :History:<CR>
nnoremap <Leader>fH :History/<CR>
nnoremap <Leader>fm :Commands<CR>
nnoremap <Leader>fo :Locate<SPACE>
nnoremap <Leader>fk :Maps<CR>
nnoremap <Leader>f/ :Rg<CR>
nnoremap <Leader>fs :exe ':Rg ' . expand('<cword>')<CR>
imap <C-x><C-w> <Plug>(fzf-complete-word)
imap <C-x><C-p> <Plug>(fzf-complete-path)
imap <C-x><C-f> <Plug>(fzf-complete-file)
imap <C-x><C-l> <Plug>(fzf-complete-line)
" Save " Save
nnoremap <Leader>w <Esc>:w<CR> nnoremap <Leader>w <Esc>:w<CR>
" Search and Replace " Search and Replace
@ -59,18 +37,6 @@ nnoremap ]t :tNext<CR>
nnoremap [T :tfirst<CR> nnoremap [T :tfirst<CR>
nnoremap ]T :tlast<CR> nnoremap ]T :tlast<CR>
nnoremap <Leader>ts :exec("tselect ".expand("<cword>"))<CR> nnoremap <Leader>ts :exec("tselect ".expand("<cword>"))<CR>
" For git
nnoremap ]c :GitGutterNextHunk<CR>
nnoremap [c :GitGutterPrevHunk<CR>
nnoremap ghs :GitGutterStageHunk<CR>
nnoremap ghu :GitGutterUndoHunk<CR>
nnoremap ghp :GitGutterPreviewHunk<CR>
nnoremap ghq :GitGutterQuickFix<CR>
nnoremap ghf :GitGutterFold<CR>
omap ih <Plug>(GitGutterTextObjectInnerPending)
omap ah <Plug>(GitGutterTextObjectOuterPending)
xmap ih <Plug>(GitGutterTextObjectInnerVisual)
xmap ah <Plug>(GitGutterTextObjectOuterVisual)
" For workspace " For workspace
nnoremap <Leader>ps :ToggleWorkspace<CR> nnoremap <Leader>ps :ToggleWorkspace<CR>
" Quickfix & Location list mappings " Quickfix & Location list mappings