aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2017-06-09 17:29:36 +0200
committerMax Christian Pohle2017-06-09 17:29:36 +0200
commitdede3ace49e934280e01f30050ce980b57a6a4d9 (patch)
tree16639d9989d9e571e464a9ec8bf688a940cbbfae
parentb35546eff796d4cbdb5a857725e2e4e81a510db1 (diff)
downloadvim-karlmarks-dede3ace49e934280e01f30050ce980b57a6a4d9.tar.bz2
vim-karlmarks-dede3ace49e934280e01f30050ce980b57a6a4d9.zip
tried
-rw-r--r--vimrc-full19
1 files changed, 12 insertions, 7 deletions
diff --git a/vimrc-full b/vimrc-full
index ebe3134..1344f7e 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -68,7 +68,7 @@ set winminwidth=30 | " (and all other windows, so TODO: watch out)
68set tags+=../tags 68set 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
71set updatetime=100 | " updates the screen more often 71set updatetime=10 | " updates the screen more often
72set viminfo+=% | " restore buffer list 72set viminfo+=% | " restore buffer list
73set writedelay=0 73set writedelay=0
74set wildmenu | " use a menu in the command line 74set 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
661function! HighlightWordUnderCursor() 661function! 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
667endfunction 673endfunction
668
669autocmd! CursorHold,CursorHoldI * call HighlightWordUnderCursor() 674autocmd! 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
..