Update deindenting in dart.kak and javascript.kak
This commit is contained in:
parent
4a77566ee6
commit
528feb3422
|
@ -98,7 +98,7 @@ define-command -hidden dart-indent-on-new-line %~
|
||||||
# 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 when after cursor
|
# deindent closing brace when after cursor
|
||||||
try %[ execute-keys -draft <a-x> <a-k> ^\h*\} <ret> \; gh / \} <ret> m <a-S> 1<a-&> ]
|
try %[ execute-keys -draft <a-x> <a-k> ^\h*\} <ret> gh / \} <ret> m <a-S> 1<a-&> ]
|
||||||
=
|
=
|
||||||
~
|
~
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ define-command -hidden javascript-indent-on-new-line %<
|
||||||
# indent after lines beginning / ending with opener token
|
# indent after lines beginning / ending with opener token
|
||||||
try %_ execute-keys -draft k <a-x> <a-k> ^\h*[[({]|[[({]$ <ret> j <a-gt> _
|
try %_ execute-keys -draft k <a-x> <a-k> ^\h*[[({]|[[({]$ <ret> j <a-gt> _
|
||||||
# deindent closing token(s) when after cursor
|
# deindent closing token(s) when after cursor
|
||||||
try %_ execute-keys -draft <a-x> <a-k> ^\h*[})\]]+ <ret> \; gh / [})\]] <ret> m <a-S> 1<a-&> _
|
try %_ execute-keys -draft <a-x> <a-k> ^\h*[})\]] <ret> gh / [})\]] <ret> m <a-S> 1<a-&> _
|
||||||
>
|
>
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user