From 2e116237083c49aab7133d57db297d8199d26e64 Mon Sep 17 00:00:00 2001 From: Keita Haga Date: Sat, 5 Mar 2011 19:58:58 +0900 Subject: [PATCH 1/2] misc/vim/syntax/factor.vim: improve factorComment match --- misc/vim/syntax/factor.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/vim/syntax/factor.vim b/misc/vim/syntax/factor.vim index 05f9f853f1..ec17dec330 100644 --- a/misc/vim/syntax/factor.vim +++ b/misc/vim/syntax/factor.vim @@ -26,8 +26,8 @@ endif syn cluster factorCluster contains=factorComment,factorFryDirective,factorKeyword,factorRepeat,factorConditional,factorBoolean,factorCompileDirective,factorString,factorTriString,factorSbuf,@factorNumber,@factorNumErr,factorDelimiter,factorChar,factorBackslash,factorLiteral,factorLiteralBlock,@factorWordOps,factorAlien,factorTuple,factorStruct syn match factorTodo /\(TODO\|FIXME\|XXX\):\=/ contained -syn match factorComment /\<#!\>.*/ contains=factorTodo -syn match factorComment /\.*/ contains=factorTodo +syn match factorComment /\<#!\>\s.*/ contains=factorTodo +syn match factorComment /\\s.*/ contains=factorTodo syn cluster factorDefnContents contains=@factorCluster,factorStackEffect,factorLiteralStackEffect,factorArray0,factorQuotation0 @@ -140,7 +140,7 @@ syn match factorStackEffect /\<( .*--.* )\>/ contained syn match factorLiteralStackEffect /\<(( .*--.* ))\>/ "adapted from lisp.vim -if exists("g:factor_norainbow") +if exists("g:factor_norainbow") syn region factorQuotation matchgroup=factorDelimiter start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/ matchgroup=factorDelimiter end=/\<\]\>/ contains=ALL else syn region factorQuotation0 matchgroup=hlLevel0 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation1,factorArray1 @@ -155,7 +155,7 @@ else syn region factorQuotation9 contained matchgroup=hlLevel9 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation0,factorArray0 endif -if exists("g:factor_norainbow") +if exists("g:factor_norainbow") syn region factorArray matchgroup=factorDelimiter start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ matchgroup=factorDelimiter end=/\<}\>/ contains=ALL else syn region factorArray0 matchgroup=hlLevel0 start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray1,factorQuotation1 From fe9661746a43fdcd2d31b510ef55dae34e4ec8d1 Mon Sep 17 00:00:00 2001 From: Keita Haga Date: Sat, 5 Mar 2011 20:43:48 +0900 Subject: [PATCH 2/2] Oops, forgot to update misc/factor.vim.fgen --- misc/factor.vim.fgen | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/factor.vim.fgen b/misc/factor.vim.fgen index 42f150ac34..c000145506 100644 --- a/misc/factor.vim.fgen +++ b/misc/factor.vim.fgen @@ -36,8 +36,8 @@ endif syn cluster factorCluster contains=factorComment,factorFryDirective,factorKeyword,factorRepeat,factorConditional,factorBoolean,factorCompileDirective,factorString,factorTriString,factorSbuf,@factorNumber,@factorNumErr,factorDelimiter,factorChar,factorBackslash,factorLiteral,factorLiteralBlock,@factorWordOps,factorAlien,factorTuple,factorStruct syn match factorTodo /\(TODO\|FIXME\|XXX\):\=/ contained -syn match factorComment /\<#!\>.*/ contains=factorTodo -syn match factorComment /\.*/ contains=factorTodo +syn match factorComment /\<#!\>\s.*/ contains=factorTodo +syn match factorComment /\\s.*/ contains=factorTodo syn cluster factorDefnContents contains=@factorCluster,factorStackEffect,factorLiteralStackEffect,factorArray0,factorQuotation0 @@ -152,7 +152,7 @@ syn match factorStackEffect /\<( .*--.* )\>/ contained syn match factorLiteralStackEffect /\<(( .*--.* ))\>/ "adapted from lisp.vim -if exists("g:factor_norainbow") +if exists("g:factor_norainbow") syn region factorQuotation matchgroup=factorDelimiter start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/ matchgroup=factorDelimiter end=/\<\]\>/ contains=ALL else syn region factorQuotation0 matchgroup=hlLevel0 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation1,factorArray1 @@ -167,7 +167,7 @@ else syn region factorQuotation9 contained matchgroup=hlLevel9 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation0,factorArray0 endif -if exists("g:factor_norainbow") +if exists("g:factor_norainbow") syn region factorArray matchgroup=factorDelimiter start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ matchgroup=factorDelimiter end=/\<}\>/ contains=ALL else syn region factorArray0 matchgroup=hlLevel0 start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray1,factorQuotation1