From e486cec399b3fc1147928b7c7e9dadc230fc6742 Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Sun, 3 Feb 2019 18:34:34 +1300 Subject: VIM: update vim config * no mouse * search highlight * incremental search * save edit location * enable modelines * turn on filetype detection Signed-off-by: Mike Beattie --- .vimrc | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.vimrc b/.vimrc index e78de8e..8d7e6cc 100644 --- a/.vimrc +++ b/.vimrc @@ -24,19 +24,19 @@ endif " If using a dark background within the editing area and syntax highlighting " turn on this option as well -"set background=dark +set background=dark " Uncomment the following to have Vim jump to the last position when " reopening a file -"if has("autocmd") -" au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif -"endif +if has("autocmd") + au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif +endif " Uncomment the following to have Vim load indentation rules and plugins " according to the detected filetype. -"if has("autocmd") -" filetype plugin indent on -"endif +if has("autocmd") + filetype plugin indent on +endif " The following are commented out as they cause vim to behave a lot " differently from regular Vi. They are highly recommended though. @@ -44,10 +44,13 @@ endif "set showmatch " Show matching brackets. "set ignorecase " Do case insensitive matching "set smartcase " Do smart case matching -"set incsearch " Incremental search +set incsearch " Incremental search +set hlsearch " Highlight search results "set autowrite " Automatically save before commands like :next and :make "set hidden " Hide buffers when they are abandoned "set mouse=a " Enable mouse usage (all modes) +set mouse= " Disable mouse usage (all modes) +set modeline " Enable modelines " Source a global configuration file if available if filereadable("/etc/vim/vimrc.local") -- cgit v1.2.3