diff --git a/configs/vimrc b/configs/vimrc index b9996d6..e5da633 100644 --- a/configs/vimrc +++ b/configs/vimrc @@ -58,12 +58,12 @@ if has("autocmd") " omni completion - au FileType python set ofu=pythoncomplete#Complete - au FileType javascript set ofu=javascriptcomplete#CompleteJS - au FileType html set ofu=htmlcomplete#CompleteTags - au FileType css set ofu=csscomplete#CompleteCSS - au FileType xml set ofu=xmlcomplete#CompleteTags - au FileType php set ofu=phpcomplete#CompletePHP + au FileType python setlocal ofu=pythoncomplete#Complete + au FileType javascript setlocal ofu=javascriptcomplete#CompleteJS + au FileType html setlocal ofu=htmlcomplete#CompleteTags + au FileType css setlocal ofu=csscomplete#CompleteCSS + au FileType xml setlocal ofu=xmlcomplete#CompleteTags + au FileType php setlocal ofu=phpcomplete#CompletePHP set completeopt-=preview @@ -75,31 +75,31 @@ if has("autocmd") " (use spaces instead of tabs (expandtab), uses 4 spaces for tabs (tabstop), " when auto-indenting, also use 4 spaces (shiftwidth), when deleting text, 4 " spaces are a tab (softtabstop) and break the line at column 78 (textwidth)) - au FileType python set expandtab tabstop=4 shiftwidth=4 softtabstop=4 textwidth=78 + au FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 textwidth=78 " reStructured files follow python closely, but use 3 tab stops instead of 4 - au FileType rst set expandtab tabstop=3 sw=3 sts=3 textwidth=78 + au FileType rst setlocal expandtab tabstop=3 sw=3 sts=3 textwidth=78 " templates (Jinja2 in this case) will use tabs instead (to reduce file size) - au FileType htmldjango set noet tabstop=4 shiftwidth=4 softtabstop=4 textwidth=0 - au FileType jinja set noet tabstop=4 shiftwidth=4 softtabstop=4 textwidth=0 + au FileType htmldjango setlocal noet tabstop=4 shiftwidth=4 softtabstop=4 textwidth=0 + au FileType jinja setlocal noet tabstop=4 shiftwidth=4 softtabstop=4 textwidth=0 " the smarty filetypes doesn't have any sort of indentation, so we set it to " auto - au FileType smarty set ai + au FileType smarty setlocal ai " PHP break lines at column 79, like Python - au FileType php set textwidth=79 + au FileType php setlocal textwidth=79 " svn (when editing svn commit messages, break lines at " column 70) - au FileType svn set tw=70 + au FileType svn setlocal tw=70 " email (mostly mutt stuff) au FileType mail setlocal spell spelllang=en " JavaScript (who though those were "good" defaults?) - au FileType javascript set expandtab tabstop=2 sw=2 sts=2 textwidth=0 + au FileType javascript setlocal expandtab tabstop=2 sw=2 sts=2 textwidth=0 else set autoindent " always set autoindenting on endif " has("autocmd")