diff options
author | Mike Beattie <mike@ethernal.org> | 2019-02-03 18:34:34 +1300 |
---|---|---|
committer | Mike Beattie <mike@ethernal.org> | 2019-02-03 18:34:34 +1300 |
commit | e486cec399b3fc1147928b7c7e9dadc230fc6742 (patch) | |
tree | 57e2f92615816f3c6d23b699dd3510d56201babe | |
parent | 018539f7b7eaf874840871fdfbc15c231996a153 (diff) |
VIM: update vim config
* no mouse
* search highlight
* incremental search
* save edit location
* enable modelines
* turn on filetype detection
Signed-off-by: Mike Beattie <mike@ethernal.org>
-rw-r--r-- | .vimrc | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -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") |