diff options
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 86 |
1 files changed, 53 insertions, 33 deletions
@@ -4,6 +4,7 @@ call plug#begin() | |||
4 | Plug 'tpope/vim-sensible' | " a sane and modern default configuration | 4 | Plug 'tpope/vim-sensible' | " a sane and modern default configuration |
5 | Plug 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' | 5 | Plug 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' |
6 | Plug 'tpope/vim-fugitive' | " the most complete GIT integration plugin | 6 | Plug 'tpope/vim-fugitive' | " the most complete GIT integration plugin |
7 | Plug 'godlygeek/tabular' | " align code on a sign, like :Tab/= | ||
7 | Plug 'mhinz/vim-signify' | " show changes in the clutter bar | 8 | Plug 'mhinz/vim-signify' | " show changes in the clutter bar |
8 | 9 | ||
9 | 10 | ||
@@ -64,12 +65,12 @@ let g:airline_theme='base16' | " specifies which colors | |||
64 | " Additional: ========================================. | 65 | " Additional: ========================================. |
65 | Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages | 66 | Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages |
66 | Plug 'majutsushi/tagbar' " superseeds taglist-plus, which isn't maintained any more | 67 | Plug 'majutsushi/tagbar' " superseeds taglist-plus, which isn't maintained any more |
67 | let g:tagbar_autoclose = 1 | 68 | let g:tagbar_autoclose = 1 |
68 | let g:tagbar_autofocus = 1 | 69 | let g:tagbar_autofocus = 1 |
69 | let g:tagbar_autoshowtag = 1 | 70 | let g:tagbar_autoshowtag = 1 |
70 | let g:tagbar_compact = 0 | 71 | let g:tagbar_compact = 0 |
71 | let g:tagbar_indent = 0 | 72 | let g:tagbar_indent = 0 |
72 | let g:tagbar_foldlevel = 99 | 73 | let g:tagbar_foldlevel = 99 |
73 | nnoremap <leader>l :TagbarToggle<CR>| " bind TagBar to Hotkey Ctrl+L | 74 | nnoremap <leader>l :TagbarToggle<CR>| " bind TagBar to Hotkey Ctrl+L |
74 | 75 | ||
75 | 76 | ||
@@ -84,7 +85,9 @@ let g:ycm_min_num_of_chars_for_completion = 1 | |||
84 | let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword | 85 | let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword |
85 | let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure | 86 | let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure |
86 | let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar | 87 | let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar |
87 | 88 | " disable <tab>-key for YCM so that it can be used with ultisnips | |
89 | " let g:ycm_key_list_select_completion=[] | ||
90 | " let g:ycm_key_list_previous_completion=[] | ||
88 | 91 | ||
89 | 92 | ||
90 | Plug 'scrooloose/syntastic' | 93 | Plug 'scrooloose/syntastic' |
@@ -92,36 +95,40 @@ set statusline+=%#warningmsg# | |||
92 | set statusline+=%{SyntasticStatuslineFlag()} | 95 | set statusline+=%{SyntasticStatuslineFlag()} |
93 | set statusline+=%* | 96 | set statusline+=%* |
94 | set signcolumn=yes " always show the column | 97 | set signcolumn=yes " always show the column |
95 | let g:LatexBox_latexmk_preview_continuously = 1 | 98 | let g:LatexBox_latexmk_preview_continuously = 1 |
96 | let g:LatexBox_viewer = "evince" | 99 | let g:LatexBox_viewer = "evince" |
97 | let g:syntastic_always_populate_loc_list = 1 | 100 | let g:syntastic_always_populate_loc_list = 1 |
98 | let g:syntastic_auto_loc_list = 0 | 101 | let g:syntastic_auto_loc_list = 0 |
99 | let g:syntastic_check_on_open = 1 | 102 | let g:syntastic_check_on_open = 1 |
100 | let g:syntastic_check_on_wq = 0 | 103 | let g:syntastic_check_on_wq = 0 |
101 | let g:syntastic_quiet_messages = {"type":"style"} " filter (=do not display) style/formatting errors and warnings | 104 | let g:syntastic_quiet_messages = {"type":"style"} " filter ( = do not display) style/formatting errors and warnings |
102 | " Syntastic | 105 | " Syntastic |
103 | let g:syntastic_error_symbol = '✖' | 106 | let g:syntastic_error_symbol = '✖' |
104 | let g:syntastic_style_error_symbol = '✗' | 107 | let g:syntastic_style_error_symbol = '✗' |
105 | let g:syntastic_warning_symbol = '➔' | 108 | let g:syntastic_warning_symbol = '➔' |
106 | let g:syntastic_style_warning_symbol = '≈' | 109 | let g:syntastic_style_warning_symbol = '≈' |
107 | 110 | ||
108 | Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures | 111 | Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures |
109 | let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe | 112 | let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe |
110 | let g:jedi#show_call_signatures = 1 " which sadly does not support signatures like jedi | 113 | let g:jedi#show_call_signatures = 1 " which sadly does not support signatures like jedi |
111 | let g:jedi#show_call_signatures_delay = 0 | 114 | let g:jedi#show_call_signatures_delay = 0 |
112 | let g:jedi#auto_vim_configure = 0 | 115 | let g:jedi#auto_vim_configure = 0 |
113 | let g:pymode_rope = 0 " https://github.com/davidhalter/jedi-vim/issues/163 | 116 | let g:pymode_rope = 0 " https://github.com/davidhalter/jedi-vim/issues/163 |
114 | " autocmd FileType python jedi.preload_module('os', 'sys', 'math') | 117 | " autocmd FileType python jedi.preload_module('os', 'sys', 'math') |
115 | " let g:pymode_options_max_line_length = 120 | 118 | " let g:pymode_options_max_line_length = 120 |
116 | " let g:syntastic_python_flake8_args='--ignore=F821,E302,E501,E241,E301' | 119 | " let g:syntastic_python_flake8_args='--ignore=F821,E302,E501,E241,E301' |
117 | 120 | ||
118 | Plug 'honza/vim-snippets' " dependency of ultisnips (see below) | 121 | Plug 'honza/vim-snippets' " dependency of ultisnips (see below) |
119 | Plug 'SirVer/ultisnips' " replaces loremipsum (and many more) | 122 | Plug 'SirVer/ultisnips' " replaces loremipsum (and many more) |
120 | let g:UltiSnipsExpandTrigger = '<C-j>'| " Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe. | 123 | "let g:UltiSnipsExpandTrigger = '<C-j>'| " Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe. |
121 | let g:UltiSnipsJumpForwardTrigger = '<C-j>'| " \ | 124 | "let g:UltiSnipsJumpForwardTrigger = '<C-j>'| " \ |
122 | let g:UltiSnipsJumpBackwardTrigger = '<C-k>'| " \ | 125 | "let g:UltiSnipsJumpBackwardTrigger = '<C-k>'| " \ |
123 | " let g:UltiSnipsListSnippets = '<c-s-tab>'| " YouCompleteMe includes those, so this isn't necessary | 126 | "let g:UltiSnipsListSnippets = '<C-`>'| " YouCompleteMe includes those, so this isn't necessary |
124 | " let g:UltiSnipsEditSplit = 'vertical' | 127 | let g:UltiSnipsExpandTrigger = '<leader><tab>'| " Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe. |
128 | let g:UltiSnipsJumpForwardTrigger = '<PageDown>'| " \ | ||
129 | let g:UltiSnipsJumpBackwardTrigger = '<PageUp>'| " \ | ||
130 | let g:UltiSnipsListSnippets = '<leader><leader>'| " YouCompleteMe includes those, so this isn't necessary | ||
131 | " let g:UltiSnipsEditSplit = 'vertical' | ||
125 | 132 | ||
126 | 133 | ||
127 | " Disabled ===========================================. | 134 | " Disabled ===========================================. |
@@ -151,10 +158,12 @@ inoremap | |||
151 | \ <C-Backspace> | 158 | \ <C-Backspace> |
152 | \ <C-W> | 159 | \ <C-W> |
153 | 160 | ||
161 | noremap <silent> <F5> :make<CR> | ||
162 | |||
154 | 163 | ||
155 | 164 | ||
156 | " settings ============================================. | 165 | " settings ============================================. |
157 | " set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here | 166 | set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here |
158 | " set selectmode=mouse,key,cmd | " enters vim's select mode when pressing shift-left or shift-END | 167 | " set selectmode=mouse,key,cmd | " enters vim's select mode when pressing shift-left or shift-END |
159 | " set keymodel=startsel,stopsel | " makes shift-left, shift-right available for selecting text | 168 | " set keymodel=startsel,stopsel | " makes shift-left, shift-right available for selecting text |
160 | set breakindent | " Every wrapped line will continue visually indented | 169 | set breakindent | " Every wrapped line will continue visually indented |
@@ -174,7 +183,7 @@ set mouse=a | " also supported by vim, should be default | |||
174 | set nocursorcolumn | " turn visual cursor column off (improves performance) | 183 | set nocursorcolumn | " turn visual cursor column off (improves performance) |
175 | set nocursorline | " turn visual cursor line off (improves performance) | 184 | set nocursorline | " turn visual cursor line off (improves performance) |
176 | set nofoldenable | " disable code folding. I hate code folding | 185 | set nofoldenable | " disable code folding. I hate code folding |
177 | set norelativenumber | " we deactivate relative numbers, but have them mentioned here so we won't forget they existed | 186 | set relativenumber | " relative line numbers can speed up navigation |
178 | set noshowmode | " because we are using some powerline derivat | 187 | set noshowmode | " because we are using some powerline derivat |
179 | set nostartofline | " when scrolling: do not move the cursor to column 1 | 188 | set nostartofline | " when scrolling: do not move the cursor to column 1 |
180 | set notimeout ttimeout | " improves performance but is known to cause problems on slow terminals | 189 | set notimeout ttimeout | " improves performance but is known to cause problems on slow terminals |
@@ -185,7 +194,7 @@ set redrawtime=400 | " The time in milliseconds for redrawing the dis | |||
185 | set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge | 194 | set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge |
186 | set spell spelllang=en,de | " enable spell checker | 195 | set spell spelllang=en,de | " enable spell checker |
187 | set splitbelow | " open new windows below the current one (i find that more intuitive) | 196 | set splitbelow | " open new windows below the current one (i find that more intuitive) |
188 | set t_Co=256 | " required on some ssh sessions | 197 | " set t_Co=256 | " required on some ssh sessions |
189 | set textwidth=100 | " line length (80 used to be default, but...) | 198 | set textwidth=100 | " line length (80 used to be default, but...) |
190 | set thesaurus+=/home/max/.vim/thesaurus/php.txt | 199 | set thesaurus+=/home/max/.vim/thesaurus/php.txt |
191 | set ts=2 sts=2 sw=2 expandtab | " indentation which i like (abbr: tabstop, softtabstop, shiftwidth) | 200 | set ts=2 sts=2 sw=2 expandtab | " indentation which i like (abbr: tabstop, softtabstop, shiftwidth) |
@@ -224,7 +233,7 @@ if bufname('%') == '' | |||
224 | set bufhidden=wipe | 233 | set bufhidden=wipe |
225 | endif | 234 | endif |
226 | 235 | ||
227 | " noautocmd | 236 | noautocmd |
228 | 237 | ||
229 | if has("autocmd") | 238 | if has("autocmd") |
230 | set modeline | " set variables specific to a file, like indentation by adding a comment | 239 | set modeline | " set variables specific to a file, like indentation by adding a comment |
@@ -283,6 +292,13 @@ if has("autocmd") | |||
283 | autocmd FileType vim setlocal keywordprg=:help |. | 292 | autocmd FileType vim setlocal keywordprg=:help |. |
284 | augroup END | 293 | augroup END |
285 | 294 | ||
295 | |||
296 | augroup ChangeCursor | ||
297 | autocmd VimEnter * let &t_EI .= "\<Esc>[0 q" | ||
298 | autocmd VimEnter * let &t_SI = "\<Esc>]12;white\x7" | ||
299 | autocmd VimLeave * silent !echo -ne "\033]112\007" | ||
300 | augroup END | ||
301 | |||
286 | "set omnifunc=syntaxcomplete#Complete | 302 | "set omnifunc=syntaxcomplete#Complete |
287 | " au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main | 303 | " au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main |
288 | " Enable omni completion. | 304 | " Enable omni completion. |
@@ -303,7 +319,11 @@ endif | |||
303 | 319 | ||
304 | 320 | ||
305 | let base16colorspace=256 | 321 | let base16colorspace=256 |
306 | colorscheme base16-phd | 322 | if filereadable(expand("~/.vimrc_background")) |
323 | source ~/.vimrc_background | ||
324 | else | ||
325 | colorscheme base16-phd | ||
326 | endif | ||
307 | " colorscheme base16-embers | 327 | " colorscheme base16-embers |
308 | " colorscheme base16-flat | 328 | " colorscheme base16-flat |
309 | " colorscheme base16-summerfruit-dark | 329 | " colorscheme base16-summerfruit-dark |