nvim: after/ftplugin: diff/git: Allow jumping between sections of diff

Use [c and ]c to jump between sections of diff.
This commit is contained in:
Sanchayan Maity 2021-12-14 12:13:07 +05:30
parent 168e03563d
commit abc00380fc
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1,3 @@
" Jump to sections of diff
nnoremap <buffer> [c ?^@@<CR>
nnoremap <buffer> ]c /^@@<CR>

View file

@ -12,3 +12,7 @@ nnoremap <buffer> <Leader>gR :call git#git_reflog_restore()<CR>
nnoremap <buffer> <expr> <Leader>gn git#git_branch_rename()
nnoremap <buffer> <expr> <Leader>gp git#git_push_commit()
" Jump to sections of diff
nnoremap <buffer> [c ?^@@<CR>
nnoremap <buffer> ]c /^@@<CR>