From b35546eff796d4cbdb5a857725e2e4e81a510db1 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Wed, 7 Jun 2017 17:07:25 +0200 Subject: Some code folding and current word highlighting --- vimrc-full | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/vimrc-full b/vimrc-full index 5146456..ebe3134 100644 --- a/vimrc-full +++ b/vimrc-full @@ -68,7 +68,7 @@ set winminwidth=30 | " (and all other windows, so TODO: watch out) set tags+=../tags " set textwidth=100 | " line length (80 used to be default, but...) " set colorcolumn= | " not used, because we have a :match directive for textwidth -set updatetime=1000 | " updates the screen more often +set updatetime=100 | " updates the screen more often set viminfo+=% | " restore buffer list set writedelay=0 set wildmenu | " use a menu in the command line @@ -441,6 +441,9 @@ if !has('nvim') | " settings which have been removed from neovim set ttyscroll=100 | " improves speed for terminal vim, incomp. with nvim set ttyfast | " improves speed for terminal vim (incomp. with nvim) " set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) incomp. with nvim + " + let g:loaded_ruby_provider = 1 " disable ruby support + let g:loaded_python_provider = 1 " disable pthon3 endif if has("autocmd") @@ -654,6 +657,17 @@ let g:netrw_liststyle = 3 | " 3=tree let g:netrw_preview = 0 | " let g:netrw_winsize = 20 | " window size in percent + +function! HighlightWordUnderCursor() + if getline(".")[col(".")-1] !~# '[[:punct:][:blank:]]' + exec 'match' 'Bold' '/\V\<'.expand('').'\>/' + else + match none + endif +endfunction + +autocmd! CursorHold,CursorHoldI * call HighlightWordUnderCursor() + " au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main " Enable omni completion. " autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS -- cgit v1.2.3