]> git.friedersdorff.com Git - max/saltfiles.git/blob - states/vim/files/vimrc
add ctrlp back
[max/saltfiles.git] / states / vim / files / vimrc
1 :let mapleader = ","
2 :let maplocalleader = "\\"
3
4 set nocompatible              " be iMproved, required
5 filetype off                  " required
6
7 " set the runtime path to include Vundle and initialize
8 set rtp+=~/.vim/bundle/Vundle.vim
9 call vundle#begin()
10 " alternatively, pass a path where Vundle should install plugins
11 " call vundle#begin('~/some/path/here')
12 Plugin 'gmarik/Vundle.vim'
13 Plugin 'Yggdroot/indentLine'
14 Plugin 'scrooloose/syntastic'
15 Plugin 'docunext/closetag.vim'
16 Plugin 'vim-airline/vim-airline'
17 Plugin 'vim-airline/vim-airline-themes'
18 Plugin 'airblade/vim-gitgutter'
19 Plugin 'tpope/vim-fugitive'
20 Plugin 'liskin/vim-fubitive'
21 Plugin 'editorconfig/editorconfig-vim'
22 Plugin 'LaTeX-Box-Team/LaTeX-Box'
23 Plugin 'hynek/vim-python-pep8-indent'
24 Plugin 'vim-scripts/octave.vim--'
25 Plugin 'vim-scripts/MatlabFilesEdition'
26 Plugin 'tmhedberg/SimpylFold'
27 Plugin 'saltstack/salt-vim'
28 Plugin 'fatih/vim-go'
29 Plugin 'gu-fan/riv.vim'
30 Plugin 'lepture/vim-jinja'
31 Plugin 'aklt/plantuml-syntax'
32 Plugin 'vim-python/python-syntax'
33 Plugin 'majutsushi/tagbar'
34 Plugin 'heavenshell/vim-pydocstring'
35 Plugin 'altercation/vim-colors-solarized'
36 Plugin 'ctrlpvim/ctrlp.vim'
37
38 " All of your Plugins must be added before the following line
39 call vundle#end()            " required
40 filetype plugin indent on    " required
41
42 " Swapfiles
43 set backupdir=$HOME/.vim/backup//
44
45 " Random look and feel stuff
46 syntax on
47 set background=light
48 colorscheme solarized
49 let g:solarized_termtrans = 1
50
51 set expandtab
52 set shiftwidth=4
53 set softtabstop=4
54 set tabstop=4
55 set relativenumber
56 set number
57
58 let g:html_indent_inctags = "html,body,head,tbody"
59 let g:indentLine_color_term = 5
60
61 " syntastic
62 set statusline+=%#warningmsg#
63 set statusline+=%{SyntasticStatuslineFlag()}
64 set statusline+=%*
65
66 let g:syntastic_always_populate_loc_list = 1
67 let g:syntastic_auto_loc_list = 2
68 let g:syntastic_check_on_open = 1
69 let g:syntastic_check_on_wq = 1
70 let g:syntastic_javascript_checkers = ['eslint']
71 let g:syntastic_python_python_exec = '/usr/bin/python3'
72 let g:syntastic_python_checkers = ['pylint']
73 let g:syntastic_python_pylint_args = '-E'
74 let g:syntastic_aggregate_errors = 1
75
76 " Syntastic C++11
77 let g:syntastic_cpp_compiler = 'g++'
78 let g:syntastic_cpp_compiler_options = '-std=c++14'
79
80 set laststatus=2
81 " Set this to 1 if powerline fonts are installed.
82 let g:airline_powerline_fonts = 1
83 set timeoutlen=1000
84 let g:airline#extensions#tabline#enabled = 1
85 let g:airline#extensions#tabline#fnamemod = ':t'
86
87 " Setting wildignore
88 set wildignore+=venv
89 set wildignore+=.git,.hg.svn
90
91
92 " Editorconfig
93 let g:EditorConfig_exclude_patterns = ['fugitive://.*']
94
95 " latex-box
96 let g:LatexBox_quickfix = 4
97 let g:LatexBox_viewer = "mupdf"
98
99 " clang fix
100 let g:clang_user_options='|| exit0'
101
102 " Color 80th column
103 highlight ColorColumn ctermbg=7
104 let &colorcolumn="80,".join(range(100,999),",")
105
106 " Octave Syntax
107 " augroup filetypedetect
108 "   au! BufRead,BufNewFile *.m,*.oct set filetype=octave
109 " augroup END
110
111 " Quiet netrw
112 let g:netrw_silent = 1
113 let g:netrw_liststyle = 3
114 let g:netrw_banner = 0
115 let g:netrw_browse_split = 4
116 let g:netrw_winsize = 20
117
118 " Set folding
119 set foldmethod=syntax
120 nnoremap <space> za
121 vnoremap <space> zf
122
123 " Better saving behaviour for go
124 let g:go_fmt_experimental = 1
125
126 " Show whitespace
127 set list listchars=trail:•,extends:>,precedes:<,nbsp:␣,eol:↲,tab:→\,
128
129 " Force python3 for rst tables plugin
130 let g:rst_prefer_python_version = 2
131
132 " Python syntax highlighting
133 let g:python_highlight_builtins = 1
134 let g:python_highlight_builtin_objs = 1
135 let g:python_highlight_builtin_types = 1
136 let g:python_highlight_builtin_funcs = 1
137 let g:python_highlight_builtin_kwarg = 1
138 let g:python_highlight_exceptions = 1
139 let g:python_highlight_string_formatting = 1
140 let g:python_highlight_string_format = 1
141 let g:python_highlight_string_templates = 1
142 let g:python_highlight_class_vars = 1
143 let g:python_highlight_operators = 1
144
145 " Python indent
146 autocmd FileType python setlocal foldmethod=indent foldnestmax=2
147
148 " Paren highlighting
149 hi MatchParen cterm=underline ctermbg=none ctermfg=none
150
151 " Activate tagbar with F8
152 nmap <F8> :TagbarToggle<CR>
153
154 " Set path to doq
155 let g:pydocstring_doq_path= "/home/max/.local/bin/doq"
156
157
158 " Bindings
159 " Clipboard
160 noremap <Leader>y "+y
161 noremap <Leader>p "+p
162
163 let g:ctrlp_cache_dir = $HOME . '/.cache/ctrlp'
164 if executable('ag')
165     let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
166 endif