" 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
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()
" Entering Make mode.
fun! MakeMode_map()
- set list
+ call Iain_Vars()
+ let b:iainlist=1
+ call Cycle_List()
+ set ts=8
set noexpandtab
endfun
" Leaving Make mode.
fun! MakeMode_unmap()
- set nolist
+ call Cycle_List()
+ set ts=2
set expandtab
endfun
" Function to create mappings with either a hardcoded \ or <Leader>.
fun! Mapping(keysequence,mapping)
- if version >= "600"
+ if version < "600"
exec "map \\" . a:keysequence . " " . a:mapping
else
exec "map <Leader>" . a:keysequence . " " . a:mapping
let &columns = 164
endif
-" Numbers in blue.
-highlight LineNr term=underline cterm=bold guifg=blue ctermfg=blue
-
" Remember that we are opening the quickfix window.
au BufWinEnter quickfix let g:quickfixing=1
au BufUnload * if &ft == "qf" | let g:quickfixing=0 | endif
+" Allow in-place editing of crontabs.
+au FileType crontab set backupcopy=yes
+
" Make * and # work the way you expect in visual mode.
vnoremap * y/\V<C-R>=substitute(escape(@@,"/\\"),"\n","\\\\n","ge")<CR><CR>
vnoremap # y?\V<C-R>=substitute(escape(@@,"?\\"),"\n","\\\\n","ge")<CR><CR>
" Add "previous tab" mapping as gb.
map gb :tabPrev<CR>
+
+" Perforce.
+let g:p4EnableMenu=1
+let g:p4Presets='P4CONFIG'
endif