aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-12 23:37:31 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-12 23:37:31 +1300
commitc9cbeacdd2eb87200e7f43721adf3d61e804bde3 (patch)
treef8dba5843e575212da408bdd4af27e47b20ab453
parentCorrect nonexistent 'wildmode' value in Vim config (diff)
downloaddotfiles-c9cbeacdd2eb87200e7f43721adf3d61e804bde3.tar.gz
dotfiles-c9cbeacdd2eb87200e7f43721adf3d61e804bde3.zip
Use :set not :setlocal for 'hlsearch'/'incsearch'
They don't have local analogues; they're global options.
-rw-r--r--vim/config/search.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/vim/config/search.vim b/vim/config/search.vim
index 69f3f472..967146d4 100644
--- a/vim/config/search.vim
+++ b/vim/config/search.vim
@@ -5,13 +5,13 @@ if has('extra_search')
set incsearch
nnoremap <silent>
\ <Leader>i
- \ :<C-U>setlocal incsearch! incsearch?<CR>
+ \ :<C-U>set incsearch! incsearch?<CR>
" Highlight search results, \h toggles this
set hlsearch
nnoremap <silent>
\ <Leader>h
- \ :<C-U>setlocal hlsearch! hlsearch?<CR>
+ \ :<C-U>set hlsearch! hlsearch?<CR>
" Pressing ^L will clear highlighting until the next search-related
" operation; quite good because the highlighting gets distracting after
@@ -27,10 +27,10 @@ if has('extra_search')
autocmd!
autocmd InsertEnter
\ *
- \ setlocal nohlsearch
+ \ set nohlsearch
autocmd InsertLeave
\ *
- \ setlocal hlsearch
+ \ set hlsearch
augroup END
endif