X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.vimrc;h=a72c2dcf7297427d722b3affa0c9a0bd6d050b77;hb=f5b8391f53a507d628509bcb0ff54c16dc275c0a;hp=c4b2131f63695494fc9d158bdb660d5e0b385ca4;hpb=133454752bb2482551a770ff3762ff3d009073c4;p=profile.git diff --git a/.vimrc b/.vimrc index c4b2131..a72c2dc 100644 --- a/.vimrc +++ b/.vimrc @@ -1264,7 +1264,7 @@ fun! Cycle_Alt() "{{{2 call Iain_Vars() let b:iainalt = ! b:iainalt call Show_StatusLine() -endfun "{{{2 +endfun "}}}2 " To be overridden later if applicable. fun! Extra_Whitespace_Match() "{{{2 @@ -1556,8 +1556,27 @@ call Mapping("u", ":call Cycle_Undo()") " Remove persistent undo file with \U. call Mapping("U", ":call Clear_Undo()") -" Toggle gundo window with \g. -call Mapping("g", ":call gundo#GundoToggle()") +" Toggle Undotree window with \g. +call Mapping("g", ":UndotreeToggle") +" Switch to Undotree window with \G. +call Mapping("g", ":UndotreeToggle") +" Undotree gets focus. +let g:undotree_SetFocusWhenToggle=1 +" Undotree uses context diff. +let g:undotree_DiffCommand="diff -u" +" Undotree bullet. +if Has_Unicode() + let g:undotree_TreeNodeShape="•" +endif +" Undotree bindings emulate Gundo. +fun! g:Undotree_CustomMap() "{{{2 + nmap k UndotreeGoNextState + nmap j UndotreeGoPreviousState + nmap K UndotreeGoNextSaved + nmap J UndotreeGoPreviousSaved + nmap UndotreeFocusTarget +endfun "}}}2 + " Use a persistent undo file if it exists. fun! Check_Undo() "{{{2