From 43f50c0852a6f95abbcdf81f9d3bab9eeefbde0d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 21 Jan 2018 10:35:05 +1100 Subject: [PATCH] Convert bundled scripts to ModeChange hook --- rc/base/clojure.kak | 2 +- rc/base/css.kak | 2 +- rc/base/d.kak | 2 +- rc/base/go.kak | 2 +- rc/base/haskell.kak | 2 +- rc/base/html.kak | 2 +- rc/base/java.kak | 2 +- rc/base/javascript.kak | 2 +- rc/base/json.kak | 2 +- rc/base/lisp.kak | 2 +- rc/base/perl.kak | 2 +- rc/base/rust.kak | 2 +- rc/base/scala.kak | 2 +- rc/base/yaml.kak | 2 +- rc/core/c-family.kak | 2 +- rc/core/kakrc.kak | 2 +- rc/core/python.kak | 2 +- rc/extra/cabal.kak | 2 +- rc/extra/coffee.kak | 2 +- rc/extra/cucumber.kak | 2 +- rc/extra/elixir.kak | 2 +- rc/extra/elm.kak | 2 +- rc/extra/haml.kak | 2 +- rc/extra/hbs.kak | 2 +- rc/extra/moon.kak | 2 +- rc/extra/nim.kak | 2 +- rc/extra/php.kak | 2 +- rc/extra/pony.kak | 2 +- rc/extra/pug.kak | 2 +- rc/extra/ragel.kak | 2 +- rc/extra/sass.kak | 2 +- rc/extra/scss.kak | 2 +- rc/extra/typescript.kak | 2 +- 33 files changed, 33 insertions(+), 33 deletions(-) diff --git a/rc/base/clojure.kak b/rc/base/clojure.kak index 00c7ca46..f2e4b0bf 100644 --- a/rc/base/clojure.kak +++ b/rc/base/clojure.kak @@ -30,7 +30,7 @@ define-command -hidden clojure-indent-on-new-line lisp-indent-on-new-line hook -group clojure-highlight global WinSetOption filetype=clojure %{ add-highlighter window ref clojure } hook global WinSetOption filetype=clojure %[ - hook window InsertEnd .* -group clojure-hooks clojure-filter-around-selections + hook window ModeChange insert:.* -group clojure-hooks clojure-filter-around-selections hook window InsertChar \n -group clojure-indent clojure-indent-on-new-line ] diff --git a/rc/base/css.kak b/rc/base/css.kak index 73695397..2fbb17c5 100644 --- a/rc/base/css.kak +++ b/rc/base/css.kak @@ -67,7 +67,7 @@ define-command -hidden css-indent-on-closing-curly-brace %[ hook -group css-highlight global WinSetOption filetype=css %{ add-highlighter window ref css } hook global WinSetOption filetype=css %[ - hook window InsertEnd .* -group css-hooks css-filter-around-selections + hook window ModeChange insert:.* -group css-hooks css-filter-around-selections hook window InsertChar \n -group css-indent css-indent-on-new-line hook window InsertChar \} -group css-indent css-indent-on-closing-curly-brace ] diff --git a/rc/base/d.kak b/rc/base/d.kak index 4f245f8e..45e613e5 100644 --- a/rc/base/d.kak +++ b/rc/base/d.kak @@ -117,7 +117,7 @@ hook -group d-highlight global WinSetOption filetype=d %{ add-highlighter window hook global WinSetOption filetype=d %{ # cleanup trailing whitespaces when exiting insert mode - hook window InsertEnd .* -group d-hooks %{ try %{ execute-keys -draft s^\h+$d } } + hook window ModeChange insert:.* -group d-hooks %{ try %{ execute-keys -draft s^\h+$d } } hook window InsertChar \n -group d-indent d-indent-on-new-line hook window InsertChar \{ -group d-indent d-indent-on-opening-curly-brace hook window InsertChar \} -group d-indent d-indent-on-closing-curly-brace diff --git a/rc/base/go.kak b/rc/base/go.kak index b37d813b..1a0a2cfc 100644 --- a/rc/base/go.kak +++ b/rc/base/go.kak @@ -89,7 +89,7 @@ hook -group go-highlight global WinSetOption filetype=go %{ add-highlighter wind hook global WinSetOption filetype=go %{ # cleanup trailing whitespaces when exiting insert mode - hook window InsertEnd .* -group go-hooks %{ try %{ execute-keys -draft s^\h+$d } } + hook window ModeChange insert:.* -group go-hooks %{ try %{ execute-keys -draft s^\h+$d } } hook window InsertChar \n -group go-indent go-indent-on-new-line hook window InsertChar \{ -group go-indent go-indent-on-opening-curly-brace hook window InsertChar \} -group go-indent go-indent-on-closing-curly-brace diff --git a/rc/base/haskell.kak b/rc/base/haskell.kak index 91cf852f..cf06fade 100644 --- a/rc/base/haskell.kak +++ b/rc/base/haskell.kak @@ -99,7 +99,7 @@ hook -group haskell-highlight global WinSetOption filetype=haskell %{ add-highli hook global WinSetOption filetype=haskell %{ set-option window extra_word_chars "'" - hook window InsertEnd .* -group haskell-hooks haskell-filter-around-selections + hook window ModeChange insert:.* -group haskell-hooks haskell-filter-around-selections hook window InsertChar \n -group haskell-indent haskell-indent-on-new-line } diff --git a/rc/base/html.kak b/rc/base/html.kak index e4f465ca..b7b792ac 100644 --- a/rc/base/html.kak +++ b/rc/base/html.kak @@ -68,7 +68,7 @@ define-command -hidden html-indent-on-new-line %{ hook -group html-highlight global WinSetOption filetype=(?:html|xml) %{ add-highlighter window ref html } hook global WinSetOption filetype=(?:html|xml) %{ - hook window InsertEnd .* -group html-hooks html-filter-around-selections + hook window ModeChange insert:.* -group html-hooks html-filter-around-selections hook window InsertChar '>' -group html-indent html-indent-on-greater-than hook window InsertChar \n -group html-indent html-indent-on-new-line } diff --git a/rc/base/java.kak b/rc/base/java.kak index 2d107e43..a28a80d5 100644 --- a/rc/base/java.kak +++ b/rc/base/java.kak @@ -51,7 +51,7 @@ define-command -hidden java-indent-on-closing-curly-brace %[ # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ hook global WinSetOption filetype=java %{ # cleanup trailing whitespaces when exiting insert mode - hook window InsertEnd .* -group java-hooks %{ try %{ execute-keys -draft s^\h+$d } } + hook window ModeChange insert:.* -group java-hooks %{ try %{ execute-keys -draft s^\h+$d } } hook window InsertChar \n -group java-indent java-indent-on-new-line hook window InsertChar \{ -group java-indent java-indent-on-opening-curly-brace hook window InsertChar \} -group java-indent java-indent-on-closing-curly-brace diff --git a/rc/base/javascript.kak b/rc/base/javascript.kak index 6f4a7a2b..60a81573 100644 --- a/rc/base/javascript.kak +++ b/rc/base/javascript.kak @@ -70,7 +70,7 @@ define-command -hidden javascript-indent-on-new-line %< hook -group javascript-highlight global WinSetOption filetype=javascript %{ add-highlighter window ref javascript } hook global WinSetOption filetype=javascript %{ - hook window InsertEnd .* -group javascript-hooks javascript-filter-around-selections + hook window ModeChange insert:.* -group javascript-hooks javascript-filter-around-selections hook window InsertChar .* -group javascript-indent javascript-indent-on-char hook window InsertChar \n -group javascript-indent javascript-indent-on-new-line } diff --git a/rc/base/json.kak b/rc/base/json.kak index c53193d0..30e70255 100644 --- a/rc/base/json.kak +++ b/rc/base/json.kak @@ -50,7 +50,7 @@ define-command -hidden json-indent-on-new-line %< hook -group json-highlight global WinSetOption filetype=json %{ add-highlighter window ref json } hook global WinSetOption filetype=json %{ - hook window InsertEnd .* -group json-hooks json-filter-around-selections + hook window ModeChange insert:.* -group json-hooks json-filter-around-selections hook window InsertChar .* -group json-indent json-indent-on-char hook window InsertChar \n -group json-indent json-indent-on-new-line } diff --git a/rc/base/lisp.kak b/rc/base/lisp.kak index c85b39bf..703a0e00 100644 --- a/rc/base/lisp.kak +++ b/rc/base/lisp.kak @@ -46,7 +46,7 @@ define-command -hidden lisp-indent-on-new-line %{ hook -group lisp-highlight global WinSetOption filetype=lisp %{ add-highlighter window ref lisp } hook global WinSetOption filetype=lisp %{ - hook window InsertEnd .* -group lisp-hooks lisp-filter-around-selections + hook window ModeChange insert:.* -group lisp-hooks lisp-filter-around-selections hook window InsertChar \n -group lisp-indent lisp-indent-on-new-line } diff --git a/rc/base/perl.kak b/rc/base/perl.kak index 04dc9ec4..cf42fffe 100644 --- a/rc/base/perl.kak +++ b/rc/base/perl.kak @@ -106,7 +106,7 @@ hook -group perl-highlight global WinSetOption filetype=perl %{ add-highlighter hook global WinSetOption filetype=perl %{ # cleanup trailing whitespaces when exiting insert mode - hook window InsertEnd .* -group perl-hooks %{ try %{ execute-keys -draft s^\h+$d } } + hook window ModeChange insert:.* -group perl-hooks %{ try %{ execute-keys -draft s^\h+$d } } hook window InsertChar \n -group perl-indent perl-indent-on-new-line hook window InsertChar \{ -group perl-indent perl-indent-on-opening-curly-brace hook window InsertChar \} -group perl-indent perl-indent-on-closing-curly-brace diff --git a/rc/base/rust.kak b/rc/base/rust.kak index 9909cb8e..3573cf7d 100644 --- a/rc/base/rust.kak +++ b/rc/base/rust.kak @@ -74,7 +74,7 @@ define-command -hidden rust-indent-on-closing-curly-brace %[ hook -group rust-highlight global WinSetOption filetype=rust %{ add-highlighter window ref rust } hook global WinSetOption filetype=rust %[ - hook window InsertEnd .* -group rust-hooks rust-filter-around-selections + hook window ModeChange insert:.* -group rust-hooks rust-filter-around-selections hook window InsertChar \n -group rust-indent rust-indent-on-new-line hook window InsertChar \{ -group rust-indent rust-indent-on-opening-curly-brace hook window InsertChar \} -group rust-indent rust-indent-on-closing-curly-brace diff --git a/rc/base/scala.kak b/rc/base/scala.kak index 559e58f2..1e51e993 100644 --- a/rc/base/scala.kak +++ b/rc/base/scala.kak @@ -65,7 +65,7 @@ define-command -hidden scala-indent-on-closing-curly-brace %[ hook -group scala-highlight global WinSetOption filetype=scala %{ add-highlighter window ref scala } hook global WinSetOption filetype=scala %[ - hook window InsertEnd .* -group scala-hooks scala-filter-around-selections + hook window ModeChange insert:.* -group scala-hooks scala-filter-around-selections hook window InsertChar \n -group scala-indent scala-indent-on-new-line hook window InsertChar \} -group scala-indent scala-indent-on-closing-curly-brace ] diff --git a/rc/base/yaml.kak b/rc/base/yaml.kak index 82c683bb..ee7b7030 100644 --- a/rc/base/yaml.kak +++ b/rc/base/yaml.kak @@ -52,7 +52,7 @@ define-command -hidden yaml-indent-on-new-line %{ hook -group yaml-highlight global WinSetOption filetype=yaml %{ add-highlighter window ref yaml } hook global WinSetOption filetype=yaml %{ - hook window InsertEnd .* -group yaml-hooks yaml-filter-around-selections + hook window ModeChange insert:.* -group yaml-hooks yaml-filter-around-selections hook window InsertChar \n -group yaml-indent yaml-indent-on-new-line } diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak index b44a8e57..362f9af9 100644 --- a/rc/core/c-family.kak +++ b/rc/core/c-family.kak @@ -277,7 +277,7 @@ hook global WinSetOption filetype=(c|cpp|objc) %[ remove-hooks window c-family-insert } - hook -group c-family-indent window InsertEnd .* c-family-trim-autoindent + hook -group c-family-indent window ModeChange insert:.* c-family-trim-autoindent hook -group c-family-insert window InsertChar \n c-family-insert-on-newline hook -group c-family-indent window InsertChar \n c-family-indent-on-newline hook -group c-family-indent window InsertChar \{ c-family-indent-on-opening-curly-brace diff --git a/rc/core/kakrc.kak b/rc/core/kakrc.kak index 95d07ef1..11bcfa91 100644 --- a/rc/core/kakrc.kak +++ b/rc/core/kakrc.kak @@ -85,7 +85,7 @@ hook -group kak-highlight global WinSetOption filetype=kak %{ add-highlighter wi hook global WinSetOption filetype=kak %{ hook window InsertChar \n -group kak-indent kak-indent-on-new-line # cleanup trailing whitespaces on current line insert end - hook window InsertEnd .* -group kak-indent %{ try %{ execute-keys -draft \; s ^\h+$ d } } + hook window ModeChange insert:.* -group kak-indent %{ try %{ execute-keys -draft \; s ^\h+$ d } } set-option buffer extra_word_chars '-' } diff --git a/rc/core/python.kak b/rc/core/python.kak index a0f66217..aee37957 100644 --- a/rc/core/python.kak +++ b/rc/core/python.kak @@ -147,7 +147,7 @@ hook -group python-highlight global WinSetOption filetype=python %{ add-highligh hook global WinSetOption filetype=python %{ hook window InsertChar \n -group python-indent python-indent-on-new-line # cleanup trailing whitespaces on current line insert end - hook window InsertEnd .* -group python-indent %{ try %{ execute-keys -draft \; s ^\h+$ d } } + hook window ModeChange insert:.* -group python-indent %{ try %{ execute-keys -draft \; s ^\h+$ d } } } hook -group python-highlight global WinSetOption filetype=(?!python).* %{ remove-highlighter window/python } diff --git a/rc/extra/cabal.kak b/rc/extra/cabal.kak index 7500270c..435dcd4e 100644 --- a/rc/extra/cabal.kak +++ b/rc/extra/cabal.kak @@ -62,7 +62,7 @@ define-command -hidden cabal-indent-on-closing-curly-brace %[ hook -group cabal-highlight global WinSetOption filetype=cabal %{ add-highlighter window ref cabal } hook global WinSetOption filetype=cabal %[ - hook window InsertEnd .* -group cabal-hooks cabal-filter-around-selections + hook window ModeChange insert:.* -group cabal-hooks cabal-filter-around-selections hook window InsertChar \n -group cabal-indent cabal-indent-on-new-line hook window InsertChar \{ -group cabal-indent cabal-indent-on-opening-curly-brace hook window InsertChar \} -group cabal-indent cabal-indent-on-closing-curly-brace diff --git a/rc/extra/coffee.kak b/rc/extra/coffee.kak index 91ddfdec..0e523fa7 100644 --- a/rc/extra/coffee.kak +++ b/rc/extra/coffee.kak @@ -72,7 +72,7 @@ define-command -hidden coffee-indent-on-new-line %{ hook -group coffee-highlight global WinSetOption filetype=coffee %{ add-highlighter window ref coffee } hook global WinSetOption filetype=coffee %{ - hook window InsertEnd .* -group coffee-hooks coffee-filter-around-selections + hook window ModeChange insert:.* -group coffee-hooks coffee-filter-around-selections hook window InsertChar \n -group coffee-indent coffee-indent-on-new-line } diff --git a/rc/extra/cucumber.kak b/rc/extra/cucumber.kak index 06a100aa..f31c987d 100644 --- a/rc/extra/cucumber.kak +++ b/rc/extra/cucumber.kak @@ -80,7 +80,7 @@ define-command -hidden cucumber-indent-on-new-line %{ hook -group cucumber-highlight global WinSetOption filetype=cucumber %{ add-highlighter window ref cucumber } hook global WinSetOption filetype=cucumber %{ - hook window InsertEnd .* -group cucumber-hooks cucumber-filter-around-selections + hook window ModeChange insert:.* -group cucumber-hooks cucumber-filter-around-selections hook window InsertChar \n -group cucumber-indent cucumber-indent-on-new-line } diff --git a/rc/extra/elixir.kak b/rc/extra/elixir.kak index 30927773..1480506d 100644 --- a/rc/extra/elixir.kak +++ b/rc/extra/elixir.kak @@ -68,7 +68,7 @@ define-command -hidden elixir-indent-on-new-line %{ hook -group elixir-highlight global WinSetOption filetype=elixir %{ add-highlighter window ref elixir } hook global WinSetOption filetype=elixir %{ - hook window InsertEnd .* -group elixir-hooks elixir-filter-around-selections + hook window ModeChange insert:.* -group elixir-hooks elixir-filter-around-selections hook window InsertChar \n -group elixir-indent elixir-indent-on-new-line } diff --git a/rc/extra/elm.kak b/rc/extra/elm.kak index 5ab8eade..170bd355 100644 --- a/rc/extra/elm.kak +++ b/rc/extra/elm.kak @@ -59,7 +59,7 @@ define-command -hidden elm-indent-on-new-line %{ hook -group elm-highlight global WinSetOption filetype=elm %{ add-highlighter window ref elm } hook global WinSetOption filetype=elm %{ - hook window InsertEnd .* -group elm-hooks elm-filter-around-selections + hook window ModeChange insert:.* -group elm-hooks elm-filter-around-selections hook window InsertChar \n -group elm-indent elm-indent-on-new-line } diff --git a/rc/extra/haml.kak b/rc/extra/haml.kak index 846a4f72..16925fdd 100644 --- a/rc/extra/haml.kak +++ b/rc/extra/haml.kak @@ -57,7 +57,7 @@ define-command -hidden haml-indent-on-new-line %{ hook -group haml-highlight global WinSetOption filetype=haml %{ add-highlighter window ref haml } hook global WinSetOption filetype=haml %{ - hook window InsertEnd .* -group haml-hooks haml-filter-around-selections + hook window ModeChange insert:.* -group haml-hooks haml-filter-around-selections hook window InsertChar \n -group haml-indent haml-indent-on-new-line } diff --git a/rc/extra/hbs.kak b/rc/extra/hbs.kak index 3c817e75..9aa03c60 100644 --- a/rc/extra/hbs.kak +++ b/rc/extra/hbs.kak @@ -60,7 +60,7 @@ hook -group hbs-highlight global WinSetOption filetype=hbs %{ } hook global WinSetOption filetype=hbs %{ - hook window InsertEnd .* -group hbs-hooks hbs-filter-around-selections + hook window ModeChange insert:.* -group hbs-hooks hbs-filter-around-selections hook window InsertChar \n -group hbs-indent hbs-indent-on-new-line } diff --git a/rc/extra/moon.kak b/rc/extra/moon.kak index 2aa3188d..f027c41e 100644 --- a/rc/extra/moon.kak +++ b/rc/extra/moon.kak @@ -95,7 +95,7 @@ define-command -hidden moon-indent-on-new-line %{ hook -group moon-highlight global WinSetOption filetype=moon %{ add-highlighter window ref moon } hook global WinSetOption filetype=moon %{ - hook window InsertEnd .* -group moon-hooks moon-filter-around-selections + hook window ModeChange insert:.* -group moon-hooks moon-filter-around-selections hook window InsertChar .* -group moon-indent moon-indent-on-char hook window InsertChar \n -group moon-indent moon-indent-on-new-line diff --git a/rc/extra/nim.kak b/rc/extra/nim.kak index 3f3b8451..89f26be1 100644 --- a/rc/extra/nim.kak +++ b/rc/extra/nim.kak @@ -77,7 +77,7 @@ hook -group nim-highlight global WinSetOption filetype=nim %{ add-highlighter wi hook global WinSetOption filetype=nim %{ hook window InsertChar \n -group nim-indent nim-indent-on-new-line # cleanup trailing whitespaces on current line insert end - hook window InsertEnd .* -group nim-indent %{ try %{ exec -draft \; s ^\h+$ d } } + hook window ModeChange insert:.* -group nim-indent %{ try %{ exec -draft \; s ^\h+$ d } } } hook -group nim-highlight global WinSetOption filetype=(?!nim).* %{ remove-highlighter window/nim } diff --git a/rc/extra/php.kak b/rc/extra/php.kak index 13213d97..a65a385e 100644 --- a/rc/extra/php.kak +++ b/rc/extra/php.kak @@ -63,7 +63,7 @@ define-command -hidden php-indent-on-new-line %< hook -group php-highlight global WinSetOption filetype=php %{ add-highlighter window ref php } hook global WinSetOption filetype=php %{ - hook window InsertEnd .* -group php-hooks php-filter-around-selections + hook window ModeChange insert:.* -group php-hooks php-filter-around-selections hook window InsertChar .* -group php-indent php-indent-on-char hook window InsertChar \n -group php-indent php-indent-on-new-line } diff --git a/rc/extra/pony.kak b/rc/extra/pony.kak index 7444639a..0be7a0cb 100644 --- a/rc/extra/pony.kak +++ b/rc/extra/pony.kak @@ -87,7 +87,7 @@ hook -group pony-highlight global WinSetOption filetype=pony %{ add-highlighter hook global WinSetOption filetype=pony %{ hook window InsertChar \n -group pony-indent pony-indent-on-new-line # cleanup trailing whitespaces on current line insert end - hook window InsertEnd .* -group pony-indent %{ try %{ execute-keys -draft \; s ^\h+$ d } } + hook window ModeChange insert:.* -group pony-indent %{ try %{ execute-keys -draft \; s ^\h+$ d } } } hook -group pony-highlight global WinSetOption filetype=(?!pony).* %{ remove-highlighter pony } diff --git a/rc/extra/pug.kak b/rc/extra/pug.kak index 927de876..767c38c3 100644 --- a/rc/extra/pug.kak +++ b/rc/extra/pug.kak @@ -68,7 +68,7 @@ define-command -hidden pug-indent-on-new-line %{ hook -group pug-highlight global WinSetOption filetype=pug %{ add-highlighter window ref pug } hook global WinSetOption filetype=pug %{ - hook window InsertEnd .* -group pug-hooks pug-filter-around-selections + hook window ModeChange insert:.* -group pug-hooks pug-filter-around-selections hook window InsertChar \n -group pug-indent pug-indent-on-new-line } diff --git a/rc/extra/ragel.kak b/rc/extra/ragel.kak index 39b072e0..78757a6c 100644 --- a/rc/extra/ragel.kak +++ b/rc/extra/ragel.kak @@ -61,7 +61,7 @@ define-command -hidden ragel-indent-on-new-line %< hook -group ragel-highlight global WinSetOption filetype=ragel %{ add-highlighter window ref ragel } hook global WinSetOption filetype=ragel %{ - hook window InsertEnd .* -group ragel-hooks ragel-filter-around-selections + hook window ModeChange insert:.* -group ragel-hooks ragel-filter-around-selections hook window InsertChar .* -group ragel-indent ragel-indent-on-char hook window InsertChar \n -group ragel-indent ragel-indent-on-new-line } diff --git a/rc/extra/sass.kak b/rc/extra/sass.kak index f3ba8f3f..2c378957 100644 --- a/rc/extra/sass.kak +++ b/rc/extra/sass.kak @@ -53,7 +53,7 @@ define-command -hidden sass-indent-on-new-line %{ hook -group sass-highlight global WinSetOption filetype=sass %{ add-highlighter window ref sass } hook global WinSetOption filetype=sass %{ - hook window InsertEnd .* -group sass-hooks sass-filter-around-selections + hook window ModeChange insert:.* -group sass-hooks sass-filter-around-selections hook window InsertChar \n -group sass-indent sass-indent-on-new-line } diff --git a/rc/extra/scss.kak b/rc/extra/scss.kak index 4fd1ebcb..27ede674 100644 --- a/rc/extra/scss.kak +++ b/rc/extra/scss.kak @@ -35,7 +35,7 @@ define-command -hidden scss-indent-on-closing-curly-brace css-indent-on-closing- hook -group scss-highlight global WinSetOption filetype=scss %{ add-highlighter window ref scss } hook global WinSetOption filetype=scss %[ - hook window InsertEnd .* -group scss-hooks scss-filter-around-selections + hook window ModeChange insert:.* -group scss-hooks scss-filter-around-selections hook window InsertChar \n -group scss-indent scss-indent-on-new-line hook window InsertChar \} -group scss-indent scss-indent-on-closing-curly-brace ] diff --git a/rc/extra/typescript.kak b/rc/extra/typescript.kak index 81ab5d6d..f79eea1c 100644 --- a/rc/extra/typescript.kak +++ b/rc/extra/typescript.kak @@ -41,7 +41,7 @@ add-highlighter shared/typescript/code regex \b(enum|as|implements|interface|pac hook -group typescript-highlight global WinSetOption filetype=typescript %{ add-highlighter window ref typescript } hook global WinSetOption filetype=javascript %{ - hook window InsertEnd .* -group typescript-hooks javascript-filter-around-selections + hook window ModeChange insert:.* -group typescript-hooks javascript-filter-around-selections hook window InsertChar .* -group typescript-indent javascript-indent-on-char hook window InsertChar \n -group typescript-indent javascript-indent-on-new-line }