X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.vimrc;h=65e88b3988292569fe7382f75aa7e3295609ff9e;hp=a76c6a04f124595da86bd01e0e3b848910e9c658;hb=f557b85709b56b7798276700850afe9ae2b838a5;hpb=2b2cc57a1351e773ec48b7d4cb154b7041d0bd58 diff --git a/.vimrc b/.vimrc index a76c6a0..65e88b3 100644 --- a/.vimrc +++ b/.vimrc @@ -76,12 +76,12 @@ inoremap inoremap " Swap jump keys. -noremap ' ` -noremap ` ' +nnoremap ' ` +nnoremap ` ' " Select previous widnow. -noremap ^ p -noremap p +nnoremap ^ p +nnoremap p "}}}1 " Find stuff. @@ -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.