From e9c63316f5ecdb4668bd88ef480b7f143e76892d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 5 Sep 2016 13:55:03 +0100 Subject: [PATCH] Tweak c-family indent logic --- rc/core/c-family.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak index 9904bc29..f2bb5792 100644 --- a/rc/core/c-family.kak +++ b/rc/core/c-family.kak @@ -57,8 +57,8 @@ def -hidden _c-family-indent-on-newline %[ eval -draft -itersel %[ try %[ exec -draft K s[a-zA-Z0-9_-]+:\h*$ j ] ## indent after a statement not followed by an opening brace try %[ exec -draft k \b(if|else|for|while)\h*\(.+?\)\h*$ j ] - ## align to the opening parenthesis on the previous line when inserting a newline - try %[ exec -draft {b \`\([^\n]*\n[^\n]*\' L s\`|.\' & ] + ## align to the opening parenthesis on a previous line if its followed by text on the same line + try %[ exec -draft {b \`\([^\n]+\n[^\n]*\' L s\`|.\' & ] ] ] def -hidden _c-family-indent-on-opening-curly-brace %[