aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-05-30 23:09:50 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-05-30 23:09:50 +1200
commitaa9ecbab88463c6d75e07b9970fae261e55d0c62 (patch)
treecf6ef9ef51c5fa3917565a2012915114222deb63
parent9f8d61fde99f0c073952c8f603ff8fd3023df7bc (diff)
parent51f470873f2f5b2ff60a07424ac8818175773278 (diff)
downloaddotfiles-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
-rw-r--r--.gitmodules18
-rw-r--r--Makefile7
-rw-r--r--VERSION4
m---------vim/bundle/insert_suspend_hlsearch0
-rw-r--r--vim/doc/insert_suspend_hlsearch.txt28
-rw-r--r--vim/plugin/copy_linebreak.vim4
-rw-r--r--vim/plugin/insert_suspend_hlsearch.vim47
7 files changed, 16 insertions, 92 deletions
diff --git a/.gitmodules b/.gitmodules
index 7371c759..90217ff7 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,18 +1,24 @@
+# My Vim plugins
+[submodule "vim/bundle/insert_suspend_hlsearch"]
+ path = vim/bundle/insert_suspend_hlsearch
+ url = https://sanctum.geek.nz/code/vim-insert-suspend-hlsearch.git
+[submodule "vim/bundle/juvenile"]
+ path = vim/bundle/juvenile
+ url = https://sanctum.geek.nz/code/vim-juvenile.git
+[submodule "vim/bundle/sahara"]
+ path = vim/bundle/sahara
+ url = https://sanctum.geek.nz/code/vim-sahara.git
+
+# Others' Vim plugins
[submodule "vim/bundle/abolish"]
path = vim/bundle/abolish
url = https://sanctum.geek.nz/clone/vim-abolish.git
[submodule "vim/bundle/commentary"]
path = vim/bundle/commentary
url = https://sanctum.geek.nz/clone/vim-commentary.git
-[submodule "vim/bundle/juvenile"]
- path = vim/bundle/juvenile
- url = https://sanctum.geek.nz/code/vim-juvenile.git
[submodule "vim/bundle/repeat"]
path = vim/bundle/repeat
url = https://sanctum.geek.nz/clone/vim-repeat.git
-[submodule "vim/bundle/sahara"]
- path = vim/bundle/sahara
- url = https://sanctum.geek.nz/code/vim-sahara.git
[submodule "vim/bundle/surround"]
path = vim/bundle/surround
url = https://sanctum.geek.nz/clone/vim-surround.git
diff --git a/Makefile b/Makefile
index c194dc9e..def064d6 100644
--- a/Makefile
+++ b/Makefile
@@ -83,7 +83,6 @@
dist-vim-plugin-command-typos \
dist-vim-plugin-copy-linebreak \
dist-vim-plugin-fixed-join \
- dist-vim-plugin-insert-suspend-hlsearch \
dist-vim-plugin-mail-mutt \
dist-vim-plugin-strip-trailing-whitespace \
dist-vim-plugin-toggle-option-flag
@@ -680,7 +679,6 @@ dist-vim-plugin: dist-vim-plugin-auto-backupdir \
dist-vim-plugin-copy-linebreak \
dist-vim-plugin-detect-background \
dist-vim-plugin-fixed-join \
- dist-vim-plugin-insert-suspend-hlsearch \
dist-vim-plugin-mail-mutt \
dist-vim-plugin-strip-trailing-whitespace \
dist-vim-plugin-toggle-option-flag
@@ -725,11 +723,6 @@ dist-vim-plugin-fixed-join: \
vim/doc/fixed_join.txt \
VERSION
sh dist/vim-plugin.sh fixed_join
-dist-vim-plugin-insert-suspend-hlsearch: \
- vim/plugin/insert_suspend_hlsearch.vim \
- vim/doc/insert_suspend_hlsearch.txt \
- VERSION
- sh dist/vim-plugin.sh insert_suspend_hlsearch
dist-vim-plugin-mail-mutt: \
vim/plugin/mail_mutt.vim \
vim/doc/mail_mutt.txt \
diff --git a/VERSION b/VERSION
index fd7c31de..da1e5892 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v0.34.1
-Wed May 30 22:06:44 NZST 2018
+tejr dotfiles v0.35.0
+Wed May 30 11:07:48 UTC 2018
diff --git a/vim/bundle/insert_suspend_hlsearch b/vim/bundle/insert_suspend_hlsearch
new file mode 160000
+Subproject a1f580c76e5af568235cc03582f4310298be732
diff --git a/vim/doc/insert_suspend_hlsearch.txt b/vim/doc/insert_suspend_hlsearch.txt
deleted file mode 100644
index edb51e38..00000000
--- a/vim/doc/insert_suspend_hlsearch.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-*insert_suspend_hlsearch.txt* For Vim version 7.0 Last change: 2017 November 12
-
-DESCRIPTION *insert_suspend_hlsearch*
-
-This plugin quietly disables 'hlsearch' search highlighting if enabled when an
-insert operation is started, and puts it back once done, to avoid the
-distracting effect the highlighting can cause while writing.
-
-REQUIREMENTS *insert_suspend_hlsearch-requirements*
-
-This plugin is only available if 'compatible' is not set.
-
-AUTHOR *insert_suspend_hlsearch-author*
-
-Written and maintained by Tom Ryder <tom@sanctum.geek.nz>.
-
-LICENSE *insert_suspend_hlsearch-license*
-
-Licensed for distribution under the same terms as Vim itself (see |license|).
-
-DISTRIBUTION *insert_suspend_hlsearch-distribution*
-
-This plugin lives in Tom Ryder's "dotfiles" suite, and may eventually be spun
-off into a separate distribution as it solidifies and this documentation
-improves. See <https://sanctum.geek.nz/cgit/dotfiles.git/about/> for more
-information.
-
- vim:tw=78:ts=8:ft=help:norl:
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