c-family.kak: indent after parenthesis at end of line
This commit is contained in:
parent
73a239d3be
commit
1a38849086
|
@ -39,8 +39,8 @@ define-command -hidden c-family-indent-on-newline %< evaluate-commands -draft -i
|
|||
>
|
||||
# remove previous empty lines resulting from the automatic indent
|
||||
try %< execute-keys -draft k <a-x> <a-k>^\h+$<ret> Hd >
|
||||
# indent after an opening brace
|
||||
try %< execute-keys -draft k <a-x> s\{\h*$<ret> j <a-gt> >
|
||||
# indent after an opening brace or parenthesis at end of line
|
||||
try %< execute-keys -draft k <a-x> s[{(]\h*$<ret> j <a-gt> >
|
||||
# indent after a label
|
||||
try %< execute-keys -draft k <a-x> s[a-zA-Z0-9_-]+:\h*$<ret> j <a-gt> >
|
||||
# indent after a statement not followed by an opening brace
|
||||
|
|
1
test/indent/c-family/indent-after-parenthesis/cmd
Normal file
1
test/indent/c-family/indent-after-parenthesis/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
c<ret>foo<esc>
|
1
test/indent/c-family/indent-after-parenthesis/in
Normal file
1
test/indent/c-family/indent-after-parenthesis/in
Normal file
|
@ -0,0 +1 @@
|
|||
foobarbaz(%( )qux
|
2
test/indent/c-family/indent-after-parenthesis/out
Normal file
2
test/indent/c-family/indent-after-parenthesis/out
Normal file
|
@ -0,0 +1,2 @@
|
|||
foobarbaz(
|
||||
fooqux
|
3
test/indent/c-family/indent-after-parenthesis/rc
Normal file
3
test/indent/c-family/indent-after-parenthesis/rc
Normal file
|
@ -0,0 +1,3 @@
|
|||
source "%val{runtime}/colors/default.kak"
|
||||
source "%val{runtime}/rc/core/c-family.kak"
|
||||
set buffer filetype cpp
|
Loading…
Reference in New Issue
Block a user