summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-08-30 23:36:18 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-08-30 23:36:18 -0700
commitf1295b8872acb2b328ccb285fb58178d4fe68d59 (patch)
tree7076da4957ce551d63900c68b2b7db7bdb438762
parentbeeec4bb9a1dcdda645cf00b47094205f47a8c45 (diff)
downloadtxr-f1295b8872acb2b328ccb285fb58178d4fe68d59.tar.gz
txr-f1295b8872acb2b328ccb285fb58178d4fe68d59.tar.bz2
txr-f1295b8872acb2b328ccb285fb58178d4fe68d59.zip
vim: improvement in #; comment.
* genvim.txr (txr_ign_par, txr_ign_bkt): Add ^ and @ as valid prefix characters so brackets or parens preceded by these are commented out. Remove redundant txr_ign_bkt region that is identical to the previous line.
-rw-r--r--genvim.txr5
1 files changed, 2 insertions, 3 deletions
diff --git a/genvim.txr b/genvim.txr
index 2b12647c..add0000b 100644
--- a/genvim.txr
+++ b/genvim.txr
@@ -190,9 +190,8 @@ syn region txr_regex @(if txr-p "contained ")start="/" skip=+\\\n+ end="[/\n]" c
syn region tl_regex @(if txr-p "contained ")start="#/" skip=+\\\n+ end="[/\n]" contains=txr_regesc,txr_numesc,txr_badesc
syn region txr_buf @(if txr-p "contained ")matchgroup=txr_buf start="#b'" end="'" contains=txr_buf_interior,txr_buf_error
syn region txr_ign_tok @(if txr-p "contained ")matchgroup=Comment start="#;" end="[ \(\)\[\]]"me=e contains=@list
-syn region txr_ign_par @(if txr-p "contained ")matchgroup=Comment start="#;[ \t',]*\(#[HSRTN]\?\)\?(" matchgroup=Comment end=")" contains=txr_ign_par_interior,txr_ign_bkt_interior
-syn region txr_ign_bkt @(if txr-p "contained ")matchgroup=Comment start="#;[ \t',]*\(#[HSRTN]\?\)\?\[" matchgroup=Comment end="\]" contains=txr_ign_par_interior,txr_ign_bkt_interior
-syn region txr_ign_bkt @(if txr-p "contained ")matchgroup=Comment start="#;[ \t',]*\(#[HSRTN]\?\)\?\[" matchgroup=Comment end="\]" contains=txr_ign_par_interior,txr_ign_bkt_interior
+syn region txr_ign_par @(if txr-p "contained ")matchgroup=Comment start="#;[ \t',^@@]*\(#[HSRTN]\?\)\?(" matchgroup=Comment end=")" contains=txr_ign_par_interior,txr_ign_bkt_interior
+syn region txr_ign_bkt @(if txr-p "contained ")matchgroup=Comment start="#;[ \t',^@@]*\(#[HSRTN]\?\)\?\[" matchgroup=Comment end="\]" contains=txr_ign_par_interior,txr_ign_bkt_interior
syn region txr_ign_par_interior contained matchgroup=Comment start="(" matchgroup=Comment end=")" contains=txr_ign_par_interior,txr_ign_bkt_interior
syn region txr_ign_bkt_interior contained matchgroup=Comment start="\[" matchgroup=Comment end="\]" contains=txr_ign_par_interior,txr_ign_bkt_interior