Fix indentation rule for d.kak
This commit is contained in:
parent
56837aed57
commit
8a079dd82f
|
@ -121,6 +121,8 @@ define-command -hidden d-indent-on-new-line %~
|
||||||
try %[ execute-keys -draft k<a-x> <a-k> ^\h*(case|default).*:$ <ret> j<a-gt> ]
|
try %[ execute-keys -draft k<a-x> <a-k> ^\h*(case|default).*:$ <ret> j<a-gt> ]
|
||||||
# indent after if|else|while|for
|
# indent after if|else|while|for
|
||||||
try %[ execute-keys -draft <semicolon><a-F>)MB <a-k> \A(if|else|while|for)\h*\(.*\)\h*\n\h*\n?\z <ret> s \A|.\z <ret> 1<a-&>1<a-space><a-gt> ]
|
try %[ execute-keys -draft <semicolon><a-F>)MB <a-k> \A(if|else|while|for)\h*\(.*\)\h*\n\h*\n?\z <ret> s \A|.\z <ret> 1<a-&>1<a-space><a-gt> ]
|
||||||
|
# deindent closing brace(s) when after cursor
|
||||||
|
try %[ execute-keys -draft <a-x> <a-k>^\h*[})]+\h*$<ret> hm <a-S> 1<a-&> ]
|
||||||
=
|
=
|
||||||
~
|
~
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user