X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/9d62829c2f7a8b61a2aae16fbe69d9c2c1fb71a3..7c570bf386b055563f689fb3c424af29227db8e6:/misc/halibut.vim diff --git a/misc/halibut.vim b/misc/halibut.vim index 42f6d14..c08f4c8 100644 --- a/misc/halibut.vim +++ b/misc/halibut.vim @@ -3,7 +3,7 @@ " Maintainer: Jacob Nevins " URL: http://www.chiark.greenend.org.uk/~sgtatham/halibut/ " Filenames: *.but -" Version: $Id: halibut.vim,v 1.8 2004/04/01 23:41:38 jtn Exp $ +" Version: $Id: halibut.vim,v 1.11 2004/06/19 13:27:52 jacob Exp $ " I've never been entirely comfortable with vim's syntax highlighting " facilities, so this may have all sorts of nasty loose ends, corner cases @@ -60,7 +60,7 @@ syn region butQLEmph matchgroup=butCmdSpecific start="\\e\_s\@=" matchgroup=NO syn match butQLEmphInv "\S\@=[^bi]" contained " Paragraph level comment -- might need to come before inline comment. -syn region butCommentPara start="\\#\_s\@=" end="^\s*$" contains=butTodo +syn region butCommentPara start="\\#" end="^\s*$" contains=butTodo " Inline comments -- nested braces are honoured. syn region butComment matchgroup=Comment start="\\#{" skip="\\}" end="}" contains=butCommentBrace,butTodo @@ -91,17 +91,17 @@ syn match butCmdSpecific "\\define{\@=" nextgroup=butIdentArg " Specific inline commands " (Some of these are defined out of paranoia about clashes with code quotes.) +" Indexing -- invisible entries. (includes \I\c, \I\cw; \I\e left) +syn match butCmdSpecific "\\I\(\\cw\|\\c\)\={\@=" nextgroup=butIndexArg " Formatting. syn match butCmdSpecific "\\e{\@=" nextgroup=butEmphArg syn match butCmdSpecific "\\c{\@=" nextgroup=butTextArg syn match butCmdSpecific "\\cw{\@=" nextgroup=butTextArg syn match butCmdSpecific "\\W{\@=" nextgroup=butHyperArg -" Indexing -- invisible entries. -syn match butCmdSpecific "\\I{\@=" nextgroup=butIndexArg " Xref commands syn match butCmdSpecific "\\[kK]{\@=" nextgroup=butIdentArg " Unicode literal -- a bit special. -syn match butLiteral "\\u\x*" nextgroup=butTextArg +syn match butLiteral "\\u\x\{,4}" nextgroup=butTextArg " Command cluster. syn cluster butCmd contains=butCmdGeneric,butCmdSpecific,butComment,butQuoteLit,butQLEmph,butCommentPara,butLiteral