about summary refs log tree commit diff
path: root/Util
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2020-04-30 23:56:14 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2020-05-02 01:31:46 +0000
commitd800c3850772d0bf7ae433938e9166315cf39f6d (patch)
tree8f26699be54a9806a1f7aad04d995cdabdd7a6d3 /Util
parent34d69acbef44f654ea51d762ffdb02f5b1e8b9e1 (diff)
downloadzsh-d800c3850772d0bf7ae433938e9166315cf39f6d.tar.gz
zsh-d800c3850772d0bf7ae433938e9166315cf39f6d.tar.xz
zsh-d800c3850772d0bf7ae433938e9166315cf39f6d.zip
unposted: zyodl.vim: Use 'conceal' for some macros that expand to a single character.
Diffstat (limited to 'Util')
-rw-r--r--Util/zyodl.vim12
1 files changed, 11 insertions, 1 deletions
diff --git a/Util/zyodl.vim b/Util/zyodl.vim
index 7acd1dfaf..73cd027fd 100644
--- a/Util/zyodl.vim
+++ b/Util/zyodl.vim
@@ -12,6 +12,11 @@
 "      autocmd BufRead,BufNewFile **/Doc/Zsh/*.yo setfiletype zyodl
 " Or alternatively:
 " 1. Append the contents of Doc/Zsh/.vimrc to your .vimrc, changing «<sfile>» to «%».
+"
+" You may also wish to set:
+"     autocmd FileType zyodl setlocal conceallevel=2
+" in order to benefit from the 'conceal' behaviour for LPAR(), RPAR(), and
+" friends.
 
 "" Test case:
 "   texinode()()()()
@@ -49,7 +54,6 @@ syn region zyodlVar     start="\<var("     end=")" contains=zyodlSpecial,zyodlPa
 syn region zyodlBold    start="\<bf("      end=")" contains=zyodlSpecial,zyodlParenthetical
 syn region zyodlEmph    start="\<em("      end=")" contains=zyodlSpecial,zyodlParenthetical
 syn region zyodlIndex   start="\<.index("  end=")" contains=zyodlSpecial
-syn match  zyodlSpecial "+\?\<\(LPAR\|RPAR\|PLUS\)()"
 syn match  zyodlNumber  "\d\+"
 syn region zyodlItem    start="\<xitem(" end=")" contains=zyodlSpecial,@zyodlInline
 syn region zyodlItem    start="\<item("  end=")" contains=zyodlSpecial,@zyodlInline
@@ -70,6 +74,12 @@ syn keyword zyodlKeyword sitem nextgroup=zyodlSItemArg1
 syn region zyodlSItemArg1 oneline start="(" end=")" contains=zyodlSpecial,@zyodlInline nextgroup=zyodlSItemArg2 contained
 syn region zyodlSItemArg2 start="(" end=")" contains=zyodlSpecial,@zyodlInline contained skip="\w\@<!([^)]*)"
 
+syn keyword zyodlBullet  itemiz      conceal cchar=• 
+syn match   zyodlSpecial "\<DASH()-" conceal cchar=—
+syn match   zyodlSpecial "+\?LPAR()" conceal cchar=(
+syn match   zyodlSpecial "+\?RPAR()" conceal cchar=)
+syn match   zyodlSpecial "+\?PLUS()" conceal cchar=+
+ 
 "" Highlight groups:
 hi def link zyodlTt Constant
 hi def link zyodlVar Identifier