Skip to content

Instantly share code, notes, and snippets.

@nelsonsar
Created July 11, 2013 14:52
Show Gist options
  • Save nelsonsar/5976132 to your computer and use it in GitHub Desktop.
Save nelsonsar/5976132 to your computer and use it in GitHub Desktop.
This is my .vimrc file. It will get update since UpdateCTags function for some reason breaks in some cases...
"mark trailing whitespaces
hi link localWhitespaceError Error
au Syntax * syn match localWhitespaceError /\(\zs\%#\|\s\)\+$/ display
au Syntax * syn match localWhitespaceError / \+\ze\t/ display
highlight WhitespaceEOL ctermbg=red guibg=red
match WhitespaceEOL /\s\+$/
"change tabs for 4 spaces
set tabstop=4
set shiftwidth=4
set expandtab
" tags
set tags=./tags;~/tags.telexfree
"php autocomplete
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
" Remap code completion to Ctrl+Space {{{2
inoremap <Nul> <C-x><C-o>
" line number
set number
" NERDTree Toggle
map <C-n> :NERDTreeToggle<CR>
" ctags update
autocmd VimEnter *.php call UpdateCTags()
" pathogen
execute pathogen#infect()
function! UpdateCTags()
echom "Indexing files..."
redraw | execute "!sh $HOME/update_ctags.sh 2> /dev/null &" | echom
endfun
@henriquemoody
Copy link

Tilango demais!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment