1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-25 21:16:38 +03:00

fix case statement regex

This commit is contained in:
Jon Eskin 2022-06-09 04:54:50 -04:00
parent 318fb02bb9
commit 2b051dd25a

View File

@ -98,8 +98,8 @@ provide-module hare %§
try %[ execute-keys -draft k<a-x> <a-k> [{(]\h*$ <ret> j i<tab> ]
# cleanup trailing white spaces on the previous line
execute-keys -draft k :hare-trim-indent <ret>
# indent after a switch's case/default statements
try %[ execute-keys -draft k<a-x> <a-k> ^\h*(case|default).*:$ <ret> j<a-gt> ]
# indent after match/switch's case statements
try %[ execute-keys -draft k<a-x> <a-k> case\h.*=>\h*$ <ret> j<a-gt> ]
# deindent closing brace(s) when after cursor
try %[ execute-keys -draft <a-x> <a-k> ^\h*[})] <ret> gh / [})] <ret> m <a-S> 1<a-&> ]
} }