summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-11-06 06:42:55 -0800
committerKaz Kylheku <kaz@kylheku.com>2018-11-06 06:42:55 -0800
commit622e55fa4362a72cf564bd0f1be4d27af97535da (patch)
tree240cb69235777717ea8c2da5846843d4c151cebd
parent78adfeec72a4fc2ebfd83871fe8552a2573f87ef (diff)
downloadtxr-622e55fa4362a72cf564bd0f1be4d27af97535da.tar.gz
txr-622e55fa4362a72cf564bd0f1be4d27af97535da.tar.bz2
txr-622e55fa4362a72cf564bd0f1be4d27af97535da.zip
vim: colorize hash bang for Lisp.
* genvim.txr: generate the txr_hashbang match in both txr.vim and tl.vim, not only txr.vim. Use Vim's \% regex operator to match only in the first line of a file.
-rw-r--r--genvim.txr3
1 files changed, 2 insertions, 1 deletions
diff --git a/genvim.txr b/genvim.txr
index 6258da68..74e892bc 100644
--- a/genvim.txr
+++ b/genvim.txr
@@ -94,7 +94,6 @@ syn match txr_error "@at\\[xo]"
syn match txr_char "@at\\x[@hex]\+;\?"
syn match txr_char "@at\\[@oct]\+;\?"
syn match txr_regdir "@at/\(\\/\|[^/]\|\\\n\)*/"
-syn match txr_hashbang "^#!.*"
@ (end)
@ (end)
@ (output :continue out)
@@ -117,6 +116,8 @@ syn match txr_chr "#\\[^ \t\n@alnum]"@(if txr-p " contained")
syn match txr_chr "#\\[@alnum]\+"@(if txr-p " contained")
syn match txr_ncomment ";.*"@(if txr-p " contained")
+syn match txr_hashbang "\%^#!.*"
+
syn match txr_dot "\." contained
syn match txr_ident "[@alnum@glyph]*[@alpha@glyph^][@alnum@glyph^]*" contained
syn match tl_ident "[:@@][@alnum@glyph^/]\+"@(if txr-p " contained")