aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-08 21:04:06 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-08 21:04:06 +1200
commite3d1467a0c4bb10effd012e87f53a8c93a17ee60 (patch)
tree095b53efe2541af53afd975f7cca09b2c36fe034
parentAdd patterns for Vim help file detection (diff)
downloaddotfiles-e3d1467a0c4bb10effd012e87f53a8c93a17ee60.tar.gz
dotfiles-e3d1467a0c4bb10effd012e87f53a8c93a17ee60.zip
Disable concealing when editing Vim help
-rw-r--r--vim/after/ftplugin/help.vim21
1 files changed, 21 insertions, 0 deletions
diff --git a/vim/after/ftplugin/help.vim b/vim/after/ftplugin/help.vim
new file mode 100644
index 00000000..ad6b572c
--- /dev/null
+++ b/vim/after/ftplugin/help.vim
@@ -0,0 +1,21 @@
+" Extra configuration for 'help' filetypes
+if exists('b:did_ftplugin_after') || &compatible
+ finish
+endif
+if v:version < 700
+ finish
+endif
+if &filetype !=# 'help'
+ finish
+endif
+let b:did_ftplugin_after = 1
+let b:undo_ftplugin = b:undo_ftplugin
+ \ . '|unlet b:did_ftplugin_after'
+
+" If the buffer is modifiable and writable, we're writing documentation, not
+" reading it; don't conceal characters
+if &modifiable && !&readonly
+ setlocal conceallevel=0
+ let b:undo_ftplugin = b:undo_ftplugin
+ \ . '|setlocal conceallevel'
+endif