aboutsummaryrefslogtreecommitdiffstats
path: root/bundle/unimpaired-vcs-conflict-movement/plugin
diff options
context:
space:
mode:
authorTeddy Wing2015-02-09 18:59:38 -0500
committerTeddy Wing2015-02-09 18:59:38 -0500
commitc73c88e24c819e1ad92496723096ea5539b2c826 (patch)
treefbe0ccdf450b60f5b13dfcea9bb09abba70e23b7 /bundle/unimpaired-vcs-conflict-movement/plugin
parent38f62e3054c5005c5408957f939a16ce696dc53d (diff)
downloaddotvim-c73c88e24c819e1ad92496723096ea5539b2c826.tar.bz2
Add vim-unimpaired merge conflict movements
Grab the movement commands `[n` and `]n` to move between merge conflict markers. Makes it easier to get around when fixing conflicts in vimdiff. Copied from Tim Pope's vim-unimpaired plugin.
Diffstat (limited to 'bundle/unimpaired-vcs-conflict-movement/plugin')
-rw-r--r--bundle/unimpaired-vcs-conflict-movement/plugin/unimpaired_vcs_conflict_movement.vim22
1 files changed, 22 insertions, 0 deletions
diff --git a/bundle/unimpaired-vcs-conflict-movement/plugin/unimpaired_vcs_conflict_movement.vim b/bundle/unimpaired-vcs-conflict-movement/plugin/unimpaired_vcs_conflict_movement.vim
new file mode 100644
index 0000000..8ce033e
--- /dev/null
+++ b/bundle/unimpaired-vcs-conflict-movement/plugin/unimpaired_vcs_conflict_movement.vim
@@ -0,0 +1,22 @@
+" Unimpaired VCS Conflict Movement
+" Merge conflict movement helper copied from Tim Pope's unimpaired.vim
+" Copied directly from
+" https://github.com/tpope/vim-unimpaired/blob/3548479cc154154cbdbb6737ca08a47937cc7113/plugin/unimpaired.vim#L102-L144
+"
+" I didn't want the full Unimpaired plugin, so just copying this part for now
+" because it's something I've wanted for a while.
+"
+" Note that this file should not be considered to have the same license as the
+" rest of the repo. As the code was copied wholesale from unimpaired.vim, this
+" file retains the license from the plugin as of 2015.02.09, namely the Vim
+" license.
+
+nmap [n <Plug>unimpairedContextPrevious
+nmap ]n <Plug>unimpairedContextNext
+omap [n <Plug>unimpairedContextPrevious
+omap ]n <Plug>unimpairedContextNext
+
+nnoremap <silent> <Plug>unimpairedContextPrevious :call unimpaired_vcs_conflict_movement#Context(1)<CR>
+nnoremap <silent> <Plug>unimpairedContextNext :call unimpaired_vcs_conflict_movement#Context(0)<CR>
+onoremap <silent> <Plug>unimpairedContextPrevious :call unimpaired_vcs_conflict_movement#ContextMotion(1)<CR>
+onoremap <silent> <Plug>unimpairedContextNext :call unimpaired_vcs_conflict_movement#ContextMotion(0)<CR>