X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.vimrc;h=a72c2dcf7297427d722b3affa0c9a0bd6d050b77;hp=6e561c6e8db6ac86c4ffbe5d37d0b78a8e6e33c7;hb=edf8df9b6f669de383f8763daf87af730c22536a;hpb=0e802cdc4141d6d20356c83ac14207ff747aaed1 diff --git a/.vimrc b/.vimrc index 6e561c6..a72c2dc 100644 --- a/.vimrc +++ b/.vimrc @@ -737,7 +737,7 @@ fun! Show_List() "{{{2 elseif Has_Unicode() if w:iainlist == 1 " Just tabs. - return "»" + return "⇥" else " Full list. return "¶" @@ -773,7 +773,15 @@ endfun "}}}2 " Helper for status line. " Show the size of the tabstop. fun! Show_Tabstop() "{{{2 - return &ts + if &et + return &ts + else + if Has_Unicode() + return &ts . "↹" + else + return &ts . "\\" + fi + endif endfun "}}}2 " Helper for status line. @@ -1193,7 +1201,7 @@ endfun "}}}2 fun! Cycle_List() "{{{2 " Pretty UTF-8 listchars. if Has_Unicode() - let basic='tab:»·,trail:…,extends:«,precedes:»' + let basic='tab:⇥·,trail:…,extends:«,precedes:»' let eol='eol:¶' if version >= "700" let basic=basic . ',nbsp:•' @@ -1256,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 @@ -1335,7 +1343,15 @@ endfun "}}}2 " Tab line. fun! Show_TabLine() "{{{2 - let l:s = "%#TabLineFill#Tabs:" + let l:colwidth = &numberwidth + if g:marksigns + let l:colwidth += 2 + endif + if &diff == 1 + let l:colwidth += 2 + endif + let l:fmt = printf("%%s%% %ds", l:colwidth) + let l:s = printf(l:fmt, "%#TabLineFill#", "Tabs ") let l:i = 0 while l:i < tabpagenr("$") @@ -1540,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