aboutsummaryrefslogtreecommitdiff
path: root/runtime/pack
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-06-18 19:44:46 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-06-18 23:59:39 +0200
commit2791fd4e1722fd45fa0f4261879046e8d397645a (patch)
tree05cffe3e28cf3af00a68add133b1999c11a0c691 /runtime/pack
parent4e8ec4900eb9fdc2a864e65d3de73c51e963abd0 (diff)
downloadrneovim-2791fd4e1722fd45fa0f4261879046e8d397645a.tar.gz
rneovim-2791fd4e1722fd45fa0f4261879046e8d397645a.tar.bz2
rneovim-2791fd4e1722fd45fa0f4261879046e8d397645a.zip
vim-patch:26de90c: runtime(nohlsearch): include the the simple nohlsearch package
fixes: vim/vim#15039 closes: vim/vim#15042 https://github.com/vim/vim/commit/26de90c6312cf16d7a4f2b6942befb4e1f14b960 Co-authored-by: Maxim Kim <habamax@gmail.com>
Diffstat (limited to 'runtime/pack')
-rw-r--r--runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim b/runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim
new file mode 100644
index 0000000000..6cfe813cfa
--- /dev/null
+++ b/runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim
@@ -0,0 +1,14 @@
+" nohlsearch.vim: Auto turn off hlsearch
+" Last Change: 2024-06-18
+" Maintainer: Maxim Kim <habamax@gmail.com>
+"
+" turn off hlsearch after:
+" - doing nothing for 'updatetime'
+" - getting into insert mode
+augroup nohlsearch
+ au!
+ noremap <Plug>(nohlsearch) <cmd>nohlsearch<cr>
+ noremap! <expr> <Plug>(nohlsearch) execute('nohlsearch')[-1]
+ au CursorHold * call feedkeys("\<Plug>(nohlsearch)", 'm')
+ au InsertEnter * call feedkeys("\<Plug>(nohlsearch)", 'm')
+augroup END