# HG changeset patch # User Steve Losh # Date 1281471561 14400 # Node ID 77c3881753901ec190f38dc0df4b234a0e2e21f2 # Parent 87bb4c33955ce9ba20cc6199d3c931739a2df823 vim: a bunch diff -r 87bb4c33955c -r 77c388175390 .hgrc --- a/.hgrc Fri Aug 06 16:39:34 2010 -0400 +++ b/.hgrc Tue Aug 10 16:19:21 2010 -0400 @@ -126,3 +126,15 @@ show = nlog --color=always -vpr fet = fetch --message 'Automated merge.' + +[merge-tools] +#vimmerge.executable=mvim +#vimmerge.args=--nofork +HgmergeStartup $local $base $other +#vimmerge.priority=1 +#vimmerge.premerge=true +#p4merge.args=$base $local $other $output +#p4merge.gui=True +#p4merge.priority=1 +#p4merge.diffargs=$parent $child +#p4merge.executable=/Applications/p4merge.app/Contents/MacOS/p4merge + diff -r 87bb4c33955c -r 77c388175390 vim/bundle/conf2dif/doc/conf2dif.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/conf2dif/doc/conf2dif.txt Tue Aug 10 16:19:21 2010 -0400 @@ -0,0 +1,39 @@ +*conf2dif.txt* Plugin for resolving CVS conflicts + +This plugin splits a CVS conflict file into three |diff| windows. The 2 +conflicting versions of the file are put on the left and right. The central +window contains the file, with each conflicting area replaced by "=======". + +To begin, either select the "Plugin->CVS Conflict->Resolve" menu item, or issue +the command: > + + :Conflict2Diff + +In the central window, the following buffer specific mappings are created: + + Move to the next conflict + + Move to the previous conflict + + Use the text from the lefthand file for this + conflicting area + + Use the text from the righthand file for this + conflicting area + + Finish by closing the left and righthand windows, + turning off diff and removing the mappings + +The latter 3 have corresponding menu items: + "Use Left", "Use Right" and "Finish". + +These can also be accessed via the commands: > + + :Conflict2DiffGetLeft + :Conflict2DiffGetRight + :Conflict2DiffFinish + +Note: If you begin resolving the conflicts and wish to abandon the changes, +simply finishing will close the right and left hand windows, leaving the file +with just "=======" for each conflict. You will then need to |undo| to get +back to the original state. diff -r 87bb4c33955c -r 77c388175390 vim/bundle/conf2dif/plugin/conf2dif.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/conf2dif/plugin/conf2dif.vim Tue Aug 10 16:19:21 2010 -0400 @@ -0,0 +1,168 @@ +" Plugin to turn a CVS conflict file into a set of diff'ed files +" with mappings to simplify the merging +" +" Version: 1.1 +" Last Changed: 07 Jul 2003 +" +" Maintainer: Chris Rimmer + +let s:save_cpo = &cpo +set cpo&vim + +if exists("loaded_conf2dif") + finish +endif + +let s:starts = "<<<<<<<" +let s:middle = "=======" +let s:ends = ">>>>>>>" + +let s:conf2dif_orig = "" + +function s:FilterConf(which) range + let switch = 1 + let linenum = a:firstline + let lastline = a:lastline + let s:conflict = 0 + while linenum <= lastline + execute linenum + let line = getline(".") + + let newline = "" + if line =~ "^".s:starts + let switch = (a:which == 0) + let s:conflict = 1 + elseif line =~ "^".s:middle + let switch = (a:which == 1) + let s:conflict = 1 + elseif line =~ "^".s:ends + let s:conflict = 1 + let switch = 1 + if a:which == 2 + let newline = s:middle + endif + else + let newline = line + endif + + if (newline == "" && line != "") || switch == 0 + normal dd + let lastline = lastline - 1 + else + if newline != line + call setline(".", newline) + endif + let linenum = linenum + 1 + endif + endwhile +endfunction + +function s:NewBuffer(which) + vnew + setlocal noswapfile + normal "ap + execute 0 + normal dd + %call s:FilterConf(a:which) + diffthis + setlocal nomodifiable + setlocal buftype=nowrite + setlocal bufhidden=delete +endfunction + +function s:GotoOriginal() + execute bufwinnr(s:conf2dif_orig)."wincmd W" +endfunction + +function s:GetLeft() + if bufnr("%") != s:conf2dif_orig + return + endif + execute "diffget ".s:conf2dif_left + diffupdate +endfunction + +function s:GetRight() + if bufnr("%") != s:conf2dif_orig + return + endif + call s:GotoOriginal() + execute "diffget ".s:conf2dif_right + diffupdate +endfunction + +function s:Finish() + if s:conf2dif_orig == "" + return + endif + call s:GotoOriginal() + set nodiff + set foldcolumn=0 + nmapclear + execute "bunload ".s:conf2dif_left + execute "bunload ".s:conf2dif_right + let s:conf2dif_orig = "" + call s:MenusBefore() +endfunction + +function s:Conflict2Diff() + if s:conf2dif_orig != "" + return + endif + let s:conf2dif_orig = bufnr("%") + let temp_a = @a + %yank a + %call s:FilterConf(2) + if s:conflict == 0 + execute 0 + echoerr "This doesn't seem to be a CVS Conflict File!" + let s:conf2dif_orig = "" + return + endif + set nosplitright + call s:NewBuffer(0) + let s:conf2dif_left = bufnr("%") + call s:GotoOriginal() + set splitright + call s:NewBuffer(1) + let s:conf2dif_right = bufnr("%") + call s:GotoOriginal() + diffthis + execute 0 + nmap :Conflict2DiffGetLeft + nmap :Conflict2DiffGetRight + nmap [cz. + nmap ]cz. + nmap :Conflict2DiffFinish + call s:MenusDuring() + normal ]c + let @a = temp_a +endfunction + +function s:MenusBefore() + nmenu enable Plugin.CVS\ Conflict.Resolve + nmenu disable Plugin.CVS\ Conflict.Use\ Left + nmenu disable Plugin.CVS\ Conflict.Use\ Right + nmenu disable Plugin.CVS\ Conflict.Finish +endfunction + +function s:MenusDuring() + nmenu disable Plugin.CVS\ Conflict.Resolve + nmenu enable Plugin.CVS\ Conflict.Use\ Left + nmenu enable Plugin.CVS\ Conflict.Use\ Right + nmenu enable Plugin.CVS\ Conflict.Finish +endfunction + +command Conflict2Diff :call s:Conflict2Diff() +command Conflict2DiffGetLeft :call s:GetLeft() +command Conflict2DiffGetRight :call s:GetRight() +command Conflict2DiffFinish :call s:Finish() + +nmenu Plugin.CVS\ Conflict.Resolve :Conflict2Diff +nmenu Plugin.CVS\ Conflict.Use\ Left :Conflict2DiffGetLeft +nmenu Plugin.CVS\ Conflict.Use\ Right :Conflict2DiffGetRight +nmenu Plugin.CVS\ Conflict.Finish :Conflict2DiffFinish + +call s:MenusBefore() + +let &cpo = s:save_cpo diff -r 87bb4c33955c -r 77c388175390 vim/bundle/gundo/plugin/gundo.vim --- a/vim/bundle/gundo/plugin/gundo.vim Fri Aug 06 16:39:34 2010 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -" if exists('loaded_gundo') -" finish -" endif -" let loaded_gundo = 1 - -if !hasmapto('Gundo') - map u GundoShowGraph -endif - -noremap