From 425aa56eafd8712d6b65d6c4fcc52ae8007c0420 Mon Sep 17 00:00:00 2001 From: Delapouite Date: Wed, 19 Sep 2018 19:59:57 +0200 Subject: [PATCH] Use remove-hooks regex in rc --- rc/base/clojure.kak | 3 +-- rc/base/css.kak | 3 +-- rc/base/d.kak | 3 +-- rc/base/fish.kak | 3 +-- rc/base/go.kak | 3 +-- rc/base/haskell.kak | 3 +-- rc/base/html.kak | 3 +-- rc/base/java.kak | 3 +-- rc/base/json.kak | 3 +-- rc/base/lisp.kak | 3 +-- rc/base/lua.kak | 3 +-- rc/base/perl.kak | 3 +-- rc/base/ruby.kak | 3 +-- rc/base/rust.kak | 3 +-- rc/base/scala.kak | 3 +-- rc/base/yaml.kak | 3 +-- rc/core/c-family.kak | 8 ++------ rc/extra/cabal.kak | 3 +-- rc/extra/coffee.kak | 3 +-- rc/extra/cucumber.kak | 3 +-- rc/extra/dart.kak | 3 +-- rc/extra/elm.kak | 3 +-- rc/extra/haml.kak | 3 +-- rc/extra/hbs.kak | 3 +-- rc/extra/i3.kak | 3 +-- rc/extra/moon.kak | 3 +-- rc/extra/php.kak | 3 +-- rc/extra/protobuf.kak | 3 +-- rc/extra/pug.kak | 3 +-- rc/extra/ragel.kak | 3 +-- rc/extra/sass.kak | 3 +-- rc/extra/scheme.kak | 3 +-- rc/extra/scss.kak | 3 +-- rc/extra/toml.kak | 3 +-- 34 files changed, 35 insertions(+), 72 deletions(-) diff --git a/rc/base/clojure.kak b/rc/base/clojure.kak index 1e6d6c0b..7dceca3e 100644 --- a/rc/base/clojure.kak +++ b/rc/base/clojure.kak @@ -170,6 +170,5 @@ hook global WinSetOption filetype=clojure %[ hook -group clojure-highlight global WinSetOption filetype=(?!clojure).* %{ remove-highlighter window/clojure } hook global WinSetOption filetype=(?!clojure).* %{ - remove-hooks window clojure-indent - remove-hooks window clojure-hooks + remove-hooks window clojure-.+ } diff --git a/rc/base/css.kak b/rc/base/css.kak index 79bfc69e..0b250df2 100644 --- a/rc/base/css.kak +++ b/rc/base/css.kak @@ -73,6 +73,5 @@ hook global WinSetOption filetype=css %[ hook -group css-highlight global WinSetOption filetype=(?!css).* %{ remove-highlighter window/css } hook global WinSetOption filetype=(?!css).* %{ - remove-hooks window css-indent - remove-hooks window css-hooks + remove-hooks window css-.+ } diff --git a/rc/base/d.kak b/rc/base/d.kak index e41db053..6c8d9a10 100644 --- a/rc/base/d.kak +++ b/rc/base/d.kak @@ -129,6 +129,5 @@ hook global WinSetOption filetype=d %{ hook -group d-highlight global WinSetOption filetype=(?!d).* %{ remove-highlighter window/d } hook global WinSetOption filetype=(?!d).* %{ - remove-hooks window d-hooks - remove-hooks window d-indent + remove-hooks window d-.+ } diff --git a/rc/base/fish.kak b/rc/base/fish.kak index 4f73b612..06b55efc 100644 --- a/rc/base/fish.kak +++ b/rc/base/fish.kak @@ -81,6 +81,5 @@ hook global WinSetOption filetype=fish %{ hook -group fish-highlight global WinSetOption filetype=(?!fish).* %{ remove-highlighter window/fish } hook global WinSetOption filetype=(?!fish).* %{ - remove-hooks window fish-indent - remove-hooks window fish-insert + remove-hooks window fish-.+ } diff --git a/rc/base/go.kak b/rc/base/go.kak index 1bebbb25..d03aa80c 100644 --- a/rc/base/go.kak +++ b/rc/base/go.kak @@ -94,6 +94,5 @@ hook global WinSetOption filetype=go %{ hook -group go-highlight global WinSetOption filetype=(?!go).* %{ remove-highlighter window/go } hook global WinSetOption filetype=(?!go).* %{ - remove-hooks window go-hooks - remove-hooks window go-indent + remove-hooks window go-.+ } diff --git a/rc/base/haskell.kak b/rc/base/haskell.kak index d43853e7..2e5c2f0e 100644 --- a/rc/base/haskell.kak +++ b/rc/base/haskell.kak @@ -102,6 +102,5 @@ hook global WinSetOption filetype=haskell %{ hook -group haskell-highlight global WinSetOption filetype=(?!haskell).* %{ remove-highlighter window/haskell } hook global WinSetOption filetype=(?!haskell).* %{ - remove-hooks window haskell-indent - remove-hooks window haskell-hooks + remove-hooks window haskell-.+ } diff --git a/rc/base/html.kak b/rc/base/html.kak index 247d2a49..aa3fe740 100644 --- a/rc/base/html.kak +++ b/rc/base/html.kak @@ -69,6 +69,5 @@ hook global WinSetOption filetype=(?:html|xml) %{ hook -group html-highlight global WinSetOption filetype=(?!html)(?!xml).* %{ remove-highlighter window/html } hook global WinSetOption filetype=(?!html)(?!xml).* %{ - remove-hooks window html-indent - remove-hooks window html-hooks + remove-hooks window html-.+ } diff --git a/rc/base/java.kak b/rc/base/java.kak index 24e6b1a0..b71f57cd 100644 --- a/rc/base/java.kak +++ b/rc/base/java.kak @@ -57,8 +57,7 @@ hook global WinSetOption filetype=java %{ } hook global WinSetOption filetype=(?!java).* %{ - remove-hooks window java-hooks - remove-hooks window java-indent + remove-hooks window java-.+ } hook -group java-highlight global WinSetOption filetype=java %{ add-highlighter window/java ref java } hook -group java-highlight global WinSetOption filetype=(?!java).* %{ remove-highlighter window/java } diff --git a/rc/base/json.kak b/rc/base/json.kak index a2f654d4..d1fbad90 100644 --- a/rc/base/json.kak +++ b/rc/base/json.kak @@ -57,6 +57,5 @@ hook global WinSetOption filetype=json %{ hook -group json-highlight global WinSetOption filetype=(?!json).* %{ remove-highlighter window/json } hook global WinSetOption filetype=(?!json).* %{ - remove-hooks window json-indent - remove-hooks window json-hooks + remove-hooks window json-.+ } diff --git a/rc/base/lisp.kak b/rc/base/lisp.kak index 4e8f8068..bbba5db6 100644 --- a/rc/base/lisp.kak +++ b/rc/base/lisp.kak @@ -53,6 +53,5 @@ hook global WinSetOption filetype=lisp %{ hook -group lisp-highlight global WinSetOption filetype=(?!lisp).* %{ remove-highlighter window/lisp } hook global WinSetOption filetype=(?!lisp).* %{ - remove-hooks window lisp-indent - remove-hooks window lisp-hooks + remove-hooks window lisp-.+ } diff --git a/rc/base/lua.kak b/rc/base/lua.kak index 13e0459f..ac35052b 100644 --- a/rc/base/lua.kak +++ b/rc/base/lua.kak @@ -97,8 +97,7 @@ hook global WinSetOption filetype=lua %{ hook -group lua-highlight global WinSetOption filetype=(?!lua).* %{ remove-highlighter window/lua } hook global WinSetOption filetype=(?!lua).* %{ - remove-hooks window lua-indent - remove-hooks window lua-insert + remove-hooks window lua-.+ unalias window alt lua-alternative-file } diff --git a/rc/base/perl.kak b/rc/base/perl.kak index 2f0e2d7a..aefb7f9c 100644 --- a/rc/base/perl.kak +++ b/rc/base/perl.kak @@ -111,6 +111,5 @@ hook global WinSetOption filetype=perl %{ hook -group perl-highlight global WinSetOption filetype=(?!perl).* %{ remove-highlighter window/perl } hook global WinSetOption filetype=(?!perl).* %{ - remove-hooks window perl-hooks - remove-hooks window perl-indent + remove-hooks window perl-.+ } diff --git a/rc/base/ruby.kak b/rc/base/ruby.kak index 0f6400cf..f8dafe6b 100644 --- a/rc/base/ruby.kak +++ b/rc/base/ruby.kak @@ -157,8 +157,7 @@ hook global WinSetOption filetype=ruby %{ hook -group ruby-highlight global WinSetOption filetype=(?!ruby).* %{ remove-highlighter window/ruby } hook global WinSetOption filetype=(?!ruby).* %{ - remove-hooks window ruby-indent - remove-hooks window ruby-insert + remove-hooks window ruby-.+ unalias window alt ruby-alternative-file } diff --git a/rc/base/rust.kak b/rc/base/rust.kak index c161f615..cf9eb83e 100644 --- a/rc/base/rust.kak +++ b/rc/base/rust.kak @@ -86,6 +86,5 @@ hook global WinSetOption filetype=rust %[ hook -group rust-highlight global WinSetOption filetype=(?!rust).* %{ remove-highlighter window/rust } hook global WinSetOption filetype=(?!rust).* %{ - remove-hooks window rust-indent - remove-hooks window rust-hooks + remove-hooks window rust-.+ } diff --git a/rc/base/scala.kak b/rc/base/scala.kak index 9cc31b14..1b853879 100644 --- a/rc/base/scala.kak +++ b/rc/base/scala.kak @@ -72,6 +72,5 @@ hook global WinSetOption filetype=scala %[ hook -group scala-highlight global WinSetOption filetype=(?!scala).* %{ remove-highlighter window/scala } hook global WinSetOption filetype=(?!scala).* %{ - remove-hooks window scala-indent - remove-hooks window scala-hooks + remove-hooks window scala-.+ } diff --git a/rc/base/yaml.kak b/rc/base/yaml.kak index 5775e2bf..18192533 100644 --- a/rc/base/yaml.kak +++ b/rc/base/yaml.kak @@ -56,6 +56,5 @@ hook global WinSetOption filetype=yaml %{ hook -group yaml-highlight global WinSetOption filetype=(?!yaml).* %{ remove-highlighter window/yaml } hook global WinSetOption filetype=(?!yaml).* %{ - remove-hooks window yaml-indent - remove-hooks window yaml-hooks + remove-hooks window yaml-.+ } diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak index 19d9750b..361ef14a 100644 --- a/rc/core/c-family.kak +++ b/rc/core/c-family.kak @@ -275,9 +275,7 @@ evaluate-commands %sh{ hook global WinSetOption filetype=(c|cpp|objc) %[ try %{ # we might be switching from one c-family language to another - remove-hooks window c-family-hooks - remove-hooks window c-family-indent - remove-hooks window c-family-insert + remove-hooks window c-family-.+ } hook -group c-family-indent window ModeChange insert:.* c-family-trim-autoindent @@ -291,9 +289,7 @@ hook global WinSetOption filetype=(c|cpp|objc) %[ ] hook global WinSetOption filetype=(?!c)(?!cpp)(?!objc).* %[ - remove-hooks window c-family-hooks - remove-hooks window c-family-indent - remove-hooks window c-family-insert + remove-hooks window c-family-.+ unalias window alt c-family-alternative-file ] diff --git a/rc/extra/cabal.kak b/rc/extra/cabal.kak index 54e92f1f..058f9d17 100644 --- a/rc/extra/cabal.kak +++ b/rc/extra/cabal.kak @@ -70,6 +70,5 @@ hook global WinSetOption filetype=cabal %[ hook -group cabal-highlight global WinSetOption filetype=(?!cabal).* %{ remove-highlighter window/cabal } hook global WinSetOption filetype=(?!cabal).* %{ - remove-hooks window cabal-indent - remove-hooks window cabal-hooks + remove-hooks window cabal-.+ } diff --git a/rc/extra/coffee.kak b/rc/extra/coffee.kak index 42a2f384..351f91f1 100644 --- a/rc/extra/coffee.kak +++ b/rc/extra/coffee.kak @@ -76,6 +76,5 @@ hook global WinSetOption filetype=coffee %{ hook -group coffee-highlight global WinSetOption filetype=(?!coffee).* %{ remove-highlighter window/coffee } hook global WinSetOption filetype=(?!coffee).* %{ - remove-hooks window coffee-indent - remove-hooks window coffee-hooks + remove-hooks window coffee-.+ } diff --git a/rc/extra/cucumber.kak b/rc/extra/cucumber.kak index 2ba21be4..aa2081c3 100644 --- a/rc/extra/cucumber.kak +++ b/rc/extra/cucumber.kak @@ -86,6 +86,5 @@ hook global WinSetOption filetype=cucumber %{ hook -group cucumber-highlight global WinSetOption filetype=(?!cucumber).* %{ remove-highlighter window/cucumber } hook global WinSetOption filetype=(?!cucumber).* %{ - remove-hooks window cucumber-indent - remove-hooks window cucumber-hooks + remove-hooks window cucumber-.+ } diff --git a/rc/extra/dart.kak b/rc/extra/dart.kak index 70bb62e6..0dba128c 100644 --- a/rc/extra/dart.kak +++ b/rc/extra/dart.kak @@ -103,6 +103,5 @@ hook global WinSetOption filetype=dart %{ hook -group dart-highlight global WinSetOption filetype=(?!dart).* %{ remove-highlighter window/dart } hook global WinSetOption filetype=(?!dart).* %{ - remove-hooks window dart-hooks - remove-hooks window dart-indent + remove-hooks window dart-.+ } diff --git a/rc/extra/elm.kak b/rc/extra/elm.kak index 9ce9fcc8..0817fb5a 100644 --- a/rc/extra/elm.kak +++ b/rc/extra/elm.kak @@ -64,6 +64,5 @@ hook global WinSetOption filetype=elm %{ hook -group elm-highlight global WinSetOption filetype=(?!elm).* %{ remove-highlighter window/elm } hook global WinSetOption filetype=(?!elm).* %{ - remove-hooks window elm-indent - remove-hooks window elm-hooks + remove-hooks window elm-.+ } diff --git a/rc/extra/haml.kak b/rc/extra/haml.kak index 95eb5647..7bf309f6 100644 --- a/rc/extra/haml.kak +++ b/rc/extra/haml.kak @@ -59,6 +59,5 @@ hook global WinSetOption filetype=haml %{ hook -group haml-highlight global WinSetOption filetype=(?!haml).* %{ remove-highlighter window/haml } hook global WinSetOption filetype=(?!haml).* %{ - remove-hooks window haml-indent - remove-hooks window haml-hooks + remove-hooks window haml-.+ } diff --git a/rc/extra/hbs.kak b/rc/extra/hbs.kak index 47b83502..96b69246 100644 --- a/rc/extra/hbs.kak +++ b/rc/extra/hbs.kak @@ -68,6 +68,5 @@ hook -group hbs-highlight global WinSetOption filetype=(?!hbs).* %{ } hook global WinSetOption filetype=(?!hbs).* %{ - remove-hooks window hbs-indent - remove-hooks window hbs-hooks + remove-hooks window hbs-.+ } diff --git a/rc/extra/i3.kak b/rc/extra/i3.kak index 4cae1871..7e35ace3 100644 --- a/rc/extra/i3.kak +++ b/rc/extra/i3.kak @@ -78,6 +78,5 @@ hook global WinSetOption filetype=i3 %[ hook -group i3-highlight global WinSetOption filetype=(?!i3).* %{ remove-highlighter window/i3 } hook global WinSetOption filetype=(?!i3).* %{ - remove-hooks window i3-hooks - remove-hooks window i3-indent + remove-hooks window i3-.+ } diff --git a/rc/extra/moon.kak b/rc/extra/moon.kak index c37c2bd2..d4801814 100644 --- a/rc/extra/moon.kak +++ b/rc/extra/moon.kak @@ -101,8 +101,7 @@ hook global WinSetOption filetype=moon %{ hook -group moon-highlight global WinSetOption filetype=(?!moon).* %{ remove-highlighter window/moon } hook global WinSetOption filetype=(?!moon).* %{ - remove-hooks window moon-indent - remove-hooks window moon-hooks + remove-hooks window moon-.+ unalias window alt moon-alternative-file } diff --git a/rc/extra/php.kak b/rc/extra/php.kak index a723d50c..1a2b4228 100644 --- a/rc/extra/php.kak +++ b/rc/extra/php.kak @@ -87,6 +87,5 @@ hook global WinSetOption filetype=php %{ hook -group php-highlight global WinSetOption filetype=(?!php).* %{ remove-highlighter window/php-file } hook global WinSetOption filetype=(?!php).* %{ - remove-hooks window php-indent - remove-hooks window php-hooks + remove-hooks window php-.+ } diff --git a/rc/extra/protobuf.kak b/rc/extra/protobuf.kak index faea941e..c18e6dc7 100644 --- a/rc/extra/protobuf.kak +++ b/rc/extra/protobuf.kak @@ -82,6 +82,5 @@ hook global WinSetOption filetype=protobuf %[ hook -group protobuf-highlight global WinSetOption filetype=(?!protobuf).* %{ remove-highlighter window/protobuf } hook global WinSetOption filetype=(?!protobuf).* %{ - remove-hooks window protobuf-hooks - remove-hooks window protobuf-indent + remove-hooks window protobuf-.+ } diff --git a/rc/extra/pug.kak b/rc/extra/pug.kak index 40c219da..e279d96b 100644 --- a/rc/extra/pug.kak +++ b/rc/extra/pug.kak @@ -71,6 +71,5 @@ hook global WinSetOption filetype=pug %{ hook -group pug-highlight global WinSetOption filetype=(?!pug).* %{ remove-highlighter window/pug } hook global WinSetOption filetype=(?!pug).* %{ - remove-hooks window pug-indent - remove-hooks window pug-hooks + remove-hooks window pug-.+ } diff --git a/rc/extra/ragel.kak b/rc/extra/ragel.kak index 4eb37fa0..b6f1fd68 100644 --- a/rc/extra/ragel.kak +++ b/rc/extra/ragel.kak @@ -67,6 +67,5 @@ hook global WinSetOption filetype=ragel %{ hook -group ragel-highlight global WinSetOption filetype=(?!ragel).* %{ remove-highlighter window/ragel } hook global WinSetOption filetype=(?!ragel).* %{ - remove-hooks window ragel-indent - remove-hooks window ragel-hooks + remove-hooks window ragel-.+ } diff --git a/rc/extra/sass.kak b/rc/extra/sass.kak index 6367628b..863ec6e7 100644 --- a/rc/extra/sass.kak +++ b/rc/extra/sass.kak @@ -59,6 +59,5 @@ hook global WinSetOption filetype=sass %{ hook -group sass-highlight global WinSetOption filetype=(?!sass).* %{ remove-highlighter window/sass } hook global WinSetOption filetype=(?!sass).* %{ - remove-hooks window sass-indent - remove-hooks window sass-hooks + remove-hooks window sass-.+ } diff --git a/rc/extra/scheme.kak b/rc/extra/scheme.kak index 741e9c0d..c3cd8a4b 100644 --- a/rc/extra/scheme.kak +++ b/rc/extra/scheme.kak @@ -127,6 +127,5 @@ hook global WinSetOption filetype=scheme %{ } hook global WinSetOption filetype=(?!scheme).* %{ - remove-hooks window scheme-indent - remove-hooks window scheme-hooks + remove-hooks window scheme-.+ } diff --git a/rc/extra/scss.kak b/rc/extra/scss.kak index d1df3d2c..9e4e7cd9 100644 --- a/rc/extra/scss.kak +++ b/rc/extra/scss.kak @@ -42,6 +42,5 @@ hook global WinSetOption filetype=scss %[ hook -group scss-highlight global WinSetOption filetype=(?!scss).* %{ remove-highlighter window/scss } hook global WinSetOption filetype=(?!scss).* %{ - remove-hooks window scss-indent - remove-hooks window scss-hooks + remove-hooks window scss-.+ } diff --git a/rc/extra/toml.kak b/rc/extra/toml.kak index 40114b78..5f5a217a 100644 --- a/rc/extra/toml.kak +++ b/rc/extra/toml.kak @@ -64,7 +64,6 @@ hook -group toml-highlight global WinSetOption filetype=(?!toml).* %{ } hook global WinSetOption filetype=(?!toml).* %{ - remove-hooks window toml-indent - remove-hooks window toml-hooks + remove-hooks window toml-.+ }