~cricket/ckt-kak

9c3a58d5c2d495f16ad7117da9164142728a29ed — c piapiac 3 months ago 731b94e trunk
remove single quoted strings
1 files changed, 3 insertions(+), 6 deletions(-)

M rc/ckt.kak
M rc/ckt.kak => rc/ckt.kak +3 -6
@@ 23,8 23,7 @@ provide-module ckt %{
add-highlighter shared/ckt               regions
add-highlighter shared/ckt/code          default-region group
add-highlighter shared/ckt/comment       region '#'  '$'        fill comment
add-highlighter shared/ckt/string-double region '"'  '(?<!\\)"' fill string
add-highlighter shared/ckt/string-single region "'"  "(?<!\\)'" fill string
add-highlighter shared/ckt/string        region '"'  '(?<!\\)"' fill string
add-highlighter shared/ckt/multiline     region '\|' '$'        fill string

add-highlighter shared/ckt/code/ regex [^\;,\n]+(?==) 0:keyword


@@ 36,10 35,8 @@ define-command -hidden ckt-trim-indent %{

define-command -hidden ckt-indent-on-new-line %{
    evaluate-commands -draft -itersel %{
        # copy comment prefix and following whitespace
        try %( execute-keys -draft k <a-x> s ^\h*\K#\h* <ret> y gh j P )
        # copy multiline string prefix, and not following whitespace
        try %( execute-keys -draft k <a-x> s ^\h*\K\| <ret> y gh j P )
        # copy comment prefix and following whitespace or multiline string prefix
        try %( execute-keys -draft k <a-x> s ^\h*\K(#\h*|\|) <ret> y gh j P )
        # preserve previous line indent
        try %( execute-keys -draft <semicolon> K <a-&> )
        # filter previous line