aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vimrc-full155
1 files changed, 89 insertions, 66 deletions
diff --git a/vimrc-full b/vimrc-full
index b7b4ada..f4f6f29 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -1,4 +1,4 @@
1" vim: tabstop=2 softtabstop=2 shiftwidth=2 textwidth=160 1" vim: tabstop=2 softtabstop=2 shiftwidth=2 textwidth=160 colorcolum=120
2 2
3set t_Co=256 | " required on some ssh sessions 3set t_Co=256 | " required on some ssh sessions
4" set background=light | " 4" set background=light | "
@@ -91,14 +91,16 @@ nnoremap <F9> :TagbarToggle<CR>| " bind TagBar to Hotkey Ct
91Plug 'vim-airline/vim-airline' | " beautification of the mode line 91Plug 'vim-airline/vim-airline' | " beautification of the mode line
92set laststatus=2 | " required by AirLine, without status line does not appear until a window split 92set laststatus=2 | " required by AirLine, without status line does not appear until a window split
93set background=light 93set background=light
94let g:airline_extensions = ['tabline', 'branch', 'syntastic', 'whitespace'] 94let g:airline_extensions = ['tabline', 'branch', 'syntastic', 'whitespace', 'ycm']
95let b:airline_whitespace_checks = ['indent', 'trailing', 'long', 'mixed-indent-file'] 95let b:airline_whitespace_checks = ['indent', 'trailing', 'long', 'mixed-indent-file']
96" let g:airline_section_c = "" | " was: %F 96let g:airline_section_c = "" | " was: %F
97let g:airline#extensions#tagbar#flags = 'f' | " even though the airline extension is off this controls :h tagbar-extend 97let g:airline#extensions#tagbar#flags = 'f' | " even though the airline extension is off this controls :h tagbar-extend
98let g:airline#extensions#tabline#left_sep = ' ' 98let g:airline#extensions#tabline#left_alt_sep = ''
99let g:airline#extensions#tabline#left_alt_sep = ' | ' 99let g:airline#extensions#tabline#left_sep = ''
100let g:airline#extensions#tabline#fnamemod = ':t:.' | " let airline just show the filename without its path 100let g:airline#extensions#tabline#right_alt_sep = ''
101let g:airline#extensions#tabline#disable_refresh = 1 | 101let g:airline#extensions#tabline#right_sep = ''
102let g:airline#extensions#tabline#fnamemod = ':t' | " let airline just show the filename without its path
103let g:airline#extensions#tabline#disable_refresh = 0 |
102let g:airline#extensions#tabline#enabled = 1 | 104let g:airline#extensions#tabline#enabled = 1 |
103let g:airline#extensions#tabline#show_buffers = 1 | 105let g:airline#extensions#tabline#show_buffers = 1 |
104let g:airline#extensions#tabline#show_tabs = 0 | 106let g:airline#extensions#tabline#show_tabs = 0 |
@@ -107,10 +109,14 @@ let g:airline#extensions#whitespace#enabled = 1 |
107let g:airline#extensions#wordcount#enabled = 0 | 109let g:airline#extensions#wordcount#enabled = 0 |
108let g:airline_detect_modified = 1 | 110let g:airline_detect_modified = 1 |
109let g:airline_detect_paste = 0 | 111let g:airline_detect_paste = 0 |
110let g:airline_exclude_preview = 1 | 112let g:airline_exclude_preview = 0 |
111let g:airline_inactive_collapse = 1 | 113let g:airline_inactive_collapse = 1 |
112let g:airline_powerline_fonts = 1 | 114let g:airline_powerline_fonts = 1 |
113let g:airline_skip_empty_sections = 1 | 115let g:airline_skip_empty_sections = 1 |
116" fixes unneccessary redraw, when e.g. opening Gundo window
117let airline#extensions#tabline#ignore_bufadd_pat =
118 \ '\c\vgundo|undotree|vimfiler|tagbar|nerd_tree|preview|^$'
119
114" AIRLINE_Theme: 120" AIRLINE_Theme:
115Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme 121Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme
116let base16colorspace=256 122let base16colorspace=256
@@ -135,62 +141,65 @@ Plug 'SirVer/ultisnips' " replaces loremipsum (and many m
135"let g:UltiSnipsJumpBackwardTrigger = '<PageUp>'| " \ 141"let g:UltiSnipsJumpBackwardTrigger = '<PageUp>'| " \
136"let g:UltiSnipsListSnippets = '<leader><leader>'| " YouCompleteMe includes those, so this isn't necessary 142"let g:UltiSnipsListSnippets = '<leader><leader>'| " YouCompleteMe includes those, so this isn't necessary
137" 143"
138" YouCompleteMe: ======================================================================================================
139" Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/...
140Plug 'Valloric/YouCompleteMe'
141let g:ycm_add_preview_to_completeopt = 1 " reuse existing preview window
142let g:ycm_autoclose_preview_window_after_insertion = 1
143let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file
144let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword
145let g:ycm_complete_in_comments = 1 " Completion in comments
146let g:ycm_complete_in_strings = 1 " Completion in string
147let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar
148let g:ycm_min_num_of_chars_for_completion = 1
149let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure
150let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar
151let g:ycm_confirm_extra_conf = 0 " security is overrated
152let g:ycm_key_list_select_completion = ['<Down>']
153let g:ycm_key_list_previous_completion = ['<Up>']
154let g:ycm_global_ycm_extra_conf = '~/src/ycm_extra_conf.py'
155let g:ycm_semantic_triggers = { 'c': [ 're!.' ] }
156let g:ycm_python_binary_path = 'python' " the python interpreter of choice (for code checking)
157
158" disable <tab>-key for YCM so that it can be used with ultisnips
159" let g:ycm_key_list_select_completion=[]
160" let g:ycm_key_list_previous_completion=[]
161"
162" Plug 'rdnetto/YCM-Generator' " you better use cmake to generate json build commands, like:
163" 'cmake -D CMAKE_EXPORT_COMPILE_COMMANDS=1 ..' can be used to generate a .ycm-extra.conf compatible json file
164
165
166
167Plug 'scrooloose/syntastic'
168set statusline+=%#warningmsg#
169set statusline+=%{SyntasticStatuslineFlag()}
170let g:LatexBox_latexmk_preview_continuously = 1
171let g:LatexBox_viewer = "evince"
172let g:syntastic_always_populate_loc_list = 1
173let g:syntastic_auto_loc_list = 0
174let g:syntastic_check_on_open = 1
175let g:syntastic_check_on_wq = 0
176let g:syntastic_quiet_messages = {"type":"style"}
177" filter ( = do not display) style/formatting errors and warnings
178let g:syntastic_error_symbol = '✖'
179let g:syntastic_style_error_symbol = '✗'
180let g:syntastic_warning_symbol = '➔'
181let g:syntastic_style_warning_symbol = '≈'
182
183Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures
184let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe
185let g:jedi#show_call_signatures = 1 " which sadly does not support signatures like jedi
186let g:jedi#show_call_signatures_delay = 0
187let g:jedi#auto_vim_configure = 0
188let g:pymode_rope = 0 " https://github.com/davidhalter/jedi-vim/issues/163
189" autocmd FileType python jedi.preload_module('os', 'sys', 'math')
190" let g:pymode_options_max_line_length = 120
191" let g:syntastic_python_flake8_args='--ignore=F821,E302,E501,E241,E301'
192 144
145if has("python")
146 " YouCompleteMe: =====================================================================================================
147 " Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/...
148 Plug 'Valloric/YouCompleteMe'
149 let g:ycm_add_preview_to_completeopt = 1 " reuse existing preview window
150 let g:ycm_autoclose_preview_window_after_insertion = 1
151 let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file
152 let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword
153 let g:ycm_complete_in_comments = 1 " Completion in comments
154 let g:ycm_complete_in_strings = 1 " Completion in string
155 let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar
156 let g:ycm_min_num_of_chars_for_completion = 1
157 let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure
158 let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar
159 let g:ycm_confirm_extra_conf = 0 " security is overrated
160 let g:ycm_key_list_select_completion = ['<Down>']
161 let g:ycm_key_list_previous_completion = ['<Up>']
162 let g:ycm_global_ycm_extra_conf = '~/src/ycm_extra_conf.py'
163 let g:ycm_semantic_triggers = { 'c': [ 're!.' ] }
164 let g:ycm_python_binary_path = 'python' " the python interpreter of choice (for code checking)
165
166 " disable <tab>-key for YCM so that it can be used with ultisnips
167 " let g:ycm_key_list_select_completion=[]
168 " let g:ycm_key_list_previous_completion=[]
169 "
170 " Plug 'rdnetto/YCM-Generator' " you better use cmake to generate json build commands, like:
171 " 'cmake -D CMAKE_EXPORT_COMPILE_COMMANDS=1 ..' can be used to generate a .ycm-extra.conf compatible json file
172
173
174 " SYNTASTIC: =========================================================================================================
175 Plug 'scrooloose/syntastic'
176 set statusline+=%#warningmsg#
177 set statusline+=%{SyntasticStatuslineFlag()}
178 let g:LatexBox_latexmk_preview_continuously = 1
179 let g:LatexBox_viewer = "evince"
180 let g:syntastic_always_populate_loc_list = 1
181 let g:syntastic_auto_loc_list = 0
182 let g:syntastic_check_on_open = 1
183 let g:syntastic_check_on_wq = 0
184 let g:syntastic_quiet_messages = {"type":"style"}
185 " filter ( = do not display) style/formatting errors and warnings
186 let g:syntastic_error_symbol = '✖'
187 let g:syntastic_style_error_symbol = '✗'
188 let g:syntastic_warning_symbol = '➔'
189 let g:syntastic_style_warning_symbol = '≈'
190
191 " JEDI: ==============================================================================================================
192 Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures
193 let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe
194 let g:jedi#show_call_signatures = 1 " which sadly does not support signatures like jedi
195 let g:jedi#show_call_signatures_delay = 0
196 let g:jedi#auto_vim_configure = 0
197 let g:pymode_rope = 0 " https://github.com/davidhalter/jedi-vim/issues/163
198 " autocmd FileType python jedi.preload_module('os', 'sys', 'math')
199 " let g:pymode_options_max_line_length = 120
200 " let g:syntastic_python_flake8_args='--ignore=F821,E302,E501,E241,E301'
193 201
202endif
194 203
195 204
196call plug#end() | " all plugins are getting loaded on this line, don't remove! 205call plug#end() | " all plugins are getting loaded on this line, don't remove!
@@ -222,6 +231,7 @@ function! ExtendColorTheme()
222 highlight! link VertSplit LineNr 231 highlight! link VertSplit LineNr
223 highlight! SpellBad ctermbg=none 232 highlight! SpellBad ctermbg=none
224 highlight! SpecialKey ctermfg=19 233 highlight! SpecialKey ctermfg=19
234 highlight! WhiteSpace ctermfg=19
225endfunction 235endfunction
226autocmd ColorScheme * call ExtendColorTheme() 236autocmd ColorScheme * call ExtendColorTheme()
227 237
@@ -267,6 +277,7 @@ set complete+=i | " scan current and included files for completion
267set concealcursor=nc | " limits the display of concealed text to normal and command mode 277set concealcursor=nc | " limits the display of concealed text to normal and command mode
268set conceallevel=2 | " replace escaped chars by their utf-8 representation (useful for LaTeX) 278set conceallevel=2 | " replace escaped chars by their utf-8 representation (useful for LaTeX)
269set confirm | " asks 'do you want to save?' 279set confirm | " asks 'do you want to save?'
280set cpoptions+=P | " makes :w filename set the current buffer to filename
270set encoding=utf-8 | " set up vim's cosole encoding (not file encoding, for which there is fileencoding=) 281set encoding=utf-8 | " set up vim's cosole encoding (not file encoding, for which there is fileencoding=)
271set hidden | " allows switiching buffers even if the current buffer contains changes (displays +) 282set hidden | " allows switiching buffers even if the current buffer contains changes (displays +)
272set hlsearch | " highlights all search matches (not as performant!) 283set hlsearch | " highlights all search matches (not as performant!)
@@ -289,7 +300,7 @@ set relativenumber | " relative line numbers can speed up navigation
289set noshowmode | " because we are using some powerline derivat 300set noshowmode | " because we are using some powerline derivat
290set nostartofline | " when scrolling: do not move the cursor to column 1 301set nostartofline | " when scrolling: do not move the cursor to column 1
291set notimeout ttimeout | " improves performance but is known to cause problems on slow terminals 302set notimeout ttimeout | " improves performance but is known to cause problems on slow terminals
292set ttimeoutlen=10 | " set esc key timeout in ms- 303set ttimeoutlen=50 | " set esc key timeout in ms-
293set nowrap | " but do not (by default) wrap long lines around 304set nowrap | " but do not (by default) wrap long lines around
294set number | " turn line numbers on/off (performance decreases when they are shown) 305set number | " turn line numbers on/off (performance decreases when they are shown)
295set pumheight=8 | " Determines the maximum number of items to show in the popup menu for 306set pumheight=8 | " Determines the maximum number of items to show in the popup menu for
@@ -307,11 +318,12 @@ set winminwidth=30 | " (and all other windows, so TODO: watch out)
307set tags+=../tags 318set tags+=../tags
308" set textwidth=100 | " line length (80 used to be default, but...) 319" set textwidth=100 | " line length (80 used to be default, but...)
309set textwidth=120 | " better done with modeline 320set textwidth=120 | " better done with modeline
310set colorcolumn= | " not used, because we have a :match directive for textwidth 321" set colorcolumn= | " not used, because we have a :match directive for textwidth
311set ts=4 sts=4 sw=4 expandtab | " better done with a modeline 322set ts=4 sts=4 sw=4 expandtab | " better done with a modeline
312set updatetime=1000 | " updates the screen more often 323set updatetime=1000 | " updates the screen more often
313set writedelay=0 324set writedelay=0
314set wildmenu | " use a menu in the command line 325set wildmenu | " use a menu in the command line
326set wildmode=longest:full | " do not preselect any entry and show all possible
315"======================================================================================================================= 327"=======================================================================================================================
316 328
317" set fillchars+=stlnc:\― | " 329" set fillchars+=stlnc:\― | "
@@ -346,7 +358,8 @@ end
346 358
347if has('cscope') " compiled with cscope support? 359if has('cscope') " compiled with cscope support?
348 " http://vim.wikia.com/wiki/Cscope 360 " http://vim.wikia.com/wiki/Cscope
349 set cscopetag cscopeverbose 361 set cscopetag | " CTRL-] uses cscope instead of tags to search for the symbol
362 set cscopeverbose
350 363
351 if has('quickfix') 364 if has('quickfix')
352 set cscopequickfix=s-,c-,d-,i-,t-,e- 365 set cscopequickfix=s-,c-,d-,i-,t-,e-
@@ -429,7 +442,7 @@ if has("autocmd")
429 autocmd FileType vim setlocal keywordprg=:help |. 442 autocmd FileType vim setlocal keywordprg=:help |.
430 autocmd FileType c,cpp setlocal equalprg=clang-format 443 autocmd FileType c,cpp setlocal equalprg=clang-format
431 autocmd FileType c,cpp setlocal breakat-=- 444 autocmd FileType c,cpp setlocal breakat-=-
432 autocmd FileType c,cpp setlocal iskeyword-=_ 445 " autocmd FileType c,cpp setlocal iskeyword-=_
433 446
434 " keyboard mapping for xml alike languages 447 " keyboard mapping for xml alike languages
435 " Alt-Up : Move cursor up one tag 448 " Alt-Up : Move cursor up one tag
@@ -543,6 +556,16 @@ inoremap
543vnoremap < <gv 556vnoremap < <gv
544vnoremap > >gv 557vnoremap > >gv
545 558
559" make shift-home select to the beginning of the line
560nnoremap <s-home> v^
561nnoremap <s-end> v$
562
563nnoremap <s-down> vj
564vnoremap <s-down> j
565nnoremap <s-up> vk
566vnoremap <s-up> k
567
568
546" close current buffer with <leader>q... 569" close current buffer with <leader>q...
547nnoremap <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>. 570nnoremap <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>.
548 571
..