summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/ctrlh.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-06-13 20:20:40 +0000
committerBram Moolenaar <Bram@vim.org>2004-06-13 20:20:40 +0000
commit071d4279d6ab81b7187b48f3a0fc61e587b6db6c (patch)
tree221cbe3c40e043163c06f61c52a7ba2eb41e12ce /runtime/syntax/ctrlh.vim
parentb4210b3bc14e2918f153a7307530fbe6eba659e1 (diff)
updated for version 7.0001v7.0001
Diffstat (limited to 'runtime/syntax/ctrlh.vim')
-rw-r--r--runtime/syntax/ctrlh.vim33
1 files changed, 33 insertions, 0 deletions
diff --git a/runtime/syntax/ctrlh.vim b/runtime/syntax/ctrlh.vim
new file mode 100644
index 0000000000..715c2c00ee
--- /dev/null
+++ b/runtime/syntax/ctrlh.vim
@@ -0,0 +1,33 @@
+" Vim syntax file
+" Language: CTRL-H (e.g., ASCII manpages)
+" Maintainer: Bram Moolenaar <Bram@vim.org>
+" Last Change: 2001 Apr 25
+
+" Existing syntax is kept, this file can be used as an addition
+
+" Recognize underlined text: _^Hx
+syntax match CtrlHUnderline /_\b./ contains=CtrlHHide
+
+" Recognize bold text: x^Hx
+syntax match CtrlHBold /\(.\)\b\1/ contains=CtrlHHide
+
+" Hide the CTRL-H (backspace)
+syntax match CtrlHHide /.\b/ contained
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_ctrlh_syntax_inits")
+ if version < 508
+ let did_ctrlh_syntax_inits = 1
+ hi link CtrlHHide Ignore
+ hi CtrlHUnderline term=underline cterm=underline gui=underline
+ hi CtrlHBold term=bold cterm=bold gui=bold
+ else
+ hi def link CtrlHHide Ignore
+ hi def CtrlHUnderline term=underline cterm=underline gui=underline
+ hi def CtrlHBold term=bold cterm=bold gui=bold
+ endif
+endif
+
+" vim: ts=8