|
|
|
@ -55,7 +55,7 @@ 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 |
|
|
|
|
set t_Co=256 " 256 color terminal |
|
|
|
|
set modeline " Enable modelines |
|
|
|
|
" set undofile " saves undo changes in a separate file, so we can undo anytime |
|
|
|
|
set lcs=tab:¦\ " uses a special char at the start of a tab character, uses spaces after that |
|
|
|
@ -76,7 +76,7 @@ call vundle#begin()
|
|
|
|
|
" Bundles |
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
" Vundle itself! |
|
|
|
|
Plugin 'gmarik/Vundle.vim' |
|
|
|
|
Plugin 'VundleVim/Vundle.vim' |
|
|
|
|
|
|
|
|
|
" Magic "every updated syntax" plugin |
|
|
|
|
Plugin 'sheerun/vim-polyglot' |
|
|
|
@ -85,7 +85,9 @@ Plugin 'sheerun/vim-polyglot'
|
|
|
|
|
Plugin 'scrooloose/syntastic' |
|
|
|
|
|
|
|
|
|
" status line |
|
|
|
|
Plugin 'bling/vim-airline' |
|
|
|
|
" Plugin 'vim-airline/vim-airline' |
|
|
|
|
" Plugin 'vim-airline/vim-airline-themes' |
|
|
|
|
Plugin 'itchyny/lightline.vim' |
|
|
|
|
|
|
|
|
|
" git support |
|
|
|
|
Plugin 'tpope/vim-fugitive' |
|
|
|
@ -120,6 +122,12 @@ Plugin 'altercation/vim-colors-solarized'
|
|
|
|
|
Plugin 'w0ng/vim-hybrid' |
|
|
|
|
Plugin 'baycomb' |
|
|
|
|
Plugin 'tomasr/molokai' |
|
|
|
|
Plugin 'jonathanfilip/vim-lucius' |
|
|
|
|
Plugin 'chriskempson/base16-vim' |
|
|
|
|
Plugin 'zenorocha/dracula-theme', {'rtp': 'vim/'} |
|
|
|
|
Plugin 'Snazzyham/wwdc-2016' |
|
|
|
|
Plugin 'farfanoide/vim-facebook' |
|
|
|
|
Plugin 'rakr/vim-two-firewatch' |
|
|
|
|
|
|
|
|
|
" Improved syntax files |
|
|
|
|
Plugin 'Glench/Vim-Jinja2-Syntax' |
|
|
|
@ -129,14 +137,15 @@ Plugin 'kchmck/vim-coffee-script'
|
|
|
|
|
Plugin 'mattn/emmet-vim' |
|
|
|
|
|
|
|
|
|
" Project tree |
|
|
|
|
Plugin 'scrooloose/nerdtree' |
|
|
|
|
Plugin 'jistr/vim-nerdtree-tabs' |
|
|
|
|
|
|
|
|
|
" Plugin 'scrooloose/nerdtree' |
|
|
|
|
" Plugin 'jistr/vim-nerdtree-tabs' |
|
|
|
|
Plugin 'tpope/vim-vinegar' |
|
|
|
|
|
|
|
|
|
" CTags regeneration |
|
|
|
|
" Plugin 'craigemery/vim-autotag' |
|
|
|
|
Plugin 'xolox/vim-misc' |
|
|
|
|
Plugin 'xolox/vim-easytags' |
|
|
|
|
" Plugin 'xolox/vim-misc' |
|
|
|
|
" Plugin 'xolox/vim-easytags' |
|
|
|
|
" Plugin 'ludovicchabant/vim-gutentags' |
|
|
|
|
|
|
|
|
|
" Shell inside VIM |
|
|
|
|
Plugin 'Shougo/vimproc' |
|
|
|
@ -193,30 +202,19 @@ set wildignore+=*/build/*,*.egginfo,*.pyc,*.mo,*/dist/*
|
|
|
|
|
" Auto-commands |
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
" Because most auto-commands add a "trim tailing spaces" regexp, we will |
|
|
|
|
" create a function to do that, so auto-commands can simply :call it. |
|
|
|
|
function TrimWhiteSpace() |
|
|
|
|
%s/\s*$// |
|
|
|
|
'' |
|
|
|
|
endfunction |
|
|
|
|
|
|
|
|
|
" 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)) |
|
|
|
|
" also, remove all tailing spaces |
|
|
|
|
au FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 textwidth=78 colorcolumn=79 |
|
|
|
|
au FileType python autocmd BufWritePre <buffer> :call TrimWhiteSpace() |
|
|
|
|
|
|
|
|
|
" Default C/C++ style |
|
|
|
|
" show a column marker at column 100, break the line at line 100, use tabs |
|
|
|
|
" instead of sapces and display a "¦" for tabs (this way we can see the lines |
|
|
|
|
" that are not using real tabs) |
|
|
|
|
au FileType c setlocal colorcolumn=100 tw=100 noet list |
|
|
|
|
au FileType c autocmd BufWritePre <buffer> :call TrimWhiteSpace() |
|
|
|
|
au FileType cpp setlocal colorcolumn=100 tw=100 noet list |
|
|
|
|
au FileType cpp autocmd BufWritePre <buffer> :call TrimWhiteSpace() |
|
|
|
|
"au FileTYpe c,cpp,objc autocmd BufwritePre <buffer> :ClangFormat |
|
|
|
|
|
|
|
|
|
" Default ReStructured document style |
|
|
|
|
" reStructured files follow python closely, but use 3 tab stops instead of 4 |
|
|
|
@ -266,7 +264,6 @@ au FileType coffee setlocal noet ts=2 sw=2 sts=2 list
|
|
|
|
|
let g:vim_json_syntax_conceal = 0 |
|
|
|
|
autocmd BufNewFile,BufRead *.json set filetype=json |
|
|
|
|
autocmd Filetype json set et ts=4 sts=4 |
|
|
|
|
autocmd FileType json autocmd BufWritePre <buffer> :call TrimWhiteSpace() |
|
|
|
|
|
|
|
|
|
" Default Pinpoint style |
|
|
|
|
au BufNewFile,BufRead *.pin set filetype=pinpoint |
|
|
|
@ -274,7 +271,12 @@ au FileType pinpoint setlocal colorcolumn=79 textwidth=78
|
|
|
|
|
|
|
|
|
|
" Default Yang style |
|
|
|
|
au FileType yang set et |
|
|
|
|
au FileType yang autocmd BufWritePre <buffer> :call TrimWhiteSpace() |
|
|
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
" Remove tailing spaces |
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
autocmd FileType c,cpp,python,yang,json autocmd BufWritePre <buffer> :%s/\s\+$//e |
|
|
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
" mapings |
|
|
|
@ -337,13 +339,20 @@ let g:AutoPairsMapCR = 1
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
let g:airline_powerline_fonts = 1 |
|
|
|
|
let g:airline_theme = 'understated' |
|
|
|
|
let g:airline#extensions#whitespace#enabled = 0 "disabled |
|
|
|
|
let g:airline#extensions#branch#enabled = 1 |
|
|
|
|
let g:airline#extensions#syntastic#enabled = 1 |
|
|
|
|
let g:airline#extensions#tabline#enabled = 1 |
|
|
|
|
let g:airline#extensions#tabline#show_buffers = 0 |
|
|
|
|
let g:airline#extensions#tabline#show_tab_type = 0 |
|
|
|
|
let g:airline#extensions#tabline#tab_nr_type = 1 |
|
|
|
|
let g:airline#extensions#whitespace#enabled = 0 "disabled |
|
|
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
" Lightline configuration |
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
let g:lightline = { |
|
|
|
|
\ 'colorscheme': 'wombat', |
|
|
|
|
\ } |
|
|
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
" CtrlP and extensions configuration |
|
|
|
@ -372,6 +381,7 @@ let g:UltiSnipsEditSplit = "horizontal"
|
|
|
|
|
let g:UltiSnipsExpandTrigger = "<tab>" |
|
|
|
|
let g:UltiSnipsJumpForwardTrigger = "<tab>" |
|
|
|
|
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>" |
|
|
|
|
let g:ultisnips_python_style = "sphinx" |
|
|
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
" Nerdtree and Nerdtree tabs |
|
|
|
|