aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Info.txt5
-rw-r--r--nohlslash.vim17
2 files changed, 22 insertions, 0 deletions
diff --git a/Info.txt b/Info.txt
new file mode 100644
index 0000000..7e2c7b3
--- /dev/null
+++ b/Info.txt
@@ -0,0 +1,5 @@
+vim-nohlslash
+
+Invoke search (`/`) and automatically :nohlsearch after executing it. There's
+no autocmd for "after search", though, so the current method isn't going to
+work.
diff --git a/nohlslash.vim b/nohlslash.vim
new file mode 100644
index 0000000..9088cd1
--- /dev/null
+++ b/nohlslash.vim
@@ -0,0 +1,17 @@
+let s:nohlslash = 0
+
+function! s:setup_nohlslash()
+ let s:nohlslash = !s:nohlslash
+endfunction
+
+nnoremap <silent> <leader>a :call <SID>setup_nohlslash()<cr>
+
+
+augroup nohlslash
+ autocmd!
+ autocmd CmdwinLeave *
+ \ if s:nohlslash |
+ \ echom 'test'
+ \ nohlsearch
+ \ endif
+augroup END