indent_on_new_line: indent after (case|else) commands
This commit is contained in:
parent
1bcec582d3
commit
1a84ca46f6
|
@ -49,6 +49,8 @@ def -hidden _fish_indent_on_new_line %{
|
||||||
try %{ exec -draft k : _fish_filter_around_selections <ret> }
|
try %{ exec -draft k : _fish_filter_around_selections <ret> }
|
||||||
# copy '#' comment prefix and following white spaces
|
# copy '#' comment prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^\h*\K#\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*\K#\h* <ret> y j p }
|
||||||
|
# indent after (case|else) commands
|
||||||
|
try %{ exec -draft <space> k x <a-k> (case|else) <ret> j <a-gt> }
|
||||||
# indent after (begin|for|function|if|switch|while) commands and add 'end' command
|
# indent after (begin|for|function|if|switch|while) commands and add 'end' command
|
||||||
try %{ exec -draft <space> k x <a-k> (begin|for|function|(?<!(else)\h+)if|switch|while) <ret> x y p j a end <esc> k <a-gt> }
|
try %{ exec -draft <space> k x <a-k> (begin|for|function|(?<!(else)\h+)if|switch|while) <ret> x y p j a end <esc> k <a-gt> }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user