From 671b50bb524ecb7e7654549ab35fd1da0a184a7e Mon Sep 17 00:00:00 2001 From: Alex Leferry 2 Date: Wed, 4 Jan 2017 01:07:45 +0100 Subject: [PATCH] update command names --- README.asciidoc | 94 +++++++------- doc/manpages/highlighters.asciidoc | 82 ++++++------ doc/manpages/hooks.asciidoc | 4 +- rc/base/autowrap.kak | 2 +- rc/base/clojure.kak | 14 +- rc/base/css.kak | 28 ++-- rc/base/ctags.kak | 2 +- rc/base/d.kak | 44 +++---- rc/base/etc.kak | 62 ++++----- rc/base/fish.kak | 22 ++-- rc/base/gas.kak | 30 ++--- rc/base/git.kak | 22 ++-- rc/base/go.kak | 30 ++--- rc/base/haskell.kak | 24 ++-- rc/base/html.kak | 22 ++-- rc/base/ini.kak | 12 +- rc/base/java.kak | 18 +-- rc/base/javascript.kak | 28 ++-- rc/base/json.kak | 14 +- rc/base/julia.kak | 16 +-- rc/base/lint.kak | 8 +- rc/base/lisp.kak | 22 ++-- rc/base/lua.kak | 16 +-- rc/base/mail.kak | 12 +- rc/base/markdown.kak | 120 +++++++++--------- rc/base/perl.kak | 50 ++++---- rc/base/ruby.kak | 44 +++---- rc/base/rust.kak | 28 ++-- rc/base/scala.kak | 28 ++-- rc/base/spell.kak | 2 +- rc/base/swift.kak | 30 ++--- rc/base/yaml.kak | 22 ++-- rc/core/asciidoc.kak | 26 ++-- rc/core/c-family.kak | 68 +++++----- rc/core/diff.kak | 12 +- rc/core/grep.kak | 12 +- rc/core/kakrc.kak | 28 ++-- rc/core/make.kak | 14 +- rc/core/makefile.kak | 18 +-- rc/core/man.kak | 14 +- rc/core/python.kak | 26 ++-- rc/core/sh.kak | 24 ++-- rc/extra/autorestore.kak | 2 +- rc/extra/cabal.kak | 18 +-- rc/extra/clang.kak | 10 +- rc/extra/coffee.kak | 36 +++--- rc/extra/cucumber.kak | 18 +-- rc/extra/dockerfile.kak | 20 +-- rc/extra/exherbo.kak | 106 ++++++++-------- rc/extra/git-tools.kak | 24 ++-- rc/extra/go-tools.kak | 2 +- rc/extra/haml.kak | 22 ++-- rc/extra/hbs.kak | 26 ++-- rc/extra/jedi.kak | 2 +- rc/extra/kickstart.kak | 34 ++--- rc/extra/latex.kak | 18 +-- rc/extra/moon.kak | 24 ++-- rc/extra/php.kak | 28 ++-- rc/extra/pug.kak | 34 ++--- rc/extra/ragel.kak | 22 ++-- rc/extra/sass.kak | 26 ++-- rc/extra/scss.kak | 14 +- rc/extra/taskpaper.kak | 18 +-- rc/extra/tupfile.kak | 22 ++-- src/commands.cc | 2 +- test/highlight/regions/rc | 8 +- .../638-highlight-codepoint-with-bracket/rc | 2 +- 67 files changed, 866 insertions(+), 866 deletions(-) diff --git a/README.asciidoc b/README.asciidoc index 817207cc..6103daa0 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -1184,25 +1184,25 @@ Highlighters Manipulation of the displayed text is done through highlighters, which can be added or removed with the command ------------------------------------------------------ -:addhl ------------------------------------------------------ +--------------------------------------------------------------- +:add-highlighter +--------------------------------------------------------------- and ----------------------- -:rmhl ----------------------- +------------------------------------ +:remove-highlighter +------------------------------------ `highlighter_id` is a name generated by the highlighter specified with `highlighter_name`, -possibly dependent on the parameters. Use command completion on rmhl to see the existing +possibly dependent on the parameters. Use command completion on remove-highlighter to see the existing highlighters id. general highlighters are: * `regex :...`: highlight a regex, takes the regex as first parameter, followed by any number of face parameters. - For example: `:addhl regex (\hTODO:)?[^\n] 0:cyan 1:yellow,red` + For example: `:add-highlighter regex (\hTODO:)?[^\n] 0:cyan 1:yellow,red` will highlight C++ style comments in cyan, with an eventual 'TODO:' in yellow on red background. * `dynregex`: Similar to regex, but expand (like a command parameter would) the @@ -1226,23 +1226,23 @@ Highlighting Groups the `group` highlighter is a container for other highlighters. You can add a group to the current window using ------------------- -addhl group ------------------- +---------------------------- +add-highlighter group +---------------------------- -and then the `-group` switch of `addhl` provides a mean to add highlighters +and then the `-group` switch of `add-highlighter` provides a mean to add highlighters inside this group. --------------------------------------- -addhl -group ... --------------------------------------- +------------------------------------------------ +add-highlighter -group ... +------------------------------------------------ groups can contain other groups, the `-group` switch can be used to define a path. ------------------------------------------------- -addhl -group group -addhl -group / ... ------------------------------------------------- +---------------------------------------------------------- +add-highlighter -group group +add-highlighter -group / ... +---------------------------------------------------------- [[regions-highlighters]] Regions highlighters @@ -1274,16 +1274,16 @@ shell_expand %sh\{ \} \{ Regions are used in the `regions` highlighter which can take any number of regions. ------------------------------------------------------------------------ -addhl regions \ +--------------------------------------------------------------------------------- +add-highlighter regions \ ... ------------------------------------------------------------------------ +--------------------------------------------------------------------------------- defines multiple regions in which other highlighters can be added -------------------------------------- -addhl -group / ... -------------------------------------- +----------------------------------------------- +add-highlighter -group / ... +----------------------------------------------- Regions are matched using the left-most rule: the left-most region opening starts a new region. when a region closes, the closest next opening start another region. @@ -1297,13 +1297,13 @@ Most programming languages can then be properly highlighted using a `regions` highlighter as root: ----------------------------------------------------------------- -addhl regions -default code \ +add-highlighter regions -default code \ string \ comment -addhl -group /code ... -addhl -group /string ... -addhl -group /comment ... +add-highlighter -group /code ... +add-highlighter -group /string ... +add-highlighter -group /comment ... ----------------------------------------------------------------- Shared Highlighters @@ -1312,11 +1312,11 @@ Shared Highlighters Highlighters are often defined for a specific filetype, and it makes then sense to share the highlighters between all the windows on the same filetypes. -A shared highlighter can be defined with the `:addhl` command +A shared highlighter can be defined with the `:add-highlighter` command ------------------------------- -addhl -group / ... ------------------------------- +---------------------------------------- +add-highlighter -group / ... +---------------------------------------- when the group switch values starts with a '/', it references a group in the shared highlighters, rather than the window highlighters. @@ -1324,16 +1324,16 @@ shared highlighters, rather than the window highlighters. The common case would be to create a named shared group, and then fill it with highlighters: ---------------------------- -addhl -group / group -addhl -group /name regex ... ---------------------------- +-------------------------------------- +add-highlighter -group / group +add-highlighter -group /name regex ... +-------------------------------------- It can then be referenced in a window using the `ref` highlighter. ----------------- -addhl ref ----------------- +-------------------------- +add-highlighter ref +-------------------------- the `ref` can reference any named highlighter in the shared namespace. @@ -1357,16 +1357,16 @@ called. For example to automatically use line numbering with .cc files, use the following command: ------------------------------------------------------ -:hook global WinCreate .*\.cc %{ addhl number_lines } ------------------------------------------------------ +--------------------------------------------------------------- +:hook global WinCreate .*\.cc %{ add-highlighter number_lines } +--------------------------------------------------------------- if `` is given, make this hook part of the named group. groups -are used for removing hooks with the `rmhooks` command +are used for removing hooks with the `remove-hooks` command ------------------------ -rmhooks ------------------------ +---------------------------- +remove-hooks +---------------------------- will remove every hooks in `` that are part of the given group. diff --git a/doc/manpages/highlighters.asciidoc b/doc/manpages/highlighters.asciidoc index f8f48896..1666be7f 100644 --- a/doc/manpages/highlighters.asciidoc +++ b/doc/manpages/highlighters.asciidoc @@ -11,19 +11,19 @@ Description Manipulation of the displayed text is done through highlighters, which can be added or removed with the following commands: -------------------------------------------------------- -addhl ... -------------------------------------------------------- +--------------------------------------------------------------- +add-highlighter ... +--------------------------------------------------------------- and ------------------------ -rmhl ------------------------ +----------------------------------- +remove-highlighter +----------------------------------- *highlighter_id* is a name generated by the highlighter specified with *highlighter_name*, possibly dependent on the parameters. Use command -completion in a prompt on the *rmhl* command to see the existing highlighters +completion in a prompt on the *remove-highlighter* command to see the existing highlighters ids. General highlighters @@ -32,9 +32,9 @@ General highlighters highlight a regex, takes the regex as first parameter, followed by any number of face parameters. For example: ------------------------------------------------------ - addhl regex //(\hTODO:)?[^\n] 0:cyan 1:yellow,red ------------------------------------------------------ +--------------------------------------------------------------- + add-highlighter regex //(\hTODO:)?[^\n] 0:cyan 1:yellow,red +--------------------------------------------------------------- will highlight C++ style comments in cyan, with an eventual 'TODO:' in yellow on red background @@ -77,24 +77,24 @@ Highlighting Groups The group highlighter is a container for other highlighters. You can add a group to the current window using --------------------- -addhl group --------------------- +---------------------------- +add-highlighter group +---------------------------- -The *-group* switch of the *addhl* command provides a mean to add highlighters +The *-group* switch of the *add-highlighter* command provides a mean to add highlighters inside this group: ----------------------------------------- -addhl -group ... ----------------------------------------- +------------------------------------------------ +add-highlighter -group ... +------------------------------------------------ Groups can contain other groups, the *-group* switch can be used to define a path as follows: --------------------------------------------------- -addhl -group group -addhl -group / ... --------------------------------------------------- +---------------------------------------------------------- +add-highlighter -group group +add-highlighter -group / ... +---------------------------------------------------------- Regions highlighters -------------------- @@ -136,16 +136,16 @@ of regions. The following command: ------------------------------------------------------------------------ -addhl regions +------------------------------------------------------------------------------ +add-highlighter regions ... ------------------------------------------------------------------------ +------------------------------------------------------------------------------ defines multiple regions in which other highlighters can be added as follows: ---------------------------------------- -addhl -group / ... ---------------------------------------- +----------------------------------------------- +add-highlighter -group / ... +----------------------------------------------- Regions are matched using the left-most rule: the left-most region opening starts a new region. When a region closes, the closest next opening start @@ -160,13 +160,13 @@ Most programming languages can then be properly highlighted using a regions highlighter as root: ----------------------------------------------------------------- -addhl regions -default code \ +add-highlighter regions -default code \ string \ comment -addhl -group /code ... -addhl -group /string ... -addhl -group /comment ... +add-highlighter -group /code ... +add-highlighter -group /string ... +add-highlighter -group /comment ... ----------------------------------------------------------------- Shared Highlighters @@ -177,9 +177,9 @@ sense to share the highlighters between all the windows on the same filetypes. A shared highlighter can be defined with the following command: --------------------------------- -addhl -group / ... --------------------------------- +---------------------------------------- +add-highlighter -group / ... +---------------------------------------- When the group switch values starts with a '/', it references a group in the shared highlighters, rather than the window highlighters. @@ -187,15 +187,15 @@ the shared highlighters, rather than the window highlighters. The common case would be to create a named shared group, and then fill it with highlighters: ------------------------------- -addhl -group / group -addhl -group /name regex ... ------------------------------- +-------------------------------------- +add-highlighter -group / group +add-highlighter -group /name regex ... +-------------------------------------- It can then be referenced in a window using the ref highlighter. ------------------- -addhl ref ------------------- +-------------------------- +add-highlighter ref +-------------------------- The ref can reference any named highlighter in the shared namespace. diff --git a/doc/manpages/hooks.asciidoc b/doc/manpages/hooks.asciidoc index 9a5b00ba..338f0b24 100644 --- a/doc/manpages/hooks.asciidoc +++ b/doc/manpages/hooks.asciidoc @@ -25,14 +25,14 @@ For example to automatically use line numbering with .cc files, use the following command: ---------------------------------------------------- -hook global WinCreate .*\.cc %{ addhl number_lines } +hook global WinCreate .*\.cc %{ add-highlighter number_lines } ---------------------------------------------------- if *group* is given, make this hook part of the named group. Groups are used for removing hooks with the following command: ----------------------- -rmhooks +remove-hooks ----------------------- A call to the command above will remove every hooks in *scope* that are part diff --git a/rc/base/autowrap.kak b/rc/base/autowrap.kak index 273e7077..ac7fa9c2 100644 --- a/rc/base/autowrap.kak +++ b/rc/base/autowrap.kak @@ -43,5 +43,5 @@ def autowrap-enable -docstring "Automatically wrap the lines in which characters } def autowrap-disable -docstring "Disable automatic line wrapping" %{ - rmhooks window autowrap + remove-hooks window autowrap } diff --git a/rc/base/clojure.kak b/rc/base/clojure.kak index 194a2815..de053959 100644 --- a/rc/base/clojure.kak +++ b/rc/base/clojure.kak @@ -13,11 +13,11 @@ hook global BufCreate .*[.](cljs?) %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / group clojure +add-highlighter -group / group clojure -addhl -group /clojure ref lisp +add-highlighter -group /clojure ref lisp -addhl -group /clojure regex \b(clojure.core/['/\w]+)\b 0:keyword +add-highlighter -group /clojure regex \b(clojure.core/['/\w]+)\b 0:keyword # Commands # ‾‾‾‾‾‾‾‾ @@ -27,16 +27,16 @@ def -hidden _clojure_indent_on_new_line _lisp_indent_on_new_line # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group clojure-highlight global WinSetOption filetype=clojure %{ addhl ref clojure } +hook -group clojure-highlight global WinSetOption filetype=clojure %{ add-highlighter ref clojure } hook global WinSetOption filetype=clojure %[ hook window InsertEnd .* -group clojure-hooks _clojure_filter_around_selections hook window InsertChar \n -group clojure-indent _clojure_indent_on_new_line ] -hook -group clojure-highlight global WinSetOption filetype=(?!clojure).* %{ rmhl clojure } +hook -group clojure-highlight global WinSetOption filetype=(?!clojure).* %{ remove-highlighter clojure } hook global WinSetOption filetype=(?!clojure).* %{ - rmhooks window clojure-indent - rmhooks window clojure-hooks + remove-hooks window clojure-indent + remove-hooks window clojure-hooks } diff --git a/rc/base/css.kak b/rc/base/css.kak index 27a58712..68242f70 100644 --- a/rc/base/css.kak +++ b/rc/base/css.kak @@ -11,27 +11,27 @@ hook global BufCreate .*[.](css) %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default selector css \ +add-highlighter -group / regions -default selector css \ declaration [{] [}] '' \ comment /[*] [*]/ '' -addhl -group /css/comment fill comment +add-highlighter -group /css/comment fill comment -addhl -group /css/declaration regions content \ +add-highlighter -group /css/declaration regions content \ string '"' (? ~ -hook -group gas-highlight global WinSetOption filetype=gas %{ addhl ref gas } +hook -group gas-highlight global WinSetOption filetype=gas %{ add-highlighter ref gas } hook global WinSetOption filetype=gas %{ hook window InsertChar \n -group gas-indent _gas_indent_on_new_line } -hook -group gas-highlight global WinSetOption filetype=(?!gas).* %{ rmhl gas } +hook -group gas-highlight global WinSetOption filetype=(?!gas).* %{ remove-highlighter gas } hook global WinSetOption filetype=(?!gas).* %{ - rmhooks window gas-indent + remove-hooks window gas-indent } diff --git a/rc/base/git.kak b/rc/base/git.kak index 947589df..f5f37bbc 100644 --- a/rc/base/git.kak +++ b/rc/base/git.kak @@ -3,24 +3,24 @@ hook global BufCreate .*COMMIT_EDITMSG %{ } hook -group git-commit-highlight global WinSetOption filetype=git-commit %{ - addhl group git-commit-highlight - addhl -group git-commit-highlight regex "\`[^\n]{1,50}" 0:yellow - addhl -group git-commit-highlight regex "\`[^\n]*\n\h*(?!#)([^\n]*)\n?" 1:default,red - addhl -group git-commit-highlight regex "^\h*#[^\n]*\n" 0:cyan,default - addhl -group git-commit-highlight regex "\b(?:(modified)|(deleted)|(new file)|(renamed)):([^\n]*)\n" 1:yellow 2:red 3:green 4:blue 5:magenta - addhl -group git-commit-highlight ref diff # highlight potential diffs from the -v option + add-highlighter group git-commit-highlight + add-highlighter -group git-commit-highlight regex "\`[^\n]{1,50}" 0:yellow + add-highlighter -group git-commit-highlight regex "\`[^\n]*\n\h*(?!#)([^\n]*)\n?" 1:default,red + add-highlighter -group git-commit-highlight regex "^\h*#[^\n]*\n" 0:cyan,default + add-highlighter -group git-commit-highlight regex "\b(?:(modified)|(deleted)|(new file)|(renamed)):([^\n]*)\n" 1:yellow 2:red 3:green 4:blue 5:magenta + add-highlighter -group git-commit-highlight ref diff # highlight potential diffs from the -v option } -hook -group git-commit-highlight global WinSetOption filetype=(?!git-commit).* %{ rmhl git-commit-highlight } +hook -group git-commit-highlight global WinSetOption filetype=(?!git-commit).* %{ remove-highlighter git-commit-highlight } hook global BufCreate .*git-rebase-todo %{ set buffer filetype git-rebase } hook -group git-rebase-highlight global WinSetOption filetype=git-rebase %{ - addhl group git-rebase-highlight - addhl -group git-rebase-highlight regex "#[^\n]*\n" 0:cyan,default - addhl -group git-rebase-highlight regex "^(pick|edit|reword|squash|fixup|exec|[persfx]) (\w+)" 1:green 2:magenta + add-highlighter group git-rebase-highlight + add-highlighter -group git-rebase-highlight regex "#[^\n]*\n" 0:cyan,default + add-highlighter -group git-rebase-highlight regex "^(pick|edit|reword|squash|fixup|exec|[persfx]) (\w+)" 1:green 2:magenta } -hook -group git-rebase-highlight global WinSetOption filetype=(?!git-rebase).* %{ rmhl git-rebase-highlight } +hook -group git-rebase-highlight global WinSetOption filetype=(?!git-rebase).* %{ remove-highlighter git-rebase-highlight } diff --git a/rc/base/go.kak b/rc/base/go.kak index 0b0be61b..f7cc0083 100644 --- a/rc/base/go.kak +++ b/rc/base/go.kak @@ -11,19 +11,19 @@ hook global BufCreate .*\.go %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code go \ +add-highlighter -group / regions -default code go \ back_string '`' '`' '' \ double_string '"' (? '' \ tag < > '' \ style \K (?=) '' \ script \K (?=) '' -addhl -group /html/comment fill comment +add-highlighter -group /html/comment fill comment -addhl -group /html/style ref css -addhl -group /html/script ref javascript +add-highlighter -group /html/style ref css +add-highlighter -group /html/script ref javascript -addhl -group /html/tag regex |<=|=|>=|) 0:operator -addhl -group /lisp/code regex \b(([':]\w+)|([*]\H+[*]))\b 0:identifier -addhl -group /lisp/code regex \b(def[a-z]+|if|do|let|lambda|catch|and|assert|while|def|do|fn|finally|let|loop|new|quote|recur|set!|throw|try|var|case|if-let|if-not|when|when-first|when-let|when-not|(cond(->|->>)?))\b 0:keyword +add-highlighter -group /lisp/code regex \b(nil|true|false)\b 0:value +add-highlighter -group /lisp/code regex (((\Q***\E)|(///)|(\Q+++\E)){1,3})|(1[+-])|(<|>|<=|=|>=|) 0:operator +add-highlighter -group /lisp/code regex \b(([':]\w+)|([*]\H+[*]))\b 0:identifier +add-highlighter -group /lisp/code regex \b(def[a-z]+|if|do|let|lambda|catch|and|assert|while|def|do|fn|finally|let|loop|new|quote|recur|set!|throw|try|var|case|if-let|if-not|when|when-first|when-let|when-not|(cond(->|->>)?))\b 0:keyword # Commands # ‾‾‾‾‾‾‾‾ @@ -43,16 +43,16 @@ def -hidden _lisp_indent_on_new_line %{ # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group lisp-highlight global WinSetOption filetype=lisp %{ addhl ref lisp } +hook -group lisp-highlight global WinSetOption filetype=lisp %{ add-highlighter ref lisp } hook global WinSetOption filetype=lisp %{ hook window InsertEnd .* -group lisp-hooks _lisp_filter_around_selections hook window InsertChar \n -group lisp-indent _lisp_indent_on_new_line } -hook -group lisp-highlight global WinSetOption filetype=(?!lisp).* %{ rmhl lisp } +hook -group lisp-highlight global WinSetOption filetype=(?!lisp).* %{ remove-highlighter lisp } hook global WinSetOption filetype=(?!lisp).* %{ - rmhooks window lisp-indent - rmhooks window lisp-hooks + remove-hooks window lisp-indent + remove-hooks window lisp-hooks } diff --git a/rc/base/lua.kak b/rc/base/lua.kak index 2f5ba4ee..fa35ada7 100644 --- a/rc/base/lua.kak +++ b/rc/base/lua.kak @@ -11,17 +11,17 @@ hook global BufCreate .*[.](lua) %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code lua \ +add-highlighter -group / regions -default code lua \ string '"' (?]+@.*?> 0:string -addhl -group /mail regex ^>.*?$ 0:comment +add-highlighter -group / group mail +add-highlighter -group /mail regex ^(From|To|Cc|Bcc|Subject|Reply-To|In-Reply-To):([^\n]*(?:\n\h+[^\n]+)*)$ 1:keyword 2:attribute +add-highlighter -group /mail regex <[^@>]+@.*?> 0:string +add-highlighter -group /mail regex ^>.*?$ 0:comment -hook -group mail-highlight global WinSetOption filetype=mail %{ addhl ref mail } -hook -group mail-highlight global WinSetOption filetype=(?!mail).* %{ rmhl mail } +hook -group mail-highlight global WinSetOption filetype=mail %{ add-highlighter ref mail } +hook -group mail-highlight global WinSetOption filetype=(?!mail).* %{ remove-highlighter mail } diff --git a/rc/base/markdown.kak b/rc/base/markdown.kak index 9108c9f3..19b73955 100644 --- a/rc/base/markdown.kak +++ b/rc/base/markdown.kak @@ -11,7 +11,7 @@ hook global BufCreate .*[.](markdown|md|mkd) %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default content markdown \ +add-highlighter -group / regions -default content markdown \ c ```\h*c ``` '' \ cabal ```\h*cabal ``` '' \ clojure ```\h*clojure ``` '' \ @@ -58,68 +58,68 @@ addhl -group / regions -default content markdown \ code `` `` '' \ code ` ` '' -addhl -group /markdown/code fill meta +add-highlighter -group /markdown/code fill meta -addhl -group /markdown/c ref c -addhl -group /markdown/cabal ref cabal -addhl -group /markdown/clojure ref clojure -addhl -group /markdown/coffee ref coffee -addhl -group /markdown/cpp ref cpp -addhl -group /markdown/css ref css -addhl -group /markdown/cucumber ref cucumber -addhl -group /markdown/d ref d -addhl -group /markdown/diff ref diff -addhl -group /markdown/dockerfile ref dockerfile -addhl -group /markdown/fish ref fish -addhl -group /markdown/gas ref gas -addhl -group /markdown/go ref go -addhl -group /markdown/haml ref haml -addhl -group /markdown/haskell ref haskell -addhl -group /markdown/html ref html -addhl -group /markdown/ini ref ini -addhl -group /markdown/java ref java -addhl -group /markdown/javascript ref javascript -addhl -group /markdown/json ref json -addhl -group /markdown/julia ref julia -addhl -group /markdown/kak ref kak -addhl -group /markdown/kickstart ref kickstart -addhl -group /markdown/latex ref latex -addhl -group /markdown/lisp ref lisp -addhl -group /markdown/lua ref lua -addhl -group /markdown/makefile ref makefile -addhl -group /markdown/moon ref moon -addhl -group /markdown/objc ref objc -addhl -group /markdown/perl ref perl -addhl -group /markdown/pug ref pug -addhl -group /markdown/python ref python -addhl -group /markdown/ragel ref ragel -addhl -group /markdown/ruby ref ruby -addhl -group /markdown/rust ref rust -addhl -group /markdown/sass ref sass -addhl -group /markdown/scala ref scala -addhl -group /markdown/scss ref scss -addhl -group /markdown/sh ref sh -addhl -group /markdown/swift ref swift -addhl -group /markdown/tupfile ref tupfile -addhl -group /markdown/yaml ref yaml +add-highlighter -group /markdown/c ref c +add-highlighter -group /markdown/cabal ref cabal +add-highlighter -group /markdown/clojure ref clojure +add-highlighter -group /markdown/coffee ref coffee +add-highlighter -group /markdown/cpp ref cpp +add-highlighter -group /markdown/css ref css +add-highlighter -group /markdown/cucumber ref cucumber +add-highlighter -group /markdown/d ref d +add-highlighter -group /markdown/diff ref diff +add-highlighter -group /markdown/dockerfile ref dockerfile +add-highlighter -group /markdown/fish ref fish +add-highlighter -group /markdown/gas ref gas +add-highlighter -group /markdown/go ref go +add-highlighter -group /markdown/haml ref haml +add-highlighter -group /markdown/haskell ref haskell +add-highlighter -group /markdown/html ref html +add-highlighter -group /markdown/ini ref ini +add-highlighter -group /markdown/java ref java +add-highlighter -group /markdown/javascript ref javascript +add-highlighter -group /markdown/json ref json +add-highlighter -group /markdown/julia ref julia +add-highlighter -group /markdown/kak ref kak +add-highlighter -group /markdown/kickstart ref kickstart +add-highlighter -group /markdown/latex ref latex +add-highlighter -group /markdown/lisp ref lisp +add-highlighter -group /markdown/lua ref lua +add-highlighter -group /markdown/makefile ref makefile +add-highlighter -group /markdown/moon ref moon +add-highlighter -group /markdown/objc ref objc +add-highlighter -group /markdown/perl ref perl +add-highlighter -group /markdown/pug ref pug +add-highlighter -group /markdown/python ref python +add-highlighter -group /markdown/ragel ref ragel +add-highlighter -group /markdown/ruby ref ruby +add-highlighter -group /markdown/rust ref rust +add-highlighter -group /markdown/sass ref sass +add-highlighter -group /markdown/scala ref scala +add-highlighter -group /markdown/scss ref scss +add-highlighter -group /markdown/sh ref sh +add-highlighter -group /markdown/swift ref swift +add-highlighter -group /markdown/tupfile ref tupfile +add-highlighter -group /markdown/yaml ref yaml # Setext-style header -addhl -group /markdown/content regex (\A|\n\n)[^\n]+\n={2,}\h*\n\h*$ 0:title -addhl -group /markdown/content regex (\A|\n\n)[^\n]+\n-{2,}\h*\n\h*$ 0:header +add-highlighter -group /markdown/content regex (\A|\n\n)[^\n]+\n={2,}\h*\n\h*$ 0:title +add-highlighter -group /markdown/content regex (\A|\n\n)[^\n]+\n-{2,}\h*\n\h*$ 0:header # Atx-style header -addhl -group /markdown/content regex ^(#+)(\h+)([^\n]+) 1:header +add-highlighter -group /markdown/content regex ^(#+)(\h+)([^\n]+) 1:header -addhl -group /markdown/content regex ^\h?+((?:[\s\t]+)?[-\*])\h+[^\n]*(\n\h+[^-\*]\S+[^\n]*\n)*$ 0:list 1:bullet -addhl -group /markdown/content regex ^([-=~]+)\n[^\n\h].*?\n\1$ 0:block -addhl -group /markdown/content regex \B\+[^\n]+?\+\B 0:mono -addhl -group /markdown/content regex \B\*[^\n]+?\*\B 0:italic -addhl -group /markdown/content regex \b_[^\n]+?_\b 0:italic -addhl -group /markdown/content regex \B\*\*[^\n]+?\*\*\B 0:bold -addhl -group /markdown/content regex \B__[^\n]+?__\B 0:bold -addhl -group /markdown/content regex <(([a-z]+://.*?)|((mailto:)?[\w+-]+@[a-z]+[.][a-z]+))> 0:link -addhl -group /markdown/content regex ^\h*(>\h*)+ 0:comment -addhl -group /markdown/content regex \H\K\h\h$ 0:PrimarySelection +add-highlighter -group /markdown/content regex ^\h?+((?:[\s\t]+)?[-\*])\h+[^\n]*(\n\h+[^-\*]\S+[^\n]*\n)*$ 0:list 1:bullet +add-highlighter -group /markdown/content regex ^([-=~]+)\n[^\n\h].*?\n\1$ 0:block +add-highlighter -group /markdown/content regex \B\+[^\n]+?\+\B 0:mono +add-highlighter -group /markdown/content regex \B\*[^\n]+?\*\B 0:italic +add-highlighter -group /markdown/content regex \b_[^\n]+?_\b 0:italic +add-highlighter -group /markdown/content regex \B\*\*[^\n]+?\*\*\B 0:bold +add-highlighter -group /markdown/content regex \B__[^\n]+?__\B 0:bold +add-highlighter -group /markdown/content regex <(([a-z]+://.*?)|((mailto:)?[\w+-]+@[a-z]+[.][a-z]+))> 0:link +add-highlighter -group /markdown/content regex ^\h*(>\h*)+ 0:comment +add-highlighter -group /markdown/content regex \H\K\h\h$ 0:PrimarySelection # Commands # ‾‾‾‾‾‾‾‾ @@ -138,14 +138,14 @@ def -hidden _markdown_indent_on_new_line %{ # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group markdown-highlight global WinSetOption filetype=markdown %{ addhl ref markdown } +hook -group markdown-highlight global WinSetOption filetype=markdown %{ add-highlighter ref markdown } hook global WinSetOption filetype=markdown %{ hook window InsertChar \n -group markdown-indent _markdown_indent_on_new_line } -hook -group markdown-highlight global WinSetOption filetype=(?!markdown).* %{ rmhl markdown } +hook -group markdown-highlight global WinSetOption filetype=(?!markdown).* %{ remove-highlighter markdown } hook global WinSetOption filetype=(?!markdown).* %{ - rmhooks window markdown-indent + remove-hooks window markdown-indent } diff --git a/rc/base/perl.kak b/rc/base/perl.kak index d025ca6d..e9449eaa 100644 --- a/rc/base/perl.kak +++ b/rc/base/perl.kak @@ -11,16 +11,16 @@ hook global BufCreate .*\.pl %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code perl \ +add-highlighter -group / regions -default code perl \ command '(?|\$\?|\$@|\$\[|\$\\|\$\]|\$\^|\$\||\$~|%!|@\+|@-|@_} 0:value -addhl -group /perl/code regex (%ENV|%INC|%OVERLOAD|%SIG|@ARGV|@INC|@LAST_MATCH_START) 0:value -addhl -group /perl/code regex %{%\^(H)\b} 0:value -addhl -group /perl/code regex \$\^(S|T|V|W|X|A|C|D|E|F|H|I|L|M|N|O|P|R)\b 0:value -addhl -group /perl/code regex \$\^(RE_TRIE_MAXBUF|TAINT|UNICODE|UTF8LOCALE|WARNING_BITS|WIDE_SYSTEM_CALLS|CHILD_ERROR_NATIVE|ENCODING|OPEN|RE_DEBUG_FLAGS)\b 0:value +add-highlighter -group /perl/code regex (?!\$)-?([0-9]*\.(?!0[xXbB]))?\b([0-9]+|0[xX][0-9a-fA-F]+|0[bb][01_]+)\.?([eE][+-]?[0-9]+)?i?\b 0:value +add-highlighter -group /perl/code regex %{\$!|\$"|\$#|\$\$|\$%|\$&|\$'|\$\(|\$\)|\$\*|\$\+|\$,|\$_|\$-|\$`|\$\.|\$/|\$:|\$;|\$<|\$=|\$>|\$\?|\$@|\$\[|\$\\|\$\]|\$\^|\$\||\$~|%!|@\+|@-|@_} 0:value +add-highlighter -group /perl/code regex (%ENV|%INC|%OVERLOAD|%SIG|@ARGV|@INC|@LAST_MATCH_START) 0:value +add-highlighter -group /perl/code regex %{%\^(H)\b} 0:value +add-highlighter -group /perl/code regex \$\^(S|T|V|W|X|A|C|D|E|F|H|I|L|M|N|O|P|R)\b 0:value +add-highlighter -group /perl/code regex \$\^(RE_TRIE_MAXBUF|TAINT|UNICODE|UTF8LOCALE|WARNING_BITS|WIDE_SYSTEM_CALLS|CHILD_ERROR_NATIVE|ENCODING|OPEN|RE_DEBUG_FLAGS)\b 0:value -addhl -group /perl/code regex \$[0-9]+ 0:attribute -addhl -group /perl/code regex \b-(B|b|C|c|d|e|f|g|k|l|M|O|o|p|r|R|S|s|T|t|u|w|W|X|x|z)\b 0:attribute +add-highlighter -group /perl/code regex \$[0-9]+ 0:attribute +add-highlighter -group /perl/code regex \b-(B|b|C|c|d|e|f|g|k|l|M|O|o|p|r|R|S|s|T|t|u|w|W|X|x|z)\b 0:attribute -addhl -group /perl/code regex %{(?:\b[stqrmwy]+)?/[^\n/]*/([msixpodualngecr]+\b)?} 0:magenta -addhl -group /perl/code regex %{(?:\b[stqrmwy]+)?/[^\n/]+/[^\n/]*/([msixpeodualngcr]+\b)?} 0:magenta +add-highlighter -group /perl/code regex %{(?:\b[stqrmwy]+)?/[^\n/]*/([msixpodualngecr]+\b)?} 0:magenta +add-highlighter -group /perl/code regex %{(?:\b[stqrmwy]+)?/[^\n/]+/[^\n/]*/([msixpeodualngcr]+\b)?} 0:magenta -addhl -group /perl/code regex \$[a-zA-Z_][a-zA-Z0-9_]* 0:blue +add-highlighter -group /perl/code regex \$[a-zA-Z_][a-zA-Z0-9_]* 0:blue -addhl -group /perl/code regex \$(a|b|LAST_REGEXP_CODE_RESULT|LIST_SEPARATOR|MATCH|MULTILINE_MATCHING|NR|OFMT|OFS|ORS|OS_ERROR|OSNAME|OUTPUT_AUTO_FLUSH|OUTPUT_FIELD_SEPARATOR|OUTPUT_RECORD_SEPARATOR)\b 0:value -addhl -group /perl/code regex \$(LAST_REGEXP_CODE_RESULT|LIST_SEPARATOR|MATCH|MULTILINE_MATCHING|NR|OFMT|OFS|ORS|OS_ERROR|OSNAME|OUTPUT_AUTO_FLUSH|OUTPUT_FIELD_SEPARATOR|OUTPUT_RECORD_SEPARATOR|PERL_VERSION|ACCUMULATOR|PERLDB|ARG|PID|ARGV|POSTMATCH|PREMATCH|BASETIME|PROCESS_ID|CHILD_ERROR|PROGRAM_NAME|COMPILING|REAL_GROUP_ID|DEBUGGING|REAL_USER_ID|EFFECTIVE_GROUP_ID|RS|EFFECTIVE_USER_ID|SUBSCRIPT_SEPARATOR|EGID|SUBSEP|ERRNO|SYSTEM_FD_MAX|EUID|UID|EVAL_ERROR|WARNING|EXCEPTIONS_BEING_CAUGHT|EXECUTABLE_NAME|EXTENDED_OS_ERROR|FORMAT_FORMFEED|FORMAT_LINE_BREAK_CHARACTERS|FORMAT_LINES_LEFT|FORMAT_LINES_PER_PAGE|FORMAT_NAME|FORMAT_PAGE_NUMBER|FORMAT_TOP_NAME|GID|INPLACE_EDIT|INPUT_LINE_NUMBER|INPUT_RECORD_SEPARATOR|LAST_MATCH_END|LAST_PAREN_MATCH)\b 0:value +add-highlighter -group /perl/code regex \$(a|b|LAST_REGEXP_CODE_RESULT|LIST_SEPARATOR|MATCH|MULTILINE_MATCHING|NR|OFMT|OFS|ORS|OS_ERROR|OSNAME|OUTPUT_AUTO_FLUSH|OUTPUT_FIELD_SEPARATOR|OUTPUT_RECORD_SEPARATOR)\b 0:value +add-highlighter -group /perl/code regex \$(LAST_REGEXP_CODE_RESULT|LIST_SEPARATOR|MATCH|MULTILINE_MATCHING|NR|OFMT|OFS|ORS|OS_ERROR|OSNAME|OUTPUT_AUTO_FLUSH|OUTPUT_FIELD_SEPARATOR|OUTPUT_RECORD_SEPARATOR|PERL_VERSION|ACCUMULATOR|PERLDB|ARG|PID|ARGV|POSTMATCH|PREMATCH|BASETIME|PROCESS_ID|CHILD_ERROR|PROGRAM_NAME|COMPILING|REAL_GROUP_ID|DEBUGGING|REAL_USER_ID|EFFECTIVE_GROUP_ID|RS|EFFECTIVE_USER_ID|SUBSCRIPT_SEPARATOR|EGID|SUBSEP|ERRNO|SYSTEM_FD_MAX|EUID|UID|EVAL_ERROR|WARNING|EXCEPTIONS_BEING_CAUGHT|EXECUTABLE_NAME|EXTENDED_OS_ERROR|FORMAT_FORMFEED|FORMAT_LINE_BREAK_CHARACTERS|FORMAT_LINES_LEFT|FORMAT_LINES_PER_PAGE|FORMAT_NAME|FORMAT_PAGE_NUMBER|FORMAT_TOP_NAME|GID|INPLACE_EDIT|INPUT_LINE_NUMBER|INPUT_RECORD_SEPARATOR|LAST_MATCH_END|LAST_PAREN_MATCH)\b 0:value # Commands # ‾‾‾‾‾‾‾‾ @@ -105,7 +105,7 @@ def -hidden _perl-indent-on-closing-curly-brace %[ # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group perl-highlight global WinSetOption filetype=perl %{ addhl ref perl } +hook -group perl-highlight global WinSetOption filetype=perl %{ add-highlighter ref perl } hook global WinSetOption filetype=perl %{ # cleanup trailing whitespaces when exiting insert mode @@ -115,9 +115,9 @@ hook global WinSetOption filetype=perl %{ hook window InsertChar \} -group perl-indent _perl-indent-on-closing-curly-brace } -hook -group perl-highlight global WinSetOption filetype=(?!perl).* %{ rmhl perl } +hook -group perl-highlight global WinSetOption filetype=(?!perl).* %{ remove-highlighter perl } hook global WinSetOption filetype=(?!perl).* %{ - rmhooks window perl-hooks - rmhooks window perl-indent + remove-hooks window perl-hooks + remove-hooks window perl-indent } diff --git a/rc/base/ruby.kak b/rc/base/ruby.kak index 565c5c85..6a8432de 100644 --- a/rc/base/ruby.kak +++ b/rc/base/ruby.kak @@ -11,7 +11,7 @@ hook global BufCreate .*(([.](rb))|(irbrc)|(pryrc)|(Capfile|[.]cap)|(Gemfile)|(G # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code ruby \ +add-highlighter -group / regions -default code ruby \ double_string '"' (?|<:|:>|=:=|::|&&|\|\|)\b 0:operator -addhl -group /scala/code regex "'[_A-Za-z0-9$]+" 0:identifier +add-highlighter -group /scala/code regex \b(import|package)\b 0:meta +add-highlighter -group /scala/code regex \b(this|true|false|null)\b 0:value +add-highlighter -group /scala/code regex \b(become|case|catch|class|def|do|else|extends|final|finally|for|forSome|goto|if|initialize|macro|match|new|object|onTransition|return|startWith|stay|throw|trait|try|unbecome|using|val|var|when|while|with|yield)\b 0:keyword +add-highlighter -group /scala/code regex \b(abstract|final|implicit|implicitly|lazy|override|private|protected|require|sealed|super)\b 0:attribute +add-highlighter -group /scala/code regex \b(⇒|=>|<:|:>|=:=|::|&&|\|\|)\b 0:operator +add-highlighter -group /scala/code regex "'[_A-Za-z0-9$]+" 0:identifier # Commands # ‾‾‾‾‾‾‾‾ @@ -62,7 +62,7 @@ def -hidden _scala_indent_on_closing_curly_brace %[ # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group scala-highlight global WinSetOption filetype=scala %{ addhl ref scala } +hook -group scala-highlight global WinSetOption filetype=scala %{ add-highlighter ref scala } hook global WinSetOption filetype=scala %[ hook window InsertEnd .* -group scala-hooks _scala_filter_around_selections @@ -70,9 +70,9 @@ hook global WinSetOption filetype=scala %[ hook window InsertChar \} -group scala-indent _scala_indent_on_closing_curly_brace ] -hook -group scala-highlight global WinSetOption filetype=(?!scala).* %{ rmhl scala } +hook -group scala-highlight global WinSetOption filetype=(?!scala).* %{ remove-highlighter scala } hook global WinSetOption filetype=(?!scala).* %{ - rmhooks window scala-indent - rmhooks window scala-hooks + remove-hooks window scala-indent + remove-hooks window scala-hooks } diff --git a/rc/base/spell.kak b/rc/base/spell.kak index 2e8cb55c..bf4dfbf3 100644 --- a/rc/base/spell.kak +++ b/rc/base/spell.kak @@ -8,7 +8,7 @@ Formats of language supported: - ISO language code, e.g. 'en' - language code above followed by a dash or underscore with an ISO country code, e.g. 'en-US'} \ spell %{ - try %{ addhl ranges 'spell_regions' } + try %{ add-highlighter ranges 'spell_regions' } %sh{ file=$(mktemp -d -t kak-spell.XXXXXXXX)/buffer printf 'eval -no-hooks write %s\n' "${file}" diff --git a/rc/base/swift.kak b/rc/base/swift.kak index f12612a1..5cb2cba3 100644 --- a/rc/base/swift.kak +++ b/rc/base/swift.kak @@ -2,26 +2,26 @@ hook global BufCreate .*\.(swift) %{ set buffer filetype swift } -addhl -group / regions -default code swift \ +add-highlighter -group / regions -default code swift \ string %{(?" 0:red +add-highlighter -group /swift/comment regex "\<(TODO|XXX|MARK)\>" 0:red -addhl -group /swift/code regex %{\<(true|false|nil)\>|\<-?(?!\$)\d+[fdiu]?|'((\\.)?|[^'\\])'} 0:value -addhl -group /swift/code regex "\<(let|var|while|in|for|if|else|do|switch|case|default|break|continue|return|try|catch|throw|new|delete|and|or|not|operator|explicit|func|import|return|init|deinit|get|set)\>" 0:keyword -addhl -group /swift/code regex "\[!?]?" 0:keyword -addhl -group /swift/code regex "(\$[0-9])\>" 0:keyword -addhl -group /swift/code regex "\<(const|mutable|auto|namespace|inline|static|volatile|class|struct|enum|union|public|protected|private|typedef|virtual|friend|extern|typename|override|final|required|convenience|dynamic)\>" 0:attribute +add-highlighter -group /swift/code regex %{\<(true|false|nil)\>|\<-?(?!\$)\d+[fdiu]?|'((\\.)?|[^'\\])'} 0:value +add-highlighter -group /swift/code regex "\<(let|var|while|in|for|if|else|do|switch|case|default|break|continue|return|try|catch|throw|new|delete|and|or|not|operator|explicit|func|import|return|init|deinit|get|set)\>" 0:keyword +add-highlighter -group /swift/code regex "\[!?]?" 0:keyword +add-highlighter -group /swift/code regex "(\$[0-9])\>" 0:keyword +add-highlighter -group /swift/code regex "\<(const|mutable|auto|namespace|inline|static|volatile|class|struct|enum|union|public|protected|private|typedef|virtual|friend|extern|typename|override|final|required|convenience|dynamic)\>" 0:attribute -addhl -group /swift/code regex "\<(self|nil|id|super)\>" 0:value -addhl -group /swift/code regex "\<(Bool|String|UInt|UInt16|UInt32|UInt64|UInt8)\>" 0:type -addhl -group /swift/code regex "\<(IBAction|IBOutlet)\>" 0:attribute -addhl -group /swift/code regex "@\w+\>" 0:attribute +add-highlighter -group /swift/code regex "\<(self|nil|id|super)\>" 0:value +add-highlighter -group /swift/code regex "\<(Bool|String|UInt|UInt16|UInt32|UInt64|UInt8)\>" 0:type +add-highlighter -group /swift/code regex "\<(IBAction|IBOutlet)\>" 0:attribute +add-highlighter -group /swift/code regex "@\w+\>" 0:attribute -hook -group swift-highlight global WinSetOption filetype=swift %{ addhl ref swift } -hook -group swift-highlight global WinSetOption filetype=(?!swift).* %{ rmhl swift } +hook -group swift-highlight global WinSetOption filetype=swift %{ add-highlighter ref swift } +hook -group swift-highlight global WinSetOption filetype=(?!swift).* %{ remove-highlighter swift } diff --git a/rc/base/yaml.kak b/rc/base/yaml.kak index 3801a5cc..0255f7ed 100644 --- a/rc/base/yaml.kak +++ b/rc/base/yaml.kak @@ -11,18 +11,18 @@ hook global BufCreate .*[.](yaml) %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code yaml \ +add-highlighter -group / regions -default code yaml \ double_string '"' (? grep-jump } -hook -group grep-highlight global WinSetOption filetype=(?!grep).* %{ rmhl grep } +hook -group grep-highlight global WinSetOption filetype=(?!grep).* %{ remove-highlighter grep } hook global WinSetOption filetype=(?!grep).* %{ - rmhooks buffer grep-hooks + remove-hooks buffer grep-hooks } decl str jumpclient diff --git a/rc/core/kakrc.kak b/rc/core/kakrc.kak index 8a5bd6d2..1fd30039 100644 --- a/rc/core/kakrc.kak +++ b/rc/core/kakrc.kak @@ -11,7 +11,7 @@ hook global BufCreate (.*/)?(kakrc|.*.kak) %{ # Highlighters & Completion # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code kakrc \ +add-highlighter -group / regions -default code kakrc \ comment (^|\h)\K\# $ '' \ double_string %{(^|\h)"} %{(? s ^\h+$ d } } } -hook -group kak-highlight global WinSetOption filetype=(?!kak).* %{ rmhl kakrc } -hook global WinSetOption filetype=(?!kak).* %{ rmhooks window kak-indent } +hook -group kak-highlight global WinSetOption filetype=(?!kak).* %{ remove-highlighter kakrc } +hook global WinSetOption filetype=(?!kak).* %{ remove-hooks window kak-indent } diff --git a/rc/core/make.kak b/rc/core/make.kak index 0a8fccd2..31e178fd 100644 --- a/rc/core/make.kak +++ b/rc/core/make.kak @@ -18,25 +18,25 @@ All the optional arguments are forwarded to the make utility} \ set buffer make_current_error_line 0 hook -group fifo buffer BufCloseFifo .* %{ nop %sh{ rm -r $(dirname ${output}) } - rmhooks buffer fifo + remove-hooks buffer fifo } }" }} -addhl -group / group make -addhl -group /make regex "^((?:\w:)?[^:\n]+):(\d+):(?:(\d+):)?\h+(?:((?:fatal )?error)|(warning)|(note)|(required from(?: here)?))?.*?$" 1:cyan 2:green 3:green 4:red 5:yellow 6:blue 7:yellow -addhl -group /make line '%opt{make_current_error_line}' default+b +add-highlighter -group / group make +add-highlighter -group /make regex "^((?:\w:)?[^:\n]+):(\d+):(?:(\d+):)?\h+(?:((?:fatal )?error)|(warning)|(note)|(required from(?: here)?))?.*?$" 1:cyan 2:green 3:green 4:red 5:yellow 6:blue 7:yellow +add-highlighter -group /make line '%opt{make_current_error_line}' default+b -hook -group make-highlight global WinSetOption filetype=make %{ addhl ref make } +hook -group make-highlight global WinSetOption filetype=make %{ add-highlighter ref make } hook global WinSetOption filetype=make %{ hook buffer -group make-hooks NormalKey make-jump } -hook -group make-highlight global WinSetOption filetype=(?!make).* %{ rmhl make } +hook -group make-highlight global WinSetOption filetype=(?!make).* %{ remove-highlighter make } hook global WinSetOption filetype=(?!make).* %{ - rmhooks buffer make-hooks + remove-hooks buffer make-hooks } decl str jumpclient diff --git a/rc/core/makefile.kak b/rc/core/makefile.kak index 04f98fd6..a0068277 100644 --- a/rc/core/makefile.kak +++ b/rc/core/makefile.kak @@ -8,15 +8,15 @@ hook global BufCreate .*/?[mM]akefile %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default content makefile \ +add-highlighter -group / regions -default content makefile \ comment '#' '$' '' \ eval '\$\(' '\)' '\(' -addhl -group /makefile/comment fill comment -addhl -group /makefile/eval fill value +add-highlighter -group /makefile/comment fill comment +add-highlighter -group /makefile/eval fill value -addhl -group /makefile/content regex ^[\w.%-]+\h*:\s 0:identifier -addhl -group /makefile/content regex [+?:]= 0:operator +add-highlighter -group /makefile/content regex ^[\w.%-]+\h*:\s 0:identifier +add-highlighter -group /makefile/content regex [+?:]= 0:operator %sh{ # Grammar @@ -28,7 +28,7 @@ addhl -group /makefile/content regex [+?:]= 0:operator }" | sed 's,|,:,g' # Highlight keywords - printf %s "addhl -group /makefile/content regex \b(${keywords})\b 0:keyword" + printf %s "add-highlighter -group /makefile/content regex \b(${keywords})\b 0:keyword" } # Commands @@ -50,14 +50,14 @@ def -hidden _makefile-indent-on-new-line %{ # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group makefile-highlight global WinSetOption filetype=makefile %{ addhl ref makefile } +hook -group makefile-highlight global WinSetOption filetype=makefile %{ add-highlighter ref makefile } hook global WinSetOption filetype=makefile %{ hook window InsertChar \n -group makefile-indent _makefile-indent-on-new-line } -hook -group makefile-highlight global WinSetOption filetype=(?!makefile).* %{ rmhl makefile } +hook -group makefile-highlight global WinSetOption filetype=(?!makefile).* %{ remove-highlighter makefile } hook global WinSetOption filetype=(?!makefile).* %{ - rmhooks window makefile-indent + remove-hooks window makefile-indent } diff --git a/rc/core/man.kak b/rc/core/man.kak index a73d0f68..e604f454 100644 --- a/rc/core/man.kak +++ b/rc/core/man.kak @@ -3,15 +3,15 @@ decl str docsclient decl -hidden str _manpage hook -group man-highlight global WinSetOption filetype=man %{ - addhl group man-highlight + add-highlighter group man-highlight # Sections - addhl -group man-highlight regex ^\S.*?$ 0:blue + add-highlighter -group man-highlight regex ^\S.*?$ 0:blue # Subsections - addhl -group man-highlight regex '^ {3}\S.*?$' 0:default+b + add-highlighter -group man-highlight regex '^ {3}\S.*?$' 0:default+b # Command line options - addhl -group man-highlight regex '^ {7}-[^\s,]+(,\s+-[^\s,]+)*' 0:yellow + add-highlighter -group man-highlight regex '^ {7}-[^\s,]+(,\s+-[^\s,]+)*' 0:yellow # References to other manpages - addhl -group man-highlight regex [-a-zA-Z0-9_.]+\(\d\) 0:green + add-highlighter -group man-highlight regex [-a-zA-Z0-9_.]+\(\d\) 0:green } hook global WinSetOption filetype=man %{ @@ -20,10 +20,10 @@ hook global WinSetOption filetype=man %{ } } -hook -group man-highlight global WinSetOption filetype=(?!man).* %{ rmhl man-highlight } +hook -group man-highlight global WinSetOption filetype=(?!man).* %{ remove-highlighter man-highlight } hook global WinSetOption filetype=(?!man).* %{ - rmhooks window man-hooks + remove-hooks window man-hooks } def -hidden -params 1..2 _man %{ %sh{ diff --git a/rc/core/python.kak b/rc/core/python.kak index 337c4b2c..b97fa486 100644 --- a/rc/core/python.kak +++ b/rc/core/python.kak @@ -11,16 +11,16 @@ hook global BufCreate .*[.](py) %{ # Highlighters & Completion # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code python \ +add-highlighter -group / regions -default code python \ double_string '"""' '"""' '' \ single_string "'''" "'''" '' \ double_string '"' (? s ^\h+$ d } } } -hook -group python-highlight global WinSetOption filetype=(?!python).* %{ rmhl python } +hook -group python-highlight global WinSetOption filetype=(?!python).* %{ remove-highlighter python } hook global WinSetOption filetype=(?!python).* %{ - rmhooks window python-indent + remove-hooks window python-indent } diff --git a/rc/core/sh.kak b/rc/core/sh.kak index 07e3321a..341114d9 100644 --- a/rc/core/sh.kak +++ b/rc/core/sh.kak @@ -2,14 +2,14 @@ hook global BufCreate .*\.(z|ba|c|k)?sh(rc|_profile)? %{ set buffer filetype sh } -addhl -group / regions -default code sh \ +add-highlighter -group / regions -default code sh \ double_string %{(?]?=?)?\d+(\.\d+)+) 0:value -addhl -group /cabal/code regex \b(if|else)\b 0:keyword -addhl -group /cabal/code regex ^\h*([A-Za-z][A-Za-z0-9_-]*)\h*: 1:identifier +add-highlighter -group /cabal/code regex \b(true|false)\b|(([<>]?=?)?\d+(\.\d+)+) 0:value +add-highlighter -group /cabal/code regex \b(if|else)\b 0:keyword +add-highlighter -group /cabal/code regex ^\h*([A-Za-z][A-Za-z0-9_-]*)\h*: 1:identifier # Commands # ‾‾‾‾‾‾‾‾ @@ -59,7 +59,7 @@ def -hidden _cabal_indent_on_closing_curly_brace %[ # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group cabal-highlight global WinSetOption filetype=cabal %{ addhl ref cabal } +hook -group cabal-highlight global WinSetOption filetype=cabal %{ add-highlighter ref cabal } hook global WinSetOption filetype=cabal %[ hook window InsertEnd .* -group cabal-hooks _cabal_filter_around_selections @@ -68,9 +68,9 @@ hook global WinSetOption filetype=cabal %[ hook window InsertChar \} -group cabal-indent _cabal_indent_on_closing_curly_brace ] -hook -group cabal-highlight global WinSetOption filetype=(?!cabal).* %{ rmhl cabal } +hook -group cabal-highlight global WinSetOption filetype=(?!cabal).* %{ remove-highlighter cabal } hook global WinSetOption filetype=(?!cabal).* %{ - rmhooks window cabal-indent - rmhooks window cabal-hooks + remove-hooks window cabal-indent + remove-hooks window cabal-hooks } diff --git a/rc/extra/clang.kak b/rc/extra/clang.kak index 2a4d6f50..cf6c31d3 100644 --- a/rc/extra/clang.kak +++ b/rc/extra/clang.kak @@ -25,7 +25,7 @@ The syntaxic errors detected during parsing are shown when auto-diagnostics are set buffer make_current_error_line 0 hook -group fifo buffer BufCloseFifo .* %{ nop %sh{ rm -r ${dir} } - rmhooks buffer fifo + remove-hooks buffer fifo } }" # this runs in a detached shell, asynchronously, so that kakoune does @@ -126,7 +126,7 @@ def clang-enable-autocomplete -docstring "Enable automatic clang completion" %{ def clang-disable-autocomplete -docstring "Disable automatic clang completion" %{ set window completers %sh{ printf %s\\n "'${kak_opt_completers}'" | sed -e 's/option=clang_completions://g' } - rmhooks window clang-autocomplete + remove-hooks window clang-autocomplete unalias window complete clang-complete } @@ -140,14 +140,14 @@ def -hidden clang-show-error-info %{ %sh{ def clang-enable-diagnostics -docstring %{Activate automatic error reporting and diagnostics Information about the analysis are showned after the buffer has been parsed with the clang-parse function} \ %{ - addhl flag_lines default clang_flags + add-highlighter flag_lines default clang_flags hook window -group clang-diagnostics NormalIdle .* %{ clang-show-error-info } hook window -group clang-diagnostics WinSetOption ^clang_errors=.* %{ info; clang-show-error-info } } def clang-disable-diagnostics -docstring "Disable automatic error reporting and diagnostics" %{ - rmhl hlflags_clang_flags - rmhooks window clang-diagnostics + remove-highlighter hlflags_clang_flags + remove-hooks window clang-diagnostics } def clang-diagnostics-next -docstring "Jump to the next line that contains an error" %{ %sh{ diff --git a/rc/extra/coffee.kak b/rc/extra/coffee.kak index c888a05e..384b533c 100644 --- a/rc/extra/coffee.kak +++ b/rc/extra/coffee.kak @@ -11,7 +11,7 @@ hook global BufCreate .*[.](coffee) %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code coffee \ +add-highlighter -group / regions -default code coffee \ double_string '"""' '"""' '' \ single_string "'''" "'''" '' \ comment '###' '###' '' \ @@ -24,23 +24,23 @@ addhl -group / regions -default code coffee \ # Regular expression flags are: g → global match, i → ignore case, m → multi-lines, y → sticky # https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp -addhl -group /coffee/double_string fill string -addhl -group /coffee/double_string regions regions interpolation \Q#{ \} \{ -addhl -group /coffee/double_string/regions/interpolation fill meta -addhl -group /coffee/single_string fill string -addhl -group /coffee/regex fill meta -addhl -group /coffee/regex regions regions interpolation \Q#{ \} \{ -addhl -group /coffee/regex/regions/interpolation fill meta -addhl -group /coffee/comment fill comment +add-highlighter -group /coffee/double_string fill string +add-highlighter -group /coffee/double_string regions regions interpolation \Q#{ \} \{ +add-highlighter -group /coffee/double_string/regions/interpolation fill meta +add-highlighter -group /coffee/single_string fill string +add-highlighter -group /coffee/regex fill meta +add-highlighter -group /coffee/regex regions regions interpolation \Q#{ \} \{ +add-highlighter -group /coffee/regex/regions/interpolation fill meta +add-highlighter -group /coffee/comment fill comment # Keywords are collected at # https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords # http://coffeescript.org/documentation/docs/lexer.html#section-63 -addhl -group /coffee/code regex [$@]\w* 0:identifier -addhl -group /coffee/code regex \b(Array|Boolean|Date|Function|Number|Object|RegExp|String)\b 0:type -addhl -group /coffee/code regex \b(document|false|no|null|off|on|parent|self|this|true|undefined|window|yes)\b 0:value -addhl -group /coffee/code regex \b(and|is|isnt|not|or)\b 0:operator -addhl -group /coffee/code regex \b(break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|function|if|implements|import|in|instanceof|interface|let|native|new|package|private|protected|public|return|static|super|switch|throw|try|typeof|var|void|while|with|yield)\b 0:keyword +add-highlighter -group /coffee/code regex [$@]\w* 0:identifier +add-highlighter -group /coffee/code regex \b(Array|Boolean|Date|Function|Number|Object|RegExp|String)\b 0:type +add-highlighter -group /coffee/code regex \b(document|false|no|null|off|on|parent|self|this|true|undefined|window|yes)\b 0:value +add-highlighter -group /coffee/code regex \b(and|is|isnt|not|or)\b 0:operator +add-highlighter -group /coffee/code regex \b(break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|function|if|implements|import|in|instanceof|interface|let|native|new|package|private|protected|public|return|static|super|switch|throw|try|typeof|var|void|while|with|yield)\b 0:keyword # Commands # ‾‾‾‾‾‾‾‾ @@ -69,16 +69,16 @@ def -hidden _coffee_indent_on_new_line %{ # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group coffee-highlight global WinSetOption filetype=coffee %{ addhl ref coffee } +hook -group coffee-highlight global WinSetOption filetype=coffee %{ add-highlighter ref coffee } hook global WinSetOption filetype=coffee %{ hook window InsertEnd .* -group coffee-hooks _coffee_filter_around_selections hook window InsertChar \n -group coffee-indent _coffee_indent_on_new_line } -hook -group coffee-highlight global WinSetOption filetype=(?!coffee).* %{ rmhl coffee } +hook -group coffee-highlight global WinSetOption filetype=(?!coffee).* %{ remove-highlighter coffee } hook global WinSetOption filetype=(?!coffee).* %{ - rmhooks window coffee-indent - rmhooks window coffee-hooks + remove-hooks window coffee-indent + remove-hooks window coffee-hooks } diff --git a/rc/extra/cucumber.kak b/rc/extra/cucumber.kak index 4c0e01af..3a44c3ee 100644 --- a/rc/extra/cucumber.kak +++ b/rc/extra/cucumber.kak @@ -11,14 +11,14 @@ hook global BufCreate .*[.](feature|story) %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code cucumber \ +add-highlighter -group / regions -default code cucumber \ language ^\h*#\h*language: $ '' \ comment ^\h*# $ '' -addhl -group /cucumber/language fill meta -addhl -group /cucumber/comment fill comment +add-highlighter -group /cucumber/language fill meta +add-highlighter -group /cucumber/comment fill comment -addhl -group /cucumber/language regex \S+$ 0:value +add-highlighter -group /cucumber/language regex \S+$ 0:value # Spoken languages # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ @@ -51,7 +51,7 @@ addhl -group /cucumber/language regex \S+$ 0:value # … # } -addhl -group /cucumber/code regex \b(Feature|Business\h+Need|Ability|Background|Scenario|Scenario\h+Outline|Scenario\h+Template|Examples|Scenarios|Given|When|Then|And|But)\b 0:keyword +add-highlighter -group /cucumber/code regex \b(Feature|Business\h+Need|Ability|Background|Scenario|Scenario\h+Outline|Scenario\h+Template|Examples|Scenarios|Given|When|Then|And|But)\b 0:keyword # Commands # ‾‾‾‾‾‾‾‾ @@ -77,16 +77,16 @@ def -hidden _cucumber_indent_on_new_line %{ # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group cucumber-highlight global WinSetOption filetype=cucumber %{ addhl ref cucumber } +hook -group cucumber-highlight global WinSetOption filetype=cucumber %{ add-highlighter ref cucumber } hook global WinSetOption filetype=cucumber %{ hook window InsertEnd .* -group cucumber-hooks _cucumber_filter_around_selections hook window InsertChar \n -group cucumber-indent _cucumber_indent_on_new_line } -hook -group cucumber-highlight global WinSetOption filetype=(?!cucumber).* %{ rmhl cucumber } +hook -group cucumber-highlight global WinSetOption filetype=(?!cucumber).* %{ remove-highlighter cucumber } hook global WinSetOption filetype=(?!cucumber).* %{ - rmhooks window cucumber-indent - rmhooks window cucumber-hooks + remove-hooks window cucumber-indent + remove-hooks window cucumber-hooks } diff --git a/rc/extra/dockerfile.kak b/rc/extra/dockerfile.kak index 39769c32..253f8383 100644 --- a/rc/extra/dockerfile.kak +++ b/rc/extra/dockerfile.kak @@ -13,30 +13,30 @@ hook global BufCreate .*Dockerfile %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions dockerfile \ +add-highlighter -group / regions dockerfile \ instruction '^(?i)(ONBUILD\h+)?(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR)' '$' '' \ comment '#' '$' '' -addhl -group /dockerfile/instruction regex '^(?i)(ONBUILD\h+)?(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR)' 0:keyword +add-highlighter -group /dockerfile/instruction regex '^(?i)(ONBUILD\h+)?(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR)' 0:keyword -addhl -group /dockerfile/instruction regions regions \ +add-highlighter -group /dockerfile/instruction regions regions \ plain '^(?i)(ONBUILD\h+)?(LABEL|ENV)' '$' '' \ json '^(?i)(ONBUILD\h+)?(RUN|CMD|ADD|COPY|ENTRYPOINT|VOLUME)\h+\[' \] \[ \ sh '^(?i)(ONBUILD\h+)?(RUN|CMD|ENTRYPOINT)\h+([A-Z/a-z])+' '$' '' -addhl -group /dockerfile/instruction/regions/plain regions regions \ +add-highlighter -group /dockerfile/instruction/regions/plain regions regions \ string '"' '(?]+@.*?> 0:string -addhl -group /glep42 regex ^>.*?$ 0:comment +add-highlighter -group / group glep42 +add-highlighter -group /glep42 regex ^(Title|Author|Translator|Content-Type|Posted|Revision|News-Item-Format|Display-If-Installed|Display-If-Keyword|Display-If-Profile):([^\n]*(?:\n\h+[^\n]+)*)$ 1:keyword 2:attribute +add-highlighter -group /glep42 regex <[^@>]+@.*?> 0:string +add-highlighter -group /glep42 regex ^>.*?$ 0:comment -hook -group glep42-highlight global WinSetOption filetype=glep42 %{ addhl ref glep42 } -hook -group glep42-highlight global WinSetOption filetype=(?!glep42).* %{ rmhl glep42 } +hook -group glep42-highlight global WinSetOption filetype=glep42 %{ add-highlighter ref glep42 } +hook -group glep42-highlight global WinSetOption filetype=(?!glep42).* %{ remove-highlighter glep42 } diff --git a/rc/extra/git-tools.kak b/rc/extra/git-tools.kak index cbe98d72..e20f9c43 100644 --- a/rc/extra/git-tools.kak +++ b/rc/extra/git-tools.kak @@ -1,20 +1,20 @@ decl str docsclient hook -group git-log-highlight global WinSetOption filetype=git-log %{ - addhl group git-log-highlight - addhl -group git-log-highlight regex '^(commit) ([0-9a-f]+)$' 1:yellow 2:red - addhl -group git-log-highlight regex '^([a-zA-Z_-]+:) (.*?)$' 1:green 2:magenta - addhl -group git-log-highlight ref diff # highlight potential diffs from the -p option + add-highlighter group git-log-highlight + add-highlighter -group git-log-highlight regex '^(commit) ([0-9a-f]+)$' 1:yellow 2:red + add-highlighter -group git-log-highlight regex '^([a-zA-Z_-]+:) (.*?)$' 1:green 2:magenta + add-highlighter -group git-log-highlight ref diff # highlight potential diffs from the -p option } -hook -group git-log-highlight global WinSetOption filetype=(?!git-log).* %{ rmhl git-log-highlight } +hook -group git-log-highlight global WinSetOption filetype=(?!git-log).* %{ remove-highlighter git-log-highlight } hook -group git-status-highlight global WinSetOption filetype=git-status %{ - addhl group git-status-highlight - addhl -group git-status-highlight regex '^\h+(?:((?:both )?modified:)|(added:|new file:)|(deleted(?: by \w+)?:)|(renamed:)|(copied:))(?:.*?)$' 1:yellow 2:green 3:red 4:cyan 5:blue 6:magenta + add-highlighter group git-status-highlight + add-highlighter -group git-status-highlight regex '^\h+(?:((?:both )?modified:)|(added:|new file:)|(deleted(?: by \w+)?:)|(renamed:)|(copied:))(?:.*?)$' 1:yellow 2:green 3:red 4:cyan 5:blue 6:magenta } -hook -group git-status-highlight global WinSetOption filetype=(?!git-status).* %{ rmhl git-status-highlight } +hook -group git-status-highlight global WinSetOption filetype=(?!git-status).* %{ remove-highlighter git-status-highlight } decl line-flags git_blame_flags decl line-flags git_diff_flags @@ -47,7 +47,7 @@ Available commands:\n-add\n-rm\n-blame\n-commit\n-checkout\n-diff\n-hide-blame\n set buffer filetype '${filetype}' hook -group fifo buffer BufCloseFifo .* %{ nop %sh{ rm -r $(dirname ${output}) } - rmhooks buffer fifo + remove-hooks buffer fifo } }" } @@ -55,7 +55,7 @@ Available commands:\n-add\n-rm\n-blame\n-commit\n-checkout\n-diff\n-hide-blame\n run_git_blame() { ( printf %s "eval -client '$kak_client' %{ - try %{ addhl flag_lines GitBlame git_blame_flags } + try %{ add-highlighter flag_lines GitBlame git_blame_flags } set buffer=$kak_bufname git_blame_flags '$kak_timestamp' }" | kak -p ${kak_session} git blame "$@" --incremental ${kak_buffile} | awk ' @@ -142,11 +142,11 @@ Available commands:\n-add\n-rm\n-blame\n-commit\n-checkout\n-diff\n-hide-blame\n hide-blame) printf %s "try %{ set buffer=$kak_bufname git_blame_flags '' - rmhl hlflags_git_blame_flags + remove-highlighter hlflags_git_blame_flags }" ;; show-diff) - echo 'try %{ addhl flag_lines GitDiffFlags git_diff_flags }' + echo 'try %{ add-highlighter flag_lines GitDiffFlags git_diff_flags }' update_diff ;; update-diff) update_diff ;; diff --git a/rc/extra/go-tools.kak b/rc/extra/go-tools.kak index b5efb355..5c3e9b12 100644 --- a/rc/extra/go-tools.kak +++ b/rc/extra/go-tools.kak @@ -44,7 +44,7 @@ def go-enable-autocomplete -docstring "Add gocode completion candidates to the c def go-disable-autocomplete -docstring "Disable gocode completion" %{ set window completers %sh{ printf %s\\n "'${kak_opt_completers}'" | sed 's/option=gocode_completions://g' } - rmhooks window go-autocomplete + remove-hooks window go-autocomplete unalias window complete go-complete } diff --git a/rc/extra/haml.kak b/rc/extra/haml.kak index 7652ee3f..79506af3 100644 --- a/rc/extra/haml.kak +++ b/rc/extra/haml.kak @@ -11,7 +11,7 @@ hook global BufCreate .*[.](haml) %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code haml \ +add-highlighter -group / regions -default code haml \ comment ^\h*/ $ '' \ eval ^\h*%([A-Za-z][A-Za-z0-9_-]*)([#.][A-Za-z][A-Za-z0-9_-]*)?\{\K|#\{\K (?=\}) \{ \ eval ^\h*[=-]\K (?=[^|]\n) '' \ @@ -21,14 +21,14 @@ addhl -group / regions -default code haml # Filters # http://haml.info/docs/yardoc/file.REFERENCE.html#filters -addhl -group /haml/comment fill comment +add-highlighter -group /haml/comment fill comment -addhl -group /haml/eval ref ruby -addhl -group /haml/coffee ref coffee -addhl -group /haml/sass ref sass +add-highlighter -group /haml/eval ref ruby +add-highlighter -group /haml/coffee ref coffee +add-highlighter -group /haml/sass ref sass -addhl -group /haml/code regex ^\h*(:[a-z]+|-|=)|^(!!!)$ 0:meta -addhl -group /haml/code regex ^\h*%([A-Za-z][A-Za-z0-9_-]*)([#.][A-Za-z][A-Za-z0-9_-]*)? 1:keyword 2:identifier +add-highlighter -group /haml/code regex ^\h*(:[a-z]+|-|=)|^(!!!)$ 0:meta +add-highlighter -group /haml/code regex ^\h*%([A-Za-z][A-Za-z0-9_-]*)([#.][A-Za-z][A-Za-z0-9_-]*)? 1:keyword 2:identifier # Commands # ‾‾‾‾‾‾‾‾ @@ -54,16 +54,16 @@ def -hidden _haml_indent_on_new_line %{ # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group haml-highlight global WinSetOption filetype=haml %{ addhl ref haml } +hook -group haml-highlight global WinSetOption filetype=haml %{ add-highlighter ref haml } hook global WinSetOption filetype=haml %{ hook window InsertEnd .* -group haml-hooks _haml_filter_around_selections hook window InsertChar \n -group haml-indent _haml_indent_on_new_line } -hook -group haml-highlight global WinSetOption filetype=(?!haml).* %{ rmhl haml } +hook -group haml-highlight global WinSetOption filetype=(?!haml).* %{ remove-highlighter haml } hook global WinSetOption filetype=(?!haml).* %{ - rmhooks window haml-indent - rmhooks window haml-hooks + remove-hooks window haml-indent + remove-hooks window haml-hooks } diff --git a/rc/extra/hbs.kak b/rc/extra/hbs.kak index 8e350ffc..8a4eab1d 100644 --- a/rc/extra/hbs.kak +++ b/rc/extra/hbs.kak @@ -11,24 +11,24 @@ hook global BufCreate .*[.](hbs) %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default html hbs \ +add-highlighter -group / regions -default html hbs \ comment {{!-- --}} '' \ comment {{! }} '' \ block-expression {{ }} '' -addhl -group /hbs/comment fill comment -addhl -group /hbs/block-expression regex {{((#|/|)(\w|-)+) 1:meta +add-highlighter -group /hbs/comment fill comment +add-highlighter -group /hbs/block-expression regex {{((#|/|)(\w|-)+) 1:meta # some hbs tags have a special meaning -addhl -group /hbs/block-expression regex {{((#|/|)(if|else|unless|with|lookup|log)) 1:keyword +add-highlighter -group /hbs/block-expression regex {{((#|/|)(if|else|unless|with|lookup|log)) 1:keyword # 'each' is special as it really is two words 'each' and 'as' -addhl -group /hbs/block-expression regex {{((#|/|)((each).*(as))) 2:keyword 4:keyword 5:keyword +add-highlighter -group /hbs/block-expression regex {{((#|/|)((each).*(as))) 2:keyword 4:keyword 5:keyword -addhl -group /hbs/block-expression regex ((\w|-)+)= 1:attribute +add-highlighter -group /hbs/block-expression regex ((\w|-)+)= 1:attribute # highlight the string values of attributes as a bonus -addhl -group /hbs/block-expression regex ((\w|-)+)=(('|").*?('|")) 1:attribute 3:value +add-highlighter -group /hbs/block-expression regex ((\w|-)+)=(('|").*?('|")) 1:attribute 3:value # Commands # ‾‾‾‾‾‾‾‾ @@ -55,8 +55,8 @@ def -hidden _hbs_indent_on_new_line %{ # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ hook -group hbs-highlight global WinSetOption filetype=hbs %{ - addhl ref hbs - addhl ref html + add-highlighter ref hbs + add-highlighter ref html } hook global WinSetOption filetype=hbs %{ @@ -65,11 +65,11 @@ hook global WinSetOption filetype=hbs %{ } hook -group hbs-highlight global WinSetOption filetype=(?!hbs).* %{ - rmhl hbs - rmhl html + remove-highlighter hbs + remove-highlighter html } hook global WinSetOption filetype=(?!hbs).* %{ - rmhooks window hbs-indent - rmhooks window hbs-hooks + remove-hooks window hbs-indent + remove-hooks window hbs-hooks } diff --git a/rc/extra/jedi.kak b/rc/extra/jedi.kak index bb79f423..8132406f 100644 --- a/rc/extra/jedi.kak +++ b/rc/extra/jedi.kak @@ -42,6 +42,6 @@ def jedi-enable-autocomplete -docstring "Add jedi completion candidates to the c def jedi-disable-autocomplete -docstring "Disable jedi completion" %{ set window completers %sh{ printf %s\\n "'${kak_opt_completers}'" | sed -e 's/option=jedi_completions://g' } - rmhooks window jedi-autocomplete + remove-hooks window jedi-autocomplete unalias window complete jedi-complete } diff --git a/rc/extra/kickstart.kak b/rc/extra/kickstart.kak index 08c8f0a1..82bff4fa 100644 --- a/rc/extra/kickstart.kak +++ b/rc/extra/kickstart.kak @@ -2,29 +2,29 @@ hook global BufCreate .*\.ks %{ set buffer filetype kickstart } -addhl -group / regions -default code kickstart \ +add-highlighter -group / regions -default code kickstart \ comment (^|\h)\K\# $ '' \ double_string '"' (?' 0:identifier -addhl -group /ragel/code regex :=|=>|->|:>|:>>|<: 0:operator -addhl -group /ragel/code regex \b(action|alnum|alpha|any|ascii|case|cntrl|contained|context|data|digit|empty|eof|err|error|exec|export|exports|extend|fblen|fbreak|fbuf|fc|fcall|fcurs|fentry|fexec|fgoto|fhold|first_final|fnext|fpc|fret|from|fstack|ftargs|graph|import|include|init|inwhen|lerr|lower|machine|nocs|noend|noerror|nofinal|noprefix|outwhen|postpop|prepush|print|punct|range|space|start|to|upper|when|write|xdigit|zlen)\b 0:keyword +add-highlighter -group /ragel/code regex \b(true|false)\b 0:value +add-highlighter -group /ragel/code regex '%%\{|\}%%|<\w+>' 0:identifier +add-highlighter -group /ragel/code regex :=|=>|->|:>|:>>|<: 0:operator +add-highlighter -group /ragel/code regex \b(action|alnum|alpha|any|ascii|case|cntrl|contained|context|data|digit|empty|eof|err|error|exec|export|exports|extend|fblen|fbreak|fbuf|fc|fcall|fcurs|fentry|fexec|fgoto|fhold|first_final|fnext|fpc|fret|from|fstack|ftargs|graph|import|include|init|inwhen|lerr|lower|machine|nocs|noend|noerror|nofinal|noprefix|outwhen|postpop|prepush|print|punct|range|space|start|to|upper|when|write|xdigit|zlen)\b 0:keyword # Commands # ‾‾‾‾‾‾‾‾ @@ -58,7 +58,7 @@ def -hidden _ragel_indent_on_new_line %< # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group ragel-highlight global WinSetOption filetype=ragel %{ addhl ref ragel } +hook -group ragel-highlight global WinSetOption filetype=ragel %{ add-highlighter ref ragel } hook global WinSetOption filetype=ragel %{ hook window InsertEnd .* -group ragel-hooks _ragel_filter_around_selections @@ -66,9 +66,9 @@ hook global WinSetOption filetype=ragel %{ hook window InsertChar \n -group ragel-indent _ragel_indent_on_new_line } -hook -group ragel-highlight global WinSetOption filetype=(?!ragel).* %{ rmhl ragel } +hook -group ragel-highlight global WinSetOption filetype=(?!ragel).* %{ remove-highlighter ragel } hook global WinSetOption filetype=(?!ragel).* %{ - rmhooks window ragel-indent - rmhooks window ragel-hooks + remove-hooks window ragel-indent + remove-hooks window ragel-hooks } diff --git a/rc/extra/sass.kak b/rc/extra/sass.kak index fe981b46..bb5f9846 100644 --- a/rc/extra/sass.kak +++ b/rc/extra/sass.kak @@ -11,20 +11,20 @@ hook global BufCreate .*[.](sass) %{ # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code sass \ +add-highlighter -group / regions -default code sass \ string '"' (?