1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-29 14:44:56 +03:00

Update deindenting in rust.kak

This commit is contained in:
John Isom 2020-07-28 16:08:41 -06:00
parent 70e68e3064
commit 2de803ee17

View File

@ -113,7 +113,7 @@ define-command -hidden rust-indent-on-new-line %~
# dedent after lines starting with . and ending with , or ;
try %_ execute-keys -draft k <a-x> <a-k> ^\h*\..*[,<semicolon>]\h*$ <ret> j <a-lt> _
# deindent closing brace(s) when after cursor
try %< execute-keys -draft <a-x> <a-k>^\h*[})]+\h*$<ret> hm <a-S> 1<a-&> >
try %= execute-keys -draft <a-x> <a-k> ^\h*[})]+\h*$ <ret> \; <a-/> [})] <ret> m <a-S> 1<a-&> =
# todo dedent additional unmatched parenthesis
# try %& execute-keys -draft k <a-x> s \((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\) l Gl s\) %sh{
# count previous selections length