X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.vimrc;h=62bd8d7b29f93546b56c8014272d93b6c1146aa2;hp=48a2cf2530cfd0f2dd8d3b56d1071c6337067af2;hb=99b914fe2b1ef8c4d063b636cd46cc3ffdfd6c3f;hpb=9b031e4cfec3afab6531b784af528a3eb083b8e2 diff --git a/.vimrc b/.vimrc index 48a2cf2..62bd8d7 100644 --- a/.vimrc +++ b/.vimrc @@ -101,6 +101,9 @@ se t_WS=[8;%p1%d;%p2%dt " Highlight search results. se hlsearch +" Set graphical window title. +se titlestring=%{Show_TitleString()} + " Syntax highlighting. New versions will use syn enable instead. if version < 600 syn on @@ -174,6 +177,16 @@ fun! Show_Paste() endif endfun +" Show the window title. +fun! Show_TitleString() + if bufname("") == "" + let ts1='Vim' + else + let ts1=printf("%s [%2d:%s]", expand('%t'), bufnr(""), expand('%f')) + endif + return printf("%s (%s) %s", ts1, getcwd(), v:servername) +endfun + " Show the status line. fun! Show_StatusLine() call Iain_Vars() @@ -224,7 +237,7 @@ call Show_StatusLine() " Function to create mappings with either a hardcoded \ or . fun! Mapping(keysequence,mapping) - if version >= "600" + if version < "600" exec "map \\" . a:keysequence . " " . a:mapping else exec "map " . a:keysequence . " " . a:mapping @@ -442,4 +455,8 @@ se numberwidth=5 " Add "previous tab" mapping as gb. map gb :tabPrev + +" Perforce. +let g:p4EnableMenu=1 +let g:p4Presets='P4CONFIG' endif