diff options
Diffstat (limited to 'vimrc-full')
| -rw-r--r-- | vimrc-full | 19 | 
1 files changed, 12 insertions, 7 deletions
| @@ -68,7 +68,7 @@ set winminwidth=30 | " (and all other windows, so TODO: watch out) | |||
| 68 | set tags+=../tags | 68 | set tags+=../tags | 
| 69 | " set textwidth=100 | " line length (80 used to be default, but...) | 69 | " set textwidth=100 | " line length (80 used to be default, but...) | 
| 70 | " set colorcolumn= | " not used, because we have a :match directive for textwidth | 70 | " set colorcolumn= | " not used, because we have a :match directive for textwidth | 
| 71 | set updatetime=100 | " updates the screen more often | 71 | set updatetime=10 | " updates the screen more often | 
| 72 | set viminfo+=% | " restore buffer list | 72 | set viminfo+=% | " restore buffer list | 
| 73 | set writedelay=0 | 73 | set writedelay=0 | 
| 74 | set wildmenu | " use a menu in the command line | 74 | set wildmenu | " use a menu in the command line | 
| @@ -233,7 +233,7 @@ if has("python") | |||
| 233 | let g:ycm_global_ycm_extra_conf = '.ycm_extra_conf.py' | 233 | let g:ycm_global_ycm_extra_conf = '.ycm_extra_conf.py' | 
| 234 | let g:ycm_semantic_triggers = { 'c': [ 're!.' ] } | 234 | let g:ycm_semantic_triggers = { 'c': [ 're!.' ] } | 
| 235 | let g:ycm_python_binary_path = 'python' " the python interpreter of choice (for code checking) | 235 | let g:ycm_python_binary_path = 'python' " the python interpreter of choice (for code checking) | 
| 236 | let g:ycm_disable_for_files_larger_than_kb = 16384 " we have faaast computers, don't we? | 236 | " let g:ycm_disable_for_files_larger_than_kb = 16384 " we have faaast computers, don't we? | 
| 237 | 237 | ||
| 238 | " disable <tab>-key for YCM so that it can be used with ultisnips | 238 | " disable <tab>-key for YCM so that it can be used with ultisnips | 
| 239 | let g:ycm_key_list_select_completion=[] | 239 | let g:ycm_key_list_select_completion=[] | 
| @@ -659,13 +659,18 @@ let g:netrw_winsize = 20 | " window size in percent | |||
| 659 | 659 | ||
| 660 | 660 | ||
| 661 | function! HighlightWordUnderCursor() | 661 | function! HighlightWordUnderCursor() | 
| 662 | if getline(".")[col(".")-1] !~# '[[:punct:][:blank:]]' | 662 | highlight WordBold cterm=bold gui=bold | 
| 663 | exec 'match' 'Bold' '/\V\<'.expand('<cword>').'\>/' | 663 | |
| 664 | else | 664 | let l:currentword = escape(expand('<cword>'), '.') | 
| 665 | match none | 665 | exec 'syn clear' 'WordBold' | 
| 666 | if(strlen(l:currentword) > 0) | ||
| 667 | " exec '2match' 'WordBold' '/'.l:currentword.'/' | ||
| 668 | " exec 'syn match' 'WordBold' '/'.l:currentword.'/' | ||
| 669 | if getline(".")[col(".")-1] !~# '[[:punct:][:blank:]]' | ||
| 670 | exec '2match' 'Bold' '/\V\<'.l:currentword.'\>/' | ||
| 671 | endif | ||
| 666 | endif | 672 | endif | 
| 667 | endfunction | 673 | endfunction | 
| 668 | |||
| 669 | autocmd! CursorHold,CursorHoldI * call HighlightWordUnderCursor() | 674 | autocmd! CursorHold,CursorHoldI * call HighlightWordUnderCursor() | 
| 670 | 675 | ||
| 671 | " au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main | 676 | " au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main | 
