mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-23 15:23:29 +03:00
Fix deindenting nested blocks/statements
This commit is contained in:
parent
b7490d853d
commit
d6e3c1ff19
@ -139,10 +139,10 @@ define-command -hidden ruby-trim-indent %{
|
||||
define-command -hidden ruby-indent-on-char %{
|
||||
evaluate-commands -no-hooks -draft -itersel %{
|
||||
# align middle and end structures to start
|
||||
try %{ execute-keys -draft <a-x> <a-k> ^ \h * (else|elsif) $ <ret> <a-semicolon> <a-?> ^ \h * (if) <ret> <a-S> 1<a-&> }
|
||||
try %{ execute-keys -draft <a-x> <a-k> ^ \h * (when) $ <ret> <a-semicolon> <a-?> ^ \h * (case) <ret> <a-S> 1<a-&> }
|
||||
try %{ execute-keys -draft <a-x> <a-k> ^ \h * (rescue) $ <ret> <a-semicolon> <a-?> ^ \h * (begin|def) <ret> <a-S> 1<a-&> }
|
||||
try %{ execute-keys -draft <a-x> <a-k> ^ \h * (end) $ <ret> <a-semicolon> <a-?> ^ \h * (begin|case|class|def|for|if|module|unless|until|while) <ret> <a-S> 1<a-&> }
|
||||
try %{ execute-keys -draft <a-x> <a-k> ^ \h * (else|elsif) $ <ret> <a-a> i <a-semicolon> <a-?> ^ \h * (if) <ret> <a-S> 1<a-&> }
|
||||
try %{ execute-keys -draft <a-x> <a-k> ^ \h * (when) $ <ret> <a-a> i <a-semicolon> <a-?> ^ \h * (case) <ret> <a-S> 1<a-&> }
|
||||
try %{ execute-keys -draft <a-x> <a-k> ^ \h * (rescue) $ <ret> <a-a> i <a-semicolon> <a-?> ^ \h * (begin|def) <ret> <a-S> 1<a-&> }
|
||||
try %{ execute-keys -draft <a-x> <a-k> ^ \h * (end) $ <ret> <a-a> i <a-semicolon> <a-?> ^ \h * (begin|case|class|def|for|if|module|unless|until|while) <ret> <a-S> 1<a-&> }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user