diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-05-19 11:11:31 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-05-19 11:11:31 -0700 |
commit | 68e0bbfcfce586f692b0c4671c31119152c68996 (patch) | |
tree | d509d210e5901aecc2f75369e2b11edc037a84d4 | |
parent | 0cd23a6e9b1b30238bd9abc657e375ad6755c749 (diff) | |
download | txr-68e0bbfcfce586f692b0c4671c31119152c68996.tar.gz txr-68e0bbfcfce586f692b0c4671c31119152c68996.tar.bz2 txr-68e0bbfcfce586f692b0c4671c31119152c68996.zip |
vim: syntax highlighting for format strings in quasiliteral.
* genvim.txr (fmt): New variable.
(txr_quat): Match optional fmt after at.
-rw-r--r-- | genvim.txr | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -40,6 +40,7 @@ static void dir_tables_init(void) @(bind ws "[\\t\\n ]") @(bind hex "0-9A-Fa-f") @(bind at "\\(@[ \\t]*\\)") +@(bind fmt "\\~\\([\\^<>]\\?[0-9]*\\(,[+\\-0 ]*[0-9]*\\)\\?\\)\\?[asdxXobfepi]:") @(bind alpha "A-Za-z_") @(bind alpha-noe "A-DF-Za-dfz_") @(bind alnum "A-Za-z_0-9") @@ -155,7 +156,7 @@ syn match txr_ncomment ";.*"@(if txr-p " contained") syn match txr_hashbang "\%^#!.*" -syn match txr_qat "@at" nextgroup=@{txr-qelem} contained +syn match txr_qat "@at\(@fmt\)\?" nextgroup=@{txr-qelem} contained syn match txr_dot "\." contained syn match txr_ident "[@alnum@glyph]*[@alpha@glyph^][@alnum@glyph^]*" contained syn match txr_braced_ident "\(#\?:\)\?[[@alnum@glyph^/]\+" contained |