From 91a56c11fe0019fe21f4862e2caa309f6dd5e392 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 13 Jan 2017 00:50:03 +0000 Subject: [PATCH] Various auto indent fixes regarding wrong use of x instead of --- rc/base/css.kak | 4 ++-- rc/base/gas.kak | 2 +- rc/base/haskell.kak | 8 ++++---- rc/base/html.kak | 4 ++-- rc/base/javascript.kak | 6 +++--- rc/base/json.kak | 4 ++-- rc/base/lisp.kak | 2 +- rc/base/markdown.kak | 4 ++-- rc/base/ruby.kak | 8 ++++---- rc/base/rust.kak | 4 ++-- rc/base/scala.kak | 6 +++--- rc/base/yaml.kak | 4 ++-- rc/core/kakrc.kak | 4 ++-- rc/core/python.kak | 4 ++-- rc/extra/cabal.kak | 6 +++--- rc/extra/coffee.kak | 6 +++--- rc/extra/cucumber.kak | 4 ++-- rc/extra/haml.kak | 6 +++--- rc/extra/hbs.kak | 6 +++--- rc/extra/moon.kak | 8 ++++---- rc/extra/php.kak | 6 +++--- rc/extra/pug.kak | 4 ++-- rc/extra/ragel.kak | 6 +++--- rc/extra/sass.kak | 6 +++--- 24 files changed, 61 insertions(+), 61 deletions(-) diff --git a/rc/base/css.kak b/rc/base/css.kak index 68242f70..bcc15488 100644 --- a/rc/base/css.kak +++ b/rc/base/css.kak @@ -44,11 +44,11 @@ def -hidden _css_filter_around_selections %{ def -hidden _css_indent_on_new_line %[ eval -draft -itersel %[ # preserve previous line indent - try %[ exec -draft K ] + try %[ exec -draft \; K ] # filter previous line try %[ exec -draft k : _css_filter_around_selections ] # indent after lines ending with with { - try %[ exec -draft k x \{$ j ] + try %[ exec -draft k \{$ j ] ] ] diff --git a/rc/base/gas.kak b/rc/base/gas.kak index 334b93a6..e31a7da6 100644 --- a/rc/base/gas.kak +++ b/rc/base/gas.kak @@ -77,7 +77,7 @@ def -hidden _gas_filter_around_selections %{ def -hidden _gas_indent_on_new_line %~ eval -draft -itersel %< # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _gas_filter_around_selections } # indent after label diff --git a/rc/base/haskell.kak b/rc/base/haskell.kak index d8faf1aa..ffeeb485 100644 --- a/rc/base/haskell.kak +++ b/rc/base/haskell.kak @@ -39,15 +39,15 @@ def -hidden _haskell_filter_around_selections %{ def -hidden _haskell_indent_on_new_line %{ eval -draft -itersel %{ # copy -- comments prefix and following white spaces - try %{ exec -draft k x s ^\h*\K--\h* y gh j P } + try %{ exec -draft k s ^\h*\K--\h* y gh j P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # align to first clause - try %{ exec -draft k x X s ^\h*(if|then|else)?\h*(([\w']+\h+)+=)?\h*(case\h+[\w']+\h+of|do|let|where)\h+\K.* s \`|.\' & } + try %{ exec -draft \; k x X s ^\h*(if|then|else)?\h*(([\w']+\h+)+=)?\h*(case\h+[\w']+\h+of|do|let|where)\h+\K.* s \`|.\' & } # filter previous line try %{ exec -draft k : _haskell_filter_around_selections } # indent after lines beginning with condition or ending with expression or =( - try %{ exec -draft k x ^\h*(if)|(case\h+[\w']+\h+of|do|let|where|[=(])$ j } + try %{ exec -draft \; k x ^\h*(if)|(case\h+[\w']+\h+of|do|let|where|[=(])$ j } } } diff --git a/rc/base/html.kak b/rc/base/html.kak index 67d58a0b..29606125 100644 --- a/rc/base/html.kak +++ b/rc/base/html.kak @@ -52,11 +52,11 @@ def -hidden _html_indent_on_char %{ def -hidden _html_indent_on_new_line %{ eval -draft -itersel %{ # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _html_filter_around_selections } # indent after lines ending with opening tag - try %{ exec -draft k x <[^/][^>]+>$ j } + try %{ exec -draft k <[^/][^>]+>$ j } } } diff --git a/rc/base/javascript.kak b/rc/base/javascript.kak index 81168104..8b2ae3e1 100644 --- a/rc/base/javascript.kak +++ b/rc/base/javascript.kak @@ -52,13 +52,13 @@ def -hidden _javascript_indent_on_char %< def -hidden _javascript_indent_on_new_line %< eval -draft -itersel %< # copy // comments prefix and following white spaces - try %{ exec -draft k x s ^\h*\K#\h* y gh j P } + try %{ exec -draft k s ^\h*\K#\h* y gh j P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _javascript_filter_around_selections } # indent after lines beginning / ending with opener token - try %_ exec -draft k x ^\h*[[{]|[[{]$ j _ + try %_ exec -draft k ^\h*[[{]|[[{]$ j _ > > diff --git a/rc/base/json.kak b/rc/base/json.kak index 7e9a2bc3..dd9276a1 100644 --- a/rc/base/json.kak +++ b/rc/base/json.kak @@ -36,11 +36,11 @@ def -hidden _json_indent_on_char %< def -hidden _json_indent_on_new_line %< eval -draft -itersel %< # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _json_filter_around_selections } # indent after lines beginning with opener token - try %< exec -draft k x ^\h*[[{] j > + try %< exec -draft k ^\h*[[{] j > > > diff --git a/rc/base/lisp.kak b/rc/base/lisp.kak index b22f787b..0dbe0704 100644 --- a/rc/base/lisp.kak +++ b/rc/base/lisp.kak @@ -34,7 +34,7 @@ def -hidden _lisp_filter_around_selections %{ def -hidden _lisp_indent_on_new_line %{ eval -draft -itersel %{ # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # indent when matches opening paren try %{ exec -draft [( \`\([^\n]+\n[^\n]*\n?\' \; } } diff --git a/rc/base/markdown.kak b/rc/base/markdown.kak index 1c1e5eee..1c4ee929 100644 --- a/rc/base/markdown.kak +++ b/rc/base/markdown.kak @@ -127,9 +127,9 @@ add-highlighter -group /markdown/content regex \H\K\h\h$ 0:PrimarySelection def -hidden _markdown_indent_on_new_line %{ eval -draft -itersel %{ # copy block quote(s), list item prefix and following white spaces - try %{ exec -draft k x s ^\h*\K((>\h*)|[*+-])+\h* y gh j P } + try %{ exec -draft k s ^\h*\K((>\h*)|[*+-])+\h* y gh j P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # remove trailing white spaces try %{ exec -draft -itersel %{ k s \h+$ d } } } diff --git a/rc/base/ruby.kak b/rc/base/ruby.kak index 3d038998..edb014ad 100644 --- a/rc/base/ruby.kak +++ b/rc/base/ruby.kak @@ -125,18 +125,18 @@ def -hidden _ruby_indent_on_new_line %{ # filter previous line try %{ exec -draft k : _ruby_filter_around_selections } # indent after start structure - try %{ exec -draft k x ^ \h * (begin|case|class|def|do|else|elsif|ensure|for|if|module|rescue|unless|until|when|while) \b j } + try %{ exec -draft k ^ \h * (begin|case|class|def|do|else|elsif|ensure|for|if|module|rescue|unless|until|when|while) \b j } } } def -hidden _ruby_insert_on_new_line %{ eval -no-hooks -draft -itersel %{ # copy _#_ comment prefix and following white spaces - try %{ exec -draft k x s ^ \h * \K \# \h * y gh j P } + try %{ exec -draft k s ^ \h * \K \# \h * y gh j P } # wisely add end structure eval -save-regs x %{ - try %{ exec -draft k x s ^ \h + \" x y } catch %{ reg x '' } - try %{ exec -draft k x ^ x (begin|case|class|def|do|for|if|module|unless|until|while) j i X K ^ x (begin|case|class|def|do|for|if|module|unless|until|while) . * \n x end $ j x y p j a end } + try %{ exec -draft k s ^ \h + \" x y } catch %{ reg x '' } + try %{ exec -draft k ^ x (begin|case|class|def|do|for|if|module|unless|until|while) j i X K ^ x (begin|case|class|def|do|for|if|module|unless|until|while) . * \n x end $ j x y p j a end } } } } diff --git a/rc/base/rust.kak b/rc/base/rust.kak index bee0051f..d9494acc 100644 --- a/rc/base/rust.kak +++ b/rc/base/rust.kak @@ -42,9 +42,9 @@ def -hidden _rust_filter_around_selections %{ def -hidden _rust_indent_on_new_line %~ eval -draft -itersel %< # copy // comments prefix and following white spaces - try %{ exec -draft k x s ^\h*\K//\h* y gh j P } + try %{ exec -draft k s ^\h*\K//\h* y gh j P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _rust_filter_around_selections } # indent after lines ending with { or ( diff --git a/rc/base/scala.kak b/rc/base/scala.kak index 8ca767e9..893753e1 100644 --- a/rc/base/scala.kak +++ b/rc/base/scala.kak @@ -42,13 +42,13 @@ def -hidden _scala_filter_around_selections %{ def -hidden _scala_indent_on_new_line %[ eval -draft -itersel %[ # copy // comments prefix and following white spaces - try %[ exec -draft k x s ^\h*\K#\h* y gh j P ] + try %[ exec -draft k s ^\h*\K#\h* y gh j P ] # preserve previous line indent - try %[ exec -draft K ] + try %[ exec -draft \; K ] # filter previous line try %[ exec -draft k : _scala_filter_around_selections ] # indent after lines ending with { - try %[ exec -draft k x \{$ j ] + try %[ exec -draft k \{$ j ] ] ] diff --git a/rc/base/yaml.kak b/rc/base/yaml.kak index caa60223..0229bc2a 100644 --- a/rc/base/yaml.kak +++ b/rc/base/yaml.kak @@ -35,9 +35,9 @@ def -hidden _yaml_filter_around_selections %{ def -hidden _yaml_indent_on_new_line %{ eval -draft -itersel %{ # copy '#' comment prefix and following white spaces - try %{ exec -draft k x s ^\h*\K#\h* y gh j P } + try %{ exec -draft k s ^\h*\K#\h* y gh j P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _yaml_filter_around_selections } # indent after : diff --git a/rc/core/kakrc.kak b/rc/core/kakrc.kak index 5125a0c9..4bf34855 100644 --- a/rc/core/kakrc.kak +++ b/rc/core/kakrc.kak @@ -53,9 +53,9 @@ add-highlighter -group /kakrc/shell ref sh def -hidden kak-indent-on-new-line %{ eval -draft -itersel %{ # copy '#' comment prefix and following white spaces - try %{ exec -draft k x s ^\h*#\h* y jgh P } + try %{ exec -draft k s ^\h*#\h* y jgh P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # cleanup trailing whitespaces from previous line try %{ exec -draft k s \h+$ d } # indent after line ending with %[[:punct:]] diff --git a/rc/core/python.kak b/rc/core/python.kak index 07462099..fcd749d5 100644 --- a/rc/core/python.kak +++ b/rc/core/python.kak @@ -66,9 +66,9 @@ add-highlighter -group /python/comment fill comment def -hidden python-indent-on-new-line %{ eval -draft -itersel %{ # copy '#' comment prefix and following white spaces - try %{ exec -draft k x s ^\h*#\h* y jgh P } + try %{ exec -draft k s ^\h*#\h* y jgh P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # cleanup trailing whitespaces from previous line try %{ exec -draft k s \h+$ d } # indent after line ending with : diff --git a/rc/extra/cabal.kak b/rc/extra/cabal.kak index 3ed4f93c..25b0d8b9 100644 --- a/rc/extra/cabal.kak +++ b/rc/extra/cabal.kak @@ -32,13 +32,13 @@ def -hidden _cabal_filter_around_selections %{ def -hidden _cabal_indent_on_new_line %[ eval -draft -itersel %[ # copy '#' comment prefix and following white spaces - try %[ exec -draft k x s ^\h*\K#\h* y gh j P ] + try %[ exec -draft k s ^\h*\K#\h* y gh j P ] # preserve previous line indent - try %[ exec -draft K ] + try %[ exec -draft \; K ] # filter previous line try %[ exec -draft k : _cabal_filter_around_selections ] # indent after lines ending with { or : - try %[ exec -draft k x [:{]$ j ] + try %[ exec -draft k [:{]$ j ] ] ] diff --git a/rc/extra/coffee.kak b/rc/extra/coffee.kak index 765be805..53c1d00f 100644 --- a/rc/extra/coffee.kak +++ b/rc/extra/coffee.kak @@ -56,13 +56,13 @@ def -hidden _coffee_filter_around_selections %{ def -hidden _coffee_indent_on_new_line %{ eval -draft -itersel %{ # copy '#' comment prefix and following white spaces - try %{ exec -draft k x s ^ \h * \K \# \h * y gh j P } + try %{ exec -draft k s ^ \h * \K \# \h * y gh j P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _coffee_filter_around_selections } # indent after start structure - try %{ exec -draft k x ^ \h * (case|catch|class|else|finally|for|function|if|switch|try|while|with) \b | (=|->) $ j } + try %{ exec -draft k ^ \h * (case|catch|class|else|finally|for|function|if|switch|try|while|with) \b | (=|->) $ j } } } diff --git a/rc/extra/cucumber.kak b/rc/extra/cucumber.kak index 7f444003..c33a2028 100644 --- a/rc/extra/cucumber.kak +++ b/rc/extra/cucumber.kak @@ -64,9 +64,9 @@ def -hidden _cucumber_filter_around_selections %{ def -hidden _cucumber_indent_on_new_line %{ eval -draft -itersel %{ # copy '#' comment prefix and following white spaces - try %{ exec -draft k x s ^\h*\K#\h* y gh j P } + try %{ exec -draft k s ^\h*\K#\h* y gh j P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _cucumber_filter_around_selections } # indent after lines containing : diff --git a/rc/extra/haml.kak b/rc/extra/haml.kak index 36e0fc80..ef694fbc 100644 --- a/rc/extra/haml.kak +++ b/rc/extra/haml.kak @@ -41,13 +41,13 @@ def -hidden _haml_filter_around_selections %{ def -hidden _haml_indent_on_new_line %{ eval -draft -itersel %{ # copy '/' comment prefix and following white spaces - try %{ exec -draft k x s ^\h*\K/\h* y gh j P } + try %{ exec -draft k s ^\h*\K/\h* y gh j P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _haml_filter_around_selections } # indent after lines beginning with : or - - try %{ exec -draft k x ^\h*[:-] j } + try %{ exec -draft k ^\h*[:-] j } } } diff --git a/rc/extra/hbs.kak b/rc/extra/hbs.kak index 04090088..d2a81789 100644 --- a/rc/extra/hbs.kak +++ b/rc/extra/hbs.kak @@ -42,13 +42,13 @@ def -hidden _hbs_filter_around_selections %{ def -hidden _hbs_indent_on_new_line %{ eval -draft -itersel %{ # copy '/' comment prefix and following white spaces - try %{ exec -draft k x s ^\h*\K/\h* y j p } + try %{ exec -draft k s ^\h*\K/\h* y j p } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _hbs_filter_around_selections } # indent after lines beginning with : or - - try %{ exec -draft k x ^\h*[:-] j } + try %{ exec -draft k ^\h*[:-] j } } } diff --git a/rc/extra/moon.kak b/rc/extra/moon.kak index a134880f..2c8746a5 100644 --- a/rc/extra/moon.kak +++ b/rc/extra/moon.kak @@ -77,15 +77,15 @@ def -hidden _moon_indent_on_char %{ def -hidden _moon_indent_on_new_line %{ eval -draft -itersel %{ # copy -- comment prefix and following white spaces - try %{ exec -draft k x s ^ \h * \K -- \h * y gh j P } + try %{ exec -draft k s ^ \h * \K -- \h * y gh j P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _moon_filter_around_selections } # indent after start structure - try %{ exec -draft k x ^ \h * (class|else(if)?|for|if|switch|unless|when|while|with) \b | ([:=]|[-=]>) $ j } + try %{ exec -draft k ^ \h * (class|else(if)?|for|if|switch|unless|when|while|with) \b | ([:=]|[-=]>) $ j } # deindent after return statements - try %{ exec -draft k x ^ \h * (break|return) \b j } + try %{ exec -draft k ^ \h * (break|return) \b j } } } diff --git a/rc/extra/php.kak b/rc/extra/php.kak index 01451b5b..8a447b87 100644 --- a/rc/extra/php.kak +++ b/rc/extra/php.kak @@ -46,13 +46,13 @@ def -hidden _php_indent_on_char %< def -hidden _php_indent_on_new_line %< eval -draft -itersel %< # copy // comments prefix and following white spaces - try %{ exec -draft k x s ^\h*\K#\h* y gh j P } + try %{ exec -draft k s ^\h*\K#\h* y gh j P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _php_filter_around_selections } # indent after lines beginning / ending with opener token - try %_ exec -draft k x ^\h*[[{]|[[{]$ j _ + try %_ exec -draft k ^\h*[[{]|[[{]$ j _ > > diff --git a/rc/extra/pug.kak b/rc/extra/pug.kak index 94c2276f..260d9821 100644 --- a/rc/extra/pug.kak +++ b/rc/extra/pug.kak @@ -52,11 +52,11 @@ def -hidden _pug_filter_around_selections %{ def -hidden _pug_indent_on_new_line %{ eval -draft -itersel %{ # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _pug_filter_around_selections } # copy '//', '|', '-' or '(!)=' prefix and following whitespace - try %{ exec -draft k x s ^\h*\K[/|!=-]{1,2}\h* y gh j P } + try %{ exec -draft k s ^\h*\K[/|!=-]{1,2}\h* y gh j P } # indent unless we copied something above try %{ exec -draft b s \S g l } } diff --git a/rc/extra/ragel.kak b/rc/extra/ragel.kak index a0a67836..48291448 100644 --- a/rc/extra/ragel.kak +++ b/rc/extra/ragel.kak @@ -45,13 +45,13 @@ def -hidden _ragel_indent_on_char %< def -hidden _ragel_indent_on_new_line %< eval -draft -itersel %< # copy _#_ comment prefix and following white spaces - try %{ exec -draft k x s ^\h*\K#\h* y gh j P } + try %{ exec -draft k s ^\h*\K#\h* y gh j P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _ragel_filter_around_selections } # indent after lines ending with opener token - try %< exec -draft k x [[{(*]$ j > + try %< exec -draft k [[{(*]$ j > > > diff --git a/rc/extra/sass.kak b/rc/extra/sass.kak index 5fc8ba84..53e41477 100644 --- a/rc/extra/sass.kak +++ b/rc/extra/sass.kak @@ -37,13 +37,13 @@ def -hidden _sass_filter_around_selections %{ def -hidden _sass_indent_on_new_line %{ eval -draft -itersel %{ # copy '/' comment prefix and following white spaces - try %{ exec -draft k x s ^\h*\K/\h* y gh j P } + try %{ exec -draft k s ^\h*\K/\h* y gh j P } # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \; K } # filter previous line try %{ exec -draft k : _sass_filter_around_selections } # avoid indent after properties and comments - try %{ exec -draft k x [:/] j } + try %{ exec -draft k [:/] j } } }