From a31b1d6b6c8db8405723229e54f7295a9c958a0c Mon Sep 17 00:00:00 2001 From: Daniel Sissom Date: Fri, 11 Oct 2019 17:44:16 -0500 Subject: [PATCH] Turned on vim search highlighting with shortcut to turn off after. --- vim/vimrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vim/vimrc b/vim/vimrc index cb18a89..9cf8b35 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -54,7 +54,8 @@ set smartcase " Do smart case matching "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 nohlsearch " Turn off search highlighting +"set nohlsearch " Turn off search highlighting +set hlsearch " Turn on search highlighting "set expandtab " Turn tabs to spaces set shiftwidth=4 " Auto-indent amount when using cindent, <<, >>, etc. set softtabstop=4 " How many spaces represent a tab @@ -68,6 +69,9 @@ set nf=octal,hex,alpha " additional ctrl-a increments set spell spelllang=en_us " Set spell check language set scrolloff=5 " Add visible lines beyond cursor at top or bottom of window +" Turn off search highlighting with Enter +nnoremap :nohlsearch + noremap n nzz noremap N Nzz noremap * *zz