summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/nvim/plugin/zwspace.vim21
1 files changed, 21 insertions, 0 deletions
diff --git a/.config/nvim/plugin/zwspace.vim b/.config/nvim/plugin/zwspace.vim
new file mode 100644
index 0000000..2333bdb
--- /dev/null
+++ b/.config/nvim/plugin/zwspace.vim
@@ -0,0 +1,21 @@
+if &cp || exists('g:loaded_zwspace')
+ finish
+endif
+let g:loaded_zwspace = v:true
+
+function s:ConcealZWSpaces()
+ if exists('w:zwspaces')
+ for i in w:zwspaces
+ call matchdelete(i)
+ endfor
+ unlet w:zwspaces
+ endif
+ let w:zwspaces = [
+ \ matchadd('Conceal', "\u200B"),
+ \ matchadd('Conceal', "\u200C"),
+ \ matchadd('Conceal', "\u200D"),
+ \ matchadd('Conceal', "\uFEFF"),
+ \ ]
+endfunction
+
+autocmd BufEnter * call <SID>ConcealZWSpaces()