Gallery2:VIM Editor Settings - Gallery Codex
Personal tools

Gallery2:VIM Editor Settings

From Gallery Codex

" Enable syntax highlighting
if has("syntax")
  syntax on
  hi! Comment  term=bold  ctermfg=cyan  guifg=Blue
  hi normal guibg=black
endif

" Set PHP file extensions
au BufNewFile,BufRead *.php,*.class,*.inc              setf php

" Enable C-Indenting and set options
au FileType php         set cin   sw=4 ts=8 sts=4 sr tw=100
set cinoptions=>s,e0,n0,f0,{0,}0,^0,:0,=s,l1,g0,hs,ps,ts,+s,c3,C0,(2s,us,\U0,w0,m0,j0,)20,*30
set cinkeys=0{,0},0),:,0#,!^F,o,O,e,*;,*<Return>

" Set PHP options
:let php_sql_query = 1
:let php_htmlInStrings = 1
:let php_baselib = 1
:let php_asp_tags = 0
:let php_parent_error_close = 1
:let php_parent_error_open = 1
:let php_noShortTags = 1
:let php_folding = 0
:let php_sync_method = 0

" Highlight chars that go over the 100-column limit
:highlight OverLength ctermbg=red ctermfg=white guibg=red guifg=white
:match OverLength '\%101v.*'

" Turns ] into the "match brace" char.
nmap ] %