"" A Vim syntax highlighting file for Doc/Zsh/*.yo " To try this, run: " cd Doc/Zsh && vim --cmd "source ./.vimrc" zle.yo " (This sources the file .) " " To install this permanently: " 1. Copy this file to ~/.vim/syntax/zyodl.vim " 2. Create ~/.vim/filetype.vim as explained in ":help new-filetype" case C. " 3. Add the following command to ~/.vim/filetype.vim: " autocmd BufRead,BufNewFile **/Doc/Zsh/*.yo setfiletype zyodl " Or alternatively: " 1. Append the contents of Doc/Zsh/.vimrc to your .vimrc, changing «» 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()()()() " chapter(foo) " vindex(foo) " foo tt(foo) var(foo) bf(foo) em(foo) foo " xitem(foo) " item(foo)(foo) " sitem(foo)(foo foo) " COMMENT(foo var(foo) foo) " comment(foo) " example(print *.c+LPAR()#q:s/#%+LPAR()#b+RPAR()s+LPAR()*+RPAR().c/'S${match[1]}.C'/+RPAR()) " example(zargs -- **/*(.) -- ls -l) " ifzman(zmanref(zshmisc))ifnzman(noderef(Redirection)) " LPAR()foo 42 foo+RPAR() " chapter(foo (foo) foo) " chapter(foo (foo (foo) foo) foo) bar " " sitem(foo)(foo (foo) foo) " sitem(foo)(foo (foo) foo) " " sitem(foo)(foo tt(foo) foo) # nested underline if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim "" Syntax groups: syn clear syn cluster zyodlInline contains=zyodlTt,zyodlVar,zyodlBold,zyodlEmph,zyodlCond syn region zyodlTt start="\