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