diff options
| author | Oleh Hushchenkov <o.hushchenkov@gmail.com> | 2019-07-25 09:58:33 +0300 |
|---|---|---|
| committer | Oleh Hushchenkov <o.hushchenkov@gmail.com> | 2019-07-25 09:58:33 +0300 |
| commit | 8fc705d4ccf4c3bb0ca4067982cc879b5a9b6e92 (patch) | |
| tree | 4c6f764062d7e59cf6d3740c1efb5db58f1d90f3 | |
| parent | be3d0f8b33112430433ee15747c746a5fe135425 (diff) | |
Fix c-family indent on opening curly brace after if-else
| -rw-r--r-- | rc/filetype/c-family.kak | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rc/filetype/c-family.kak b/rc/filetype/c-family.kak index 9a6d79e3..34efde8e 100644 --- a/rc/filetype/c-family.kak +++ b/rc/filetype/c-family.kak @@ -114,6 +114,8 @@ define-command -hidden c-family-indent-on-newline %< evaluate-commands -draft -i define-command -hidden c-family-indent-on-opening-curly-brace %[ # align indent with opening paren when { is entered on a new line after the closing paren try %[ execute-keys -draft -itersel h<a-F>)M <a-k> \A\(.*\)\h*\n\h*\{\z <ret> <a-S> 1<a-&> ] + # align indent with opening paren when { is entered on a new line after the else + try %[ execute-keys -draft -itersel hK <a-x> s \belse\b\h*(?://[^\n]+)?\n\h*\{<ret> <a-S> 1<a-&> ] ] define-command -hidden c-family-indent-on-closing-curly-brace %[ |
