From: Iain Patterson Date: Thu, 23 Jan 2014 15:21:56 +0000 (+0000) Subject: Mappings for gundo plugin. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;ds=inline;h=4f6b65d65700e85c4052487b482f8c448b929e1c;p=profile.git Mappings for gundo plugin. Toggle gundo window with \g. Press r in the gundo window to fake reloading it by calling GundoToggle() twice in succession. --- diff --git a/.vimrc b/.vimrc index a76c6a0..0bb5efb 100644 --- a/.vimrc +++ b/.vimrc @@ -1339,6 +1339,9 @@ 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():") + " Use a persistent undo file if it exists. fun! Check_Undo() "{{{2 if filereadable(undofile(expand("%"))) @@ -1414,6 +1417,12 @@ if has("autocmd") au Display WinEnter * if &diff | se cursorbind | endif endif endif + +" Mapping to reload the gundo window. +if has("autocmd") + au Mode BufEnter * if &ft == "gundo" | try | nnoremap r :call gundo#GundoToggle():call gundo#GundoToggle() | catch | endtry | endif +endif + endif "}}}1 " Resize after startup.