Fix existing error regarding indent after opening brace

This is in gluon.kak, right above my addition
This commit is contained in:
John Isom 2020-07-27 13:39:50 -06:00
parent 931b90a451
commit c0e14b1cfd

View File

@ -88,11 +88,7 @@ define-command -hidden gluon-indent-on-new-line %{
try %{ execute-keys -draft k : gluon-trim-indent <ret> } try %{ execute-keys -draft k : gluon-trim-indent <ret> }
# indent after lines ending with (open) braces, =, ->, condition, rec, # indent after lines ending with (open) braces, =, ->, condition, rec,
# or in # or in
try %{ try %{ execute-keys -draft \; k x <a-k> (\(|\{|\[|=|->|then|else|rec|in)$ <ret> j <a-gt> }
execute-keys -draft \
\; k x <a-k> (\(|\{|\[|=|->|then|else|rec|in)$ <ret> j <a-gt>
# balance out brackets } ]
}
# deindent closing brace(s) when after cursor # 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> hm <a-S> 1<a-&> }
} }