Browse Source

major update: removed the check for autocmd (cause fuck not having it), removed vim-mode and used python syntax and vim-jedi instead; removed a bunch of commented code

master
Julio Biason 11 years ago
parent
commit
d1a2a24cb2
  1. 78
      configs/vimrc

78
configs/vimrc

@ -61,8 +61,6 @@ syntax sync minlines=1500 " increases the number of lines to find the proper syn
let mapleader="," " use comma to start user-defined (in plugins) functions let mapleader="," " use comma to start user-defined (in plugins) functions
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Enable file type detection. " Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72, " Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc. " 'cindent' is on in C files, etc.
@ -86,20 +84,6 @@ if has("autocmd")
augroup END augroup END
" Python files should not have empty lines
autocmd FileType python autocmd BufWritePre <buffer> :%s/\s\+$//e
" omni completion
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
" ---------------------------------------------------------------------- " ----------------------------------------------------------------------
" Auto-commands " Auto-commands
" ---------------------------------------------------------------------- " ----------------------------------------------------------------------
@ -110,6 +94,9 @@ if has("autocmd")
" spaces are a tab (softtabstop) and break the line at column 78 (textwidth)) " spaces are a tab (softtabstop) and break the line at column 78 (textwidth))
au FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 textwidth=78 colorcolumn=79 au FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 textwidth=78 colorcolumn=79
" Python files should not have empty lines
au FileType python autocmd BufWritePre <buffer> :%s/\s\+$//e
" reStructured files follow python closely, but use 3 tab stops instead of 4 " reStructured files follow python closely, but use 3 tab stops instead of 4
au FileType rst setlocal expandtab tabstop=3 sw=3 sts=3 textwidth=78 au FileType rst setlocal expandtab tabstop=3 sw=3 sts=3 textwidth=78
@ -123,6 +110,7 @@ if has("autocmd")
" PHP break lines at column 79, like Python " PHP break lines at column 79, like Python
au FileType php setlocal textwidth=79 au FileType php setlocal textwidth=79
let php_smart_members=1 " colorize instance members
" svn (when editing svn commit messages, break lines at " svn (when editing svn commit messages, break lines at
" column 70) " column 70)
@ -134,13 +122,6 @@ if has("autocmd")
" JavaScript (who though those were "good" defaults?) " JavaScript (who though those were "good" defaults?)
au FileType javascript setlocal expandtab tabstop=2 sw=2 sts=2 textwidth=0 au FileType javascript setlocal expandtab tabstop=2 sw=2 sts=2 textwidth=0
" Pinpoint (presentation format)
au BufNewFile,BufRead *.pin set filetype=pinpoint
au FileType pinpoint setlocal colorcolumn=79 textwidth=78
else
set autoindent " always set autoindenting on
endif " has("autocmd")
" ---------------------------------------------------------------------- " ----------------------------------------------------------------------
" mapings " mapings
" ---------------------------------------------------------------------- " ----------------------------------------------------------------------
@ -192,9 +173,6 @@ else
imap <M-0> <ESC>:tabn 10<CR>a imap <M-0> <ESC>:tabn 10<CR>a
endif endif
" custom PHP syntax file configuration
let php_smart_members=1
" Vundle stuff starts here " Vundle stuff starts here
set rtp+=~/.vim/bundle/vundle/ set rtp+=~/.vim/bundle/vundle/
call vundle#rc() call vundle#rc()
@ -206,7 +184,6 @@ call vundle#rc()
Bundle 'gmarik/vundle' Bundle 'gmarik/vundle'
" status line " status line
" Bundle "Lokaltog/powerline"
Bundle "bling/vim-airline" Bundle "bling/vim-airline"
" git support " git support
@ -220,22 +197,18 @@ Bundle 'godlygeek/tabular'
" close pairs " close pairs
Bundle 'jiangmiao/auto-pairs' Bundle 'jiangmiao/auto-pairs'
" Bundle 'Townk/vim-autoclose'
" python " python
" Bundle 'nvie/vim-flake8' " Bundle 'klen/python-mode'
Bundle 'klen/python-mode'
Bundle 'scrooloose/syntastic' Bundle 'scrooloose/syntastic'
Bundle 'hdima/python-syntax'
Bundle 'davidhalter/jedi-vim'
" snippets " snippets
Bundle 'msanders/snipmate.vim' Bundle 'msanders/snipmate.vim'
" Bundle "MarcWeber/vim-addon-mw-utils"
" Bundle "tomtom/tlib_vim"
" Bundle "garbas/vim-snipmate"
" fuzzy file open " fuzzy file open
Bundle 'kien/ctrlp.vim' Bundle 'kien/ctrlp.vim'
" Bundle "unite.vim"
" fuzzy function search (based on ctrlp) " fuzzy function search (based on ctrlp)
Bundle 'tacahiroy/ctrlp-funky' Bundle 'tacahiroy/ctrlp-funky'
@ -245,38 +218,23 @@ Bundle 'terryma/vim-multiple-cursors'
" colorscheme " colorscheme
Bundle 'croaker/mustang-vim' Bundle 'croaker/mustang-vim'
" Bundle "Ambient-Color-Scheme" Bundle "Ambient-Color-Scheme"
Bundle 'EditPlus' Bundle 'EditPlus'
" Bundle 'altercation/vim-colors-solarized' Bundle 'altercation/vim-colors-solarized'
color mustang " looks awesome on gvim, looks alright in vim if you have 256 color support color mustang " looks awesome on gvim, looks alright in vim if you have 256 color support
" Autocomplete
" Bundle 'ervandew/supertab'
" Improved syntax files " Improved syntax files
Bundle 'Glench/Vim-Jinja2-Syntax' Bundle 'Glench/Vim-Jinja2-Syntax'
Bundle 'fmoralesc/vim-pinpoint' Bundle 'fmoralesc/vim-pinpoint'
Bundle 'elzr/vim-json'
" Identation guidelines
" Bundle 'nathanaelkane/vim-indent-guides'
" Airline to prompt " Airline to prompt
Bundle 'edkolev/promptline.vim' Bundle 'edkolev/promptline.vim'
" JSON
Bundle 'elzr/vim-json'
" auto-pair settings
let g:AutoPairsMapCR = 1
" ---------------------------------------------------------------------- " ----------------------------------------------------------------------
" Powerline settings " Autopair settings
" ---------------------------------------------------------------------- " ----------------------------------------------------------------------
let g:AutoPairsMapCR = 1
" python from powerline.vim import setup as powerline_setup
" python powerline_setup()
" python del powerline_setup
" let g:Powerline_symbols = 'unicode'
" ---------------------------------------------------------------------- " ----------------------------------------------------------------------
" Airline configuration " Airline configuration
@ -291,12 +249,6 @@ let g:airline#extensions#tabline#show_buffers = 0
let g:airline#extensions#tabline#show_tab_type = 0 let g:airline#extensions#tabline#show_tab_type = 0
let g:airline#extensions#tabline#tab_nr_type = 1 let g:airline#extensions#tabline#tab_nr_type = 1
" ----------------------------------------------------------------------
" Unite configuration (disabled)
" ----------------------------------------------------------------------
" let g:unite_split_rule = "bottomleft"
let g:unite_winheight = 10
" ---------------------------------------------------------------------- " ----------------------------------------------------------------------
" CtrlP and extensions configuration " CtrlP and extensions configuration
" ---------------------------------------------------------------------- " ----------------------------------------------------------------------
@ -316,3 +268,9 @@ let g:indent_guides_guide_size=1
let g:vim_json_syntax_conceal = 0 let g:vim_json_syntax_conceal = 0
autocmd BufNewFile,BufRead *.json set filetype=json autocmd BufNewFile,BufRead *.json set filetype=json
autocmd Filetype json set noet ts=4 autocmd Filetype json set noet ts=4
" ----------------------------------------------------------------------
" Pinpoint syntax
" ----------------------------------------------------------------------
au BufNewFile,BufRead *.pin set filetype=pinpoint
au FileType pinpoint setlocal colorcolumn=79 textwidth=78

Loading…
Cancel
Save