diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-12 23:37:31 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-12 23:37:31 +1300 |
commit | c9cbeacdd2eb87200e7f43721adf3d61e804bde3 (patch) | |
tree | f8dba5843e575212da408bdd4af27e47b20ab453 | |
parent | Correct nonexistent 'wildmode' value in Vim config (diff) | |
download | dotfiles-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.vim | 8 |
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 |