" antirez's .vimrc " Copyright(C) 2001 Salvatore Sanfilippo " Enable the syntax highlight mode if available syntax sync fromstart if has("syntax") syntax sync fromstart syntax on set background=dark let php_sync_method="0" highlight SpellBad ctermfg=red ctermbg=black term=Underline endif " Put the current date in insert mode imap :r! datekJ$a imap :r ~/SVC/HEADER imap :bn imap :bp imap :syntax sync fromstart map :syntax sync fromstart map :bn map :bp map 4 $ vmap q >gv set softtabstop=4 set shiftwidth=4 set expandtab " highlight matches with last search pattern " set hls set incsearch " incremental search set ignorecase " ignore the case set smartcase " don't ignore the case if the pattern is uppercase "set laststatus=2 " show the status bar even with one buffer set ruler " show cursor position set showmode " show the current mode "set showmatch " show the matching ( for the last ) set viminfo=%,'50,\"100,:100,n~/.viminfo "info to save accross sessions set autoindent set backspace=2 normal mz " abbreviations iab pallang X-MAILGW-Newsgroups: iab CHDR 1G:r ~/SVC/HEADER1Gdd iab tclfile #/bin/sh \# the next line restarts using tclsh \exec tclsh "$0" "$@"# vim: set filetype=tcl softtabstop=4 shiftwidth=4 " change filetypes for common files augroup filetypedetect au BufNewFile,BufRead *.tcl set filetype=tcl softtabstop=4 shiftwidth=4 au BufNewFile,BufRead *.tk set filetype=tcl softtabstop=4 shiftwidth=4 au BufNewFile,BufRead *.md set filetype=markdown softtabstop=4 shiftwidth=4 augroup END " When open a new file remember the cursor position of the last editing if has("autocmd") " When editing a file, always jump to the last cursor position autocmd BufReadPost * if line("'\"") | exe "'\"" | endif endif " Colors " :hi Comment term=bold ctermfg=Cyan ctermfg=#80a0ff " Macro :nmap ;; :w! /tmp/tcltmp100.tcl:!tclsh /tmp/tcltmp100.tcl " Vim 7.0 stuff let loaded_matchparen = 1 " Avoid the loading of match paren plugin :filetype plugin on " :source /usr/share/vim/vim72/macros/matchit.vim " highlight OverLength ctermbg=red ctermfg=white ctermbg=#592929 " match OverLength /\%81v.*/ " Status Line set laststatus=2 hi User1 ctermfg=green ctermbg=black hi User2 ctermfg=yellow ctermbg=black hi User3 ctermfg=red ctermbg=black hi User4 ctermfg=blue ctermbg=black hi User5 ctermfg=white ctermbg=black set statusline= set statusline +=%1*\ %n\ %* "buffer number set statusline +=%5*%{&ff}%* "file format set statusline +=%3*%y%* "file type set statusline +=%4*\ %<%F%* "full path set statusline +=%2*%m%* "modified flag set statusline +=%1*%=%5l%* "current line set statusline +=%2*/%L%* "total lines set statusline +=%1*%4v\ %* "virtual column number set statusline +=%2*0x%04B\ %* "character under cursor