]> git.friedersdorff.com Git - max/saltfiles.git/blob - states/vim/files/vimrc
Simplify vim config somewhat
[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 'flazz/vim-colorschemes'
27 Plugin 'tmhedberg/SimpylFold'
28 Plugin 'saltstack/salt-vim'
29 Plugin 'fatih/vim-go'
30 Plugin 'gu-fan/riv.vim'
31 Plugin 'lepture/vim-jinja'
32 Plugin 'aklt/plantuml-syntax'
33 Plugin 'vim-python/python-syntax'
34 Plugin 'luochen1990/rainbow'
35 Plugin 'majutsushi/tagbar'
36 Plugin 'heavenshell/vim-pydocstring'
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=dark
48 colorscheme molokai
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 = 200
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 = ['python3 -m pylint --error-only']
71 let g:syntastic_aggregate_errors = 1
72
73 " Syntastic C++11
74 let g:syntastic_cpp_compiler = 'g++'
75 let g:syntastic_cpp_compiler_options = '-std=c++14'
76
77 set laststatus=2
78 " Set this to 1 if powerline fonts are installed.
79 let g:airline_powerline_fonts = 1
80 set timeoutlen=1000
81 let g:airline#extensions#tabline#enabled = 1
82 let g:airline#extensions#tabline#fnamemod = ':t'
83
84 " Setting wildignore
85 set wildignore+=venv
86 set wildignore+=.git,.hg.svn
87
88
89 " Editorconfig
90 let g:EditorConfig_exclude_patterns = ['fugitive://.*']
91
92 " latex-box
93 let g:LatexBox_quickfix = 4
94 let g:LatexBox_viewer = "mupdf"
95
96 " clang fix
97 let g:clang_user_options='|| exit0'
98
99 " Color 80th column
100 highlight ColorColumn ctermbg=0
101 let &colorcolumn="80,".join(range(100,999),",")
102
103 " Octave Syntax
104 " augroup filetypedetect
105 "   au! BufRead,BufNewFile *.m,*.oct set filetype=octave
106 " augroup END
107
108 " Quiet netrw
109 let g:netrw_silent = 1
110 let g:netrw_liststyle = 3
111 let g:netrw_banner = 0
112 let g:netrw_browse_split = 4
113 let g:netrw_winsize = 20
114
115 " Set folding
116 set foldmethod=syntax
117 nnoremap <space> za
118 vnoremap <space> zf
119
120 " Better saving behaviour for go
121 let g:go_fmt_experimental = 1
122
123 " Show whitespace
124 set list listchars=trail:•,extends:>,precedes:<,nbsp:␣,eol:↲,tab:→\,
125
126 " Force python3 for rst tables plugin
127 let g:rst_prefer_python_version = 2
128
129 " Python syntax highlighting
130 let g:python_highlight_builtins = 1
131 let g:python_highlight_builtin_objs = 1
132 let g:python_highlight_builtin_types = 1
133 let g:python_highlight_builtin_funcs = 1
134 let g:python_highlight_builtin_kwarg = 1
135 let g:python_highlight_exceptions = 1
136 let g:python_highlight_string_formatting = 1
137 let g:python_highlight_string_format = 1
138 let g:python_highlight_string_templates = 1
139 let g:python_highlight_class_vars = 1
140 let g:python_highlight_operators = 1
141
142 " Python indent
143 autocmd FileType python setlocal foldmethod=indent foldnestmax=2
144
145 " Paren highlighting
146 hi MatchParen cterm=underline ctermbg=none ctermfg=none
147
148 " Rainbow parens
149 let g:rainbow_active = 1
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"