diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-22 22:31:27 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-22 22:31:27 +1200 |
commit | ee573778521c6e9af919d60861bc519e7538193d (patch) | |
tree | 3350fadc3177475aaa29d0bd6239f0115d24102b /vim/after/ftplugin/diff.vim | |
parent | Turn 'hidden' on for a bit (diff) | |
download | dotfiles-ee573778521c6e9af919d60861bc519e7538193d.tar.gz dotfiles-ee573778521c6e9af919d60861bc519e7538193d.zip |
Add Vim mappings for normal {,} in diff buffers
Diffstat (limited to 'vim/after/ftplugin/diff.vim')
-rw-r--r-- | vim/after/ftplugin/diff.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vim/after/ftplugin/diff.vim b/vim/after/ftplugin/diff.vim index 1e2bb2f8..109b5b49 100644 --- a/vim/after/ftplugin/diff.vim +++ b/vim/after/ftplugin/diff.vim @@ -8,6 +8,12 @@ if exists('g:no_plugin_maps') || exists('g:no_diff_maps') finish endif +" Modify curly braces to navigate by diff block +nnoremap <buffer> { ?^@@<CR> +nnoremap <buffer> } /^@@<CR> +let b:undo_ftplugin .= '|nunmap <buffer> {' + \ . '|nunmap <buffer> }' + " Set mappings nmap <buffer> <LocalLeader>p <Plug>(DiffPrune) xmap <buffer> <LocalLeader>p <Plug>(DiffPrune) |