diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-05-30 23:09:50 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-05-30 23:09:50 +1200 |
commit | aa9ecbab88463c6d75e07b9970fae261e55d0c62 (patch) | |
tree | cf6ef9ef51c5fa3917565a2012915114222deb63 /vim/plugin | |
parent | Merge branch 'hotfix/v0.34.1' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-aa9ecbab88463c6d75e07b9970fae261e55d0c62.tar.gz dotfiles-aa9ecbab88463c6d75e07b9970fae261e55d0c62.zip |
Merge branch 'release/v0.35.0'v0.35.0
* release/v0.35.0:
Bump VERSION
Add some structure to .gitmodules
Spin off insert_suspend_hlsearch Vim plugin
Add feat requirements to hlsearch suspend doc
Tidy comments, func names for 'hlsearch' suspend
Require +extra_search feat for 'hlsearch' suspend
Remove untidy comment
Use _save suffix for option caching variable
Diffstat (limited to 'vim/plugin')
-rw-r--r-- | vim/plugin/copy_linebreak.vim | 4 | ||||
-rw-r--r-- | vim/plugin/insert_suspend_hlsearch.vim | 47 |
2 files changed, 2 insertions, 49 deletions
diff --git a/vim/plugin/copy_linebreak.vim b/vim/plugin/copy_linebreak.vim index 0924134c..a7d8a3e5 100644 --- a/vim/plugin/copy_linebreak.vim +++ b/vim/plugin/copy_linebreak.vim @@ -17,7 +17,7 @@ let g:loaded_copy_linebreak = 1 " Enable copy-friendly linebreak options function! s:CopyLinebreakEnable() setlocal nolinebreak linebreak? - let s:showbreak = &showbreak + let s:showbreak_save = &showbreak set showbreak= if exists('+breakindent') setlocal nobreakindent @@ -27,7 +27,7 @@ endfunction " Disable copy-friendly linebreak options function! s:CopyLinebreakDisable() setlocal linebreak linebreak? - let &showbreak = s:showbreak + let &showbreak = s:showbreak_save if exists('+breakindent') setlocal breakindent< endif diff --git a/vim/plugin/insert_suspend_hlsearch.vim b/vim/plugin/insert_suspend_hlsearch.vim deleted file mode 100644 index e7e2664d..00000000 --- a/vim/plugin/insert_suspend_hlsearch.vim +++ /dev/null @@ -1,47 +0,0 @@ -" -" insert_suspend_hlsearch.vim: If 'hlsearch' is enabled, switch it off when -" the user starts an insert mode operation, and back on again when they're -" done. -" -" Author: Tom Ryder <tom@sanctum.geek.nz> -" License: Same as Vim itself -" -if exists('g:loaded_insert_suspend_hlsearch') || &compatible - finish -endif -" InsertEnter isn't an autocmd event until 7.0 -if !has('autocmd') || v:version < 700 - finish -endif -let g:loaded_insert_suspend_hlsearch = 1 - -" When entering insert mode, copy the current value of the 'hlsearch' option -" into a script variable; if it's enabled, suspend it -function s:InsertEnter() - let s:hlsearch = &hlsearch - if s:hlsearch - set nohlsearch - endif - return -endfunction - -" When leaving insert mode, if 'hlsearch' was enabled when this operation -" started, restore it -function s:InsertLeave() - if s:hlsearch - set hlsearch - endif - return -endfunction - -" Clear search highlighting as soon as I enter insert mode, and restore it -" once I leave it -augroup insert_suspend_hlsearch - autocmd! - autocmd InsertEnter - \ * - \ call <SID>InsertEnter() - autocmd InsertLeave - \ * - \ call <SID>InsertLeave() -augroup END |