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