From 3785f762fcc44595a6197cb9644b8f49b126536f Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 11 Aug 2022 15:32:02 +0200 Subject: [PATCH] syntax: nanorc: colorize valid function names plus surrounding braces --- syntax/nanorc.nanorc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/syntax/nanorc.nanorc b/syntax/nanorc.nanorc index 9d7d9c0e..91597e26 100644 --- a/syntax/nanorc.nanorc +++ b/syntax/nanorc.nanorc @@ -25,6 +25,16 @@ color brightgreen "^[[:blank:]]*(syntax[[:blank:]]+[^[:space:]]+|(formatter|lint # Strings color brightmagenta "[[:blank:]](start=)?".+"" +# Function names in string binds +color crimson "\{(help|cancel|exit|savefile|writeout|discardbuffer|insert|where(is|was)|find(previous|next|bracket)|replace)\}" +color crimson "\{(cut|copy|paste|zap|chopword(left|right)|cutrestoffile|execute|mark|speller|linter|formatter|(full)?justify)\}" +color crimson "\{(location|gotoline|(begin|end)para|comment|complete|(un)?indent|wordcount|(record|run)macro|anchor|undo|redo)\}" +color crimson "\{(left|right|up|down|home|end|(scroll|page)(up|down)|center|(prev|next)(word|block|anchor|buf))\}" +color crimson "\{(tab|enter|delete|backspace|verbatim|refresh|suspend|casesens|regexp|backwards|older|newer|(dos|mac)format)\}" +color crimson "\{(append|prepend|backup|flip(goto|replace|execute|pipe|convert|newbuffer)|browser|gotodir|(first|last)(file|line))\}" +color crimson "\{(nohelp|constantshow|softwrap|linenumbers|whitespacedisplay|nosyntax|zero)\}" +color crimson "\{(smarthome|autoindent|cutfromcursor|breaklonglines|tabstospaces|mouse|\{)\}" + # Commands color green "^[[:blank:]]*((un)?(bind|set)|include|syntax|header|magic|comment|formatter|linter|tabgives|extendsyntax)\>" color magenta "^[[:blank:]]*i?color\>|[[:blank:]](start=|end=)"