diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-13 00:14:22 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-13 00:14:22 +1300 |
commit | d3b197b7107a692744e82ef90ca539639ebb4a8b (patch) | |
tree | 94ce74a0462fa53017a19163ba3df6ea97f07f20 /vim/config/search.vim | |
parent | Merge branch 'feature/vim-plug-maint' into develop (diff) | |
parent | Limit \f mapping to normal mode (diff) | |
download | dotfiles-d3b197b7107a692744e82ef90ca539639ebb4a8b.tar.gz dotfiles-d3b197b7107a692744e82ef90ca539639ebb4a8b.zip |
Merge branch 'feature/vimrc-rev' into develop
* feature/vimrc-rev:
Limit \f mapping to normal mode
Move 'hlsearch' insert-mode suspension into plugin
Separate g:loaded/&cp tests from feat tests
Use :set not :setlocal for 'hlsearch'/'incsearch'
Correct nonexistent 'wildmode' value in Vim config
Document each 'backspace' flag in Vim config
Diffstat (limited to 'vim/config/search.vim')
-rw-r--r-- | vim/config/search.vim | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/vim/config/search.vim b/vim/config/search.vim index 69f3f472..fc861801 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 @@ -20,18 +20,4 @@ if has('extra_search') \ <C-L> \ :<C-U>nohlsearch<CR><C-L> - " Clear search highlighting as soon as I enter insert mode, and restore it - " once I leave it - if has('autocmd') && v:version >= 701 - augroup dotfiles_highlight - autocmd! - autocmd InsertEnter - \ * - \ setlocal nohlsearch - autocmd InsertLeave - \ * - \ setlocal hlsearch - augroup END - endif - endif |