docs:vim:vimrc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:vim:vimrc [2010/07/09 10:50] billhdocs: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:h12:cANSI  set gfn=Courier_New:h12:cANSI
  
-    " gui font (Mac) + " gui font (Mac) 
-    if has("mac"+ if has("mac"
-        set gfn=Monaco:h13 + set gfn=Monaco:h13 
-    endif+ elseif has("win32"
 + "set gfn=Courier_New:h12:cANSI 
 + set gfn=Courier_New:h11:cANSI 
 + elseif has("unix"
 + set gfn=Courier\ New\ 12 
 + endif
  
 else else
Line 166: Line 171:
  
 " // commenting/uncommenting on visual block selections " // commenting/uncommenting on visual block selections
-map g/ :s/^\([ \t]*\)/\1\/\/ /g<CR>:let @/=''<CR> +map g/ :s/^\([ \t]*\)/\1\/\/ /g<CR>:let @/=histget("search", -2)<CR> 
-map g? :s/^\([ \t]*\)\/\/ \{0,1}\([ \t]*\)/\1\2/g<CR>:let @/=''<CR>+map g? :s/^\([ \t]*\)\/\/ \{0,1}\([ \t]*\)/\1\2/g<CR>:let @/=histget("search", -3)<CR>
  
 " 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:netrw_sort_sequence = '[\/]$' let g:netrw_sort_sequence = '[\/]$'
 +
 +" case-insensitive sorting in netrw
 +let g:netrw_sort_options="i"
  
 " always change current (local) directory to directory of current buffer " always change current (local) directory to directory of current buffer
 " http://vim.wikia.com/wiki/Change_to_the_directory_of_the_current_file " http://vim.wikia.com/wiki/Change_to_the_directory_of_the_current_file
-if exists('+autochdir'+autocmd BufEnter * silent! lcd %:p:h:gs/ /\\ /
-  set autochdir +
-else +
-  autocmd BufEnter * silent! lcd %:p:h:gs/ /\\ / +
-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:lnum - 1) =~ '\s*<<<\s*'
 + return 0
 + else
 + return GetPhpIndent()
 + endif
 +endfunction
 +autocmd BufReadPost *.php setlocal indentexpr=MyGetPhpIndent()
  
 </code> </code>
  • docs/vim/vimrc.1278694216.txt.gz
  • Last modified: 2010/07/09 10:50
  • by billh