Browse Source

moved autocmds to the autocmd check

master
Julio Biason 11 years ago
parent
commit
08dfbea423
  1. 79
      configs/vimrc

79
configs/vimrc

@ -66,6 +66,40 @@ if has("autocmd")
au FileType php set ofu=phpcomplete#CompletePHP
set completeopt-=preview
" ----------------------------------------------------------------------
" Auto-commands
" ----------------------------------------------------------------------
" default python style
" (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
" 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
" 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
" the smarty filetypes doesn't have any sort of indentation, so we set it to
" auto
au FileType smarty set ai
" PHP break lines at column 79, like Python
au FileType php set textwidth=79
" svn (when editing svn commit messages, break lines at
" column 70)
au FileType svn set 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
else
set autoindent " always set autoindenting on
endif " has("autocmd")
@ -94,52 +128,14 @@ set smartindent " smart identation
set number " show line numbers
set wim=longest,list " file auto-completion
set background=dark " to follow most of the colorschemes I use
set vb t_vb= " convert bells to visual bells and do nothing as visual bell
set t_Co=256 " 256 color terminals
color mustang " looks awesome on gvim, looks alright in vim if you have 256 color support
syntax sync minlines=1500 " increases the number of lines to find the proper syntax
let mapleader="," " use comma to start user-defined (in plugins) functions
" ----------------------------------------------------------------------
" Auto-commands
" ----------------------------------------------------------------------
" default python style
" (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
" 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
" templates (Jinja2 in this case) will use tabs instead (to reduce file size)
" but also 2 spaces for tabs.
au FileType htmldjango set noet tabstop=4 shiftwidth=4 softtabstop=4
" the smarty filetypes doesn't have any sort of indentation, so we set it to
" auto
au FileType smarty set ai
" PHP break lines at column 79, like Python
au FileType php set textwidth=79
" svn (when editing svn commit messages, break lines at
" column 70)
au FileType svn set tw=70
" email (mostly mutt stuff)
au FileType mail setlocal spell spelllang=en
" HTML templates do not need breaks
au FileType htmldjango set textwidth=0
" JavaScript (who though those were "good" defaults?)
au FileType javascript set expandtab tabstop=2 sw=2 sts=2 textwidth=0
" ----------------------------------------------------------------------
" mapings
" ----------------------------------------------------------------------
@ -242,10 +238,14 @@ Bundle 'terryma/vim-multiple-cursors'
" colorscheme
Bundle 'croaker/mustang-vim'
" Bundle 'altercation/vim-colors-solarized'
color mustang " looks awesome on gvim, looks alright in vim if you have 256 color support
" Autocomplete
" Bundle 'ervandew/supertab'
" Improved syntax files
Bundle 'Glench/Vim-Jinja2-Syntax'
" auto-pair settings
let g:AutoPairsMapCR = 1
@ -314,7 +314,6 @@ set tabline=%!PowerTabLine()
" Airline configuration
" ----------------------------------------------------------------------
let g:airline_powerline_fonts = 1
" let g:airline_theme = 'solarized'
let g:airline_theme = 'powerlineish'
let g:airline_detect_whitespace=0 "disabled
let g:airline_enable_branch = 1

Loading…
Cancel
Save