Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
docs:vim:vimrc [2010/07/09 10:50] – billh | docs:vim:vimrc [2011/12/16 10:24] (current) – [my .vimrc] fixed bug where browse listing was lost and a file was sometimes showing in place on that tab billh | ||
---|---|---|---|
Line 85: | Line 85: | ||
set gfn=Courier_New: | set gfn=Courier_New: | ||
- | | + | " gui font (Mac) |
- | if has(" | + | if has(" |
- | set gfn=Monaco: | + | set gfn=Monaco: |
- | endif | + | elseif has(" |
+ | "set gfn=Courier_New: | ||
+ | set gfn=Courier_New: | ||
+ | elseif has(" | ||
+ | set gfn=Courier\ New\ 12 | ||
+ | endif | ||
else | else | ||
Line 166: | Line 171: | ||
" // commenting/ | " // commenting/ | ||
- | map g/ :s/^\([ \t]*\)/ | + | map g/ :s/^\([ \t]*\)/ |
- | map g? :s/^\([ \t]*\)\/\/ \{0,1}\([ \t]*\)/ | + | map g? :s/^\([ \t]*\)\/\/ \{0,1}\([ \t]*\)/ |
" use , and . to shift indent and keep selection | " use , and . to shift indent and keep selection | ||
Line 296: | Line 301: | ||
" default of sorting specific file types before others | " default of sorting specific file types before others | ||
let g: | let g: | ||
+ | |||
+ | " case-insensitive sorting in netrw | ||
+ | let g: | ||
" always change current (local) directory to directory of current buffer | " always change current (local) directory to directory of current buffer | ||
" http:// | " http:// | ||
- | if exists(' | + | autocmd BufEnter * silent! lcd %:p:h:gs/ /\\ / |
- | set autochdir | + | |
- | else | + | |
- | | + | |
- | endif | + | |
" make diff colors more like winmerge | " make diff colors more like winmerge | ||
Line 404: | Line 408: | ||
folddoc :d | folddoc :d | ||
endfunction | endfunction | ||
+ | |||
+ | " we need to override the default php indenting for heredoc to always put the | ||
+ | " first line at the far left margin | ||
+ | function! MyGetPhpIndent() | ||
+ | if v:lnum > 1 && getline(v: | ||
+ | return 0 | ||
+ | else | ||
+ | return GetPhpIndent() | ||
+ | endif | ||
+ | endfunction | ||
+ | autocmd BufReadPost *.php setlocal indentexpr=MyGetPhpIndent() | ||
</ | </ |