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