diff --git a/rc/base/dlang.kak b/rc/base/dlang.kak index 7ee1ccc5..25e20fc5 100644 --- a/rc/base/dlang.kak +++ b/rc/base/dlang.kak @@ -53,16 +53,16 @@ addhl -group /dlang/code regex "\<(this)\>\s*[^(]" 1:value decorators="disable|property|nogc|safe|trusted|system" # Add the language's grammar to the static completion list - sed 's,|,:,g' <<< "hook global WinSetOption filetype=dlang %{ + printf %s "hook global WinSetOption filetype=dlang %{ set window static_words '${keywords}' set -add window static_words '${attributes}' set -add window static_words '${types}' set -add window static_words '${values}' set -add window static_words '${decorators}' - }" + }" | sed 's,|,:,g' # Highlight keywords - echo " + printf %s " addhl -group /dlang/code regex \<(${keywords})\> 0:keyword addhl -group /dlang/code regex \<(${attributes})\> 0:attribute addhl -group /dlang/code regex \<(${types})\> 0:type diff --git a/rc/base/golang.kak b/rc/base/golang.kak index e88aa8a9..1d2c994b 100644 --- a/rc/base/golang.kak +++ b/rc/base/golang.kak @@ -36,15 +36,15 @@ addhl -group /golang/code regex %{-?([0-9]*\.(?!0[xX]))?\<([0-9]+|0[xX][0-9a-fA- values="false|true|nil" # Add the language's grammar to the static completion list - sed 's,|,:,g' <<< "hook global WinSetOption filetype=golang %{ + printf %s "hook global WinSetOption filetype=golang %{ set window static_words '${keywords}' set -add window static_words '${attributes}' set -add window static_words '${types}' set -add window static_words '${values}' - }" + }" | sed 's,|,:,g' # Highlight keywords - echo " + printf %s " addhl -group /golang/code regex \<(${keywords})\> 0:keyword addhl -group /golang/code regex \<(${attributes})\> 0:attribute addhl -group /golang/code regex \<(${types})\> 0:type diff --git a/rc/base/makefile.kak b/rc/base/makefile.kak index a64b6fd3..db005ee4 100644 --- a/rc/base/makefile.kak +++ b/rc/base/makefile.kak @@ -27,14 +27,12 @@ addhl -group /makefile/content regex [+?:]= 0:operator keywords="ifeq|ifneq|else|endif" # Add the language's grammar to the static completion list - sed 's,|,:,g' <<< "hook global WinSetOption filetype=makefile %{ + printf %s "hook global WinSetOption filetype=makefile %{ set window static_words '${keywords}' - }" + }" | sed 's,|,:,g' # Highlight keywords - echo " - addhl -group /makefile/content regex \<(${keywords})\> 0:keyword - " + printf %s "addhl -group /makefile/content regex \<(${keywords})\> 0:keyword" } # Commands diff --git a/rc/base/perl.kak b/rc/base/perl.kak index 008e70cd..4ba6466d 100644 --- a/rc/base/perl.kak +++ b/rc/base/perl.kak @@ -44,14 +44,14 @@ addhl -group /perl/comment fill comment values="ARGV|STDERR|STDOUT|ARGVOUT|STDIN|__DATA__|__END__|__FILE__|__LINE__|__PACKAGE__" # Add the language's grammar to the static completion list - sed 's,|,:,g' <<< "hook global WinSetOption filetype=perl %{ + printf %s "hook global WinSetOption filetype=perl %{ set window static_words '${keywords}' set -add window static_words '${attributes}' set -add window static_words '${values}' - }" + }" | sed 's,|,:,g' # Highlight keywords - echo " + printf %s " addhl -group /perl/code regex \<(${keywords})\> 0:keyword addhl -group /perl/code regex \<(${attributes})\> 0:attribute addhl -group /perl/code regex \<(${values})\> 0:value diff --git a/rc/base/ruby.kak b/rc/base/ruby.kak index 1fffc57a..821e1941 100644 --- a/rc/base/ruby.kak +++ b/rc/base/ruby.kak @@ -64,15 +64,15 @@ addhl -group /ruby/code regex \<([A-Za-z]\w*:)|([$@][A-Za-z]\w*)|(\W\K:[A-Za-z]\ meta="require|include" # Add the language's grammar to the static completion list - sed 's,|,:,g' <<< "hook global WinSetOption filetype=ruby %{ + printf %s "hook global WinSetOption filetype=ruby %{ set window static_words '${keywords}' set -add window static_words '${attributes}' set -add window static_words '${values}' set -add window static_words '${meta}' - }" + }" | sed 's,|,:,g' # Highlight keywords - echo " + printf %s " addhl -group /ruby/code regex \<(${keywords})\> 0:keyword addhl -group /ruby/code regex \<(${attributes})\> 0:attribute addhl -group /ruby/code regex \<(${values})\> 0:value diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak index 067a87c1..345ba3db 100644 --- a/rc/core/c-family.kak +++ b/rc/core/c-family.kak @@ -101,14 +101,14 @@ addhl -group /c/code regex %{\|\<-?(0x[0-9a-fA-F]+|\d+)[fdiu]?|'((\\.)?|[ types="void|char|short|int|long|signed|unsigned|float|double|size_t" # Add the language's grammar to the static completion list - sed 's,|,:,g' <<< "hook global WinSetOption filetype=c %{ + printf %s "hook global WinSetOption filetype=c %{ set window static_words '${keywords}' set -add window static_words '${attributes}' set -add window static_words '${types}' - }" + }" | sed 's,|,:,g' # Highlight keywords - echo " + printf %s " addhl -group /c/code regex \<(${keywords})\> 0:keyword addhl -group /c/code regex \<(${attributes})\> 0:attribute addhl -group /c/code regex \<(${types})\> 0:type @@ -133,15 +133,15 @@ addhl -group /cpp/code regex %{\<-?(0x[0-9a-fA-F]+|\d+)[fdiu]?|'((\\.)?|[^'\\])' values="this|true|false|NULL|nullptr" # Add the language's grammar to the static completion list - sed 's,|,:,g' <<< "hook global WinSetOption filetype=cpp %{ + printf %s "hook global WinSetOption filetype=cpp %{ set window static_words '${keywords}' set -add window static_words '${attributes}' set -add window static_words '${types}' set -add window static_words '${values}' - }" + }" | sed 's,|,:,g' # Highlight keywords - echo " + printf %s " addhl -group /cpp/code regex \<(${keywords})\> 0:keyword addhl -group /cpp/code regex \<(${attributes})\> 0:attribute addhl -group /cpp/code regex \<(${types})\> 0:type @@ -165,16 +165,16 @@ addhl -group /objc/code regex %{\<-?\d+[fdiu]?|'((\\.)?|[^'\\])'} 0:value decorators="${decorators}|selector|autoreleasepool|try|catch|class|synchronized" # Add the language's grammar to the static completion list - sed 's,|,:,g' <<< "hook global WinSetOption filetype=objc %{ + printf %s "hook global WinSetOption filetype=objc %{ set window static_words '${keywords}' set -add window static_words '${attributes}' set -add window static_words '${types}' set -add window static_words '${values}' set -add window static_words '${decorators}' - }" + }" | sed 's,|,:,g' # Highlight keywords - echo " + printf %s " addhl -group /objc/code regex \<(${keywords})\> 0:keyword addhl -group /objc/code regex \<(${attributes})\> 0:attribute addhl -group /objc/code regex \<(${types})\> 0:type diff --git a/rc/core/kakrc.kak b/rc/core/kakrc.kak index 906c2168..0f7612f7 100644 --- a/rc/core/kakrc.kak +++ b/rc/core/kakrc.kak @@ -16,13 +16,13 @@ addhl -group / regions -default code kakrc \ values="default|black|red|green|yellow|blue|magenta|cyan|white" # Add the language's grammar to the static completion list - sed 's,|,:,g' <<< "hook global WinSetOption filetype=kak %{ + printf %s "hook global WinSetOption filetype=kak %{ set window static_words '${keywords}' set -add window static_words '${values}' - }" + }" | sed 's,|,:,g' # Highlight keywords - echo " + printf %s " addhl -group /kakrc/code regex \<(${keywords})\> 0:keyword addhl -group /kakrc/code regex \<(${values})\> 0:value " diff --git a/rc/core/python.kak b/rc/core/python.kak index 380c43c4..f378d7a6 100644 --- a/rc/core/python.kak +++ b/rc/core/python.kak @@ -35,22 +35,22 @@ addhl -group /python/comment fill comment types="bool|buffer|bytearray|complex|dict|file|float|frozenset|int|list|long|memoryview|object|set|str|tuple|unicode|xrange" # Add the language's grammar to the static completion list - sed 's,|,:,g' <<< "hook global WinSetOption filetype=python %{ + printf %s "hook global WinSetOption filetype=python %{ set window static_words '${values}' set -add window static_words '${meta}' set -add window static_words '${keywords}' set -add window static_words '${types}' - }" + }" | sed 's,|,:,g' # Highlight keywords - echo " + printf %s " addhl -group /python/code regex '\<(${values})\>' 0:value addhl -group /python/code regex '\<(${meta})\>' 0:meta addhl -group /python/code regex '\<(${keywords})\>' 0:keyword " # Highlight types, when they are not used as constructors - echo "addhl -group /python/code regex '\<(${types})\>[^(]' 1:type" + printf %s "addhl -group /python/code regex '\<(${types})\>[^(]' 1:type" } # Commands diff --git a/rc/core/sh.kak b/rc/core/sh.kak index 4111e6a5..facf40ca 100644 --- a/rc/core/sh.kak +++ b/rc/core/sh.kak @@ -24,14 +24,12 @@ addhl -group /sh/comment fill comment keywords="${keywords}|time|type|typeset|ulimit|unalias|until|while" # Add the language's grammar to the static completion list - sed 's,|,:,g' <<< "hook global WinSetOption filetype=sh %{ + printf %s "hook global WinSetOption filetype=sh %{ set window static_words '${keywords}' - }" + }" | sed 's,|,:,g' # Highlight keywords - echo " - addhl -group /sh/code regex \<(${keywords})\> 0:keyword - " + printf %s "addhl -group /sh/code regex \<(${keywords})\> 0:keyword" } addhl -group /sh/code regex [\[\]\(\)&|]{2}|\[\s|\s\] 0:operator