mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-24 07:53:41 +03:00
Tweak c-family indent logic
This commit is contained in:
parent
21a76d135c
commit
e9c63316f5
@ -57,8 +57,8 @@ def -hidden _c-family-indent-on-newline %[ eval -draft -itersel %[
|
||||
try %[ exec -draft K <a-x> s[a-zA-Z0-9_-]+:\h*$<ret> j <a-gt> ]
|
||||
## indent after a statement not followed by an opening brace
|
||||
try %[ exec -draft k <a-x> <a-k>\b(if|else|for|while)\h*\(.+?\)\h*$<ret> j <a-gt> ]
|
||||
## align to the opening parenthesis on the previous line when inserting a newline
|
||||
try %[ exec -draft {b <a-k>\`\([^\n]*\n[^\n]*\'<ret> L s\`|.\'<ret> & ]
|
||||
## align to the opening parenthesis on a previous line if its followed by text on the same line
|
||||
try %[ exec -draft {b <a-k>\`\([^\n]+\n[^\n]*\'<ret> L s\`|.\'<ret> & ]
|
||||
] ]
|
||||
|
||||
def -hidden _c-family-indent-on-opening-curly-brace %[
|
||||
|
Loading…
Reference in New Issue
Block a user