cpp.kak: Added union support to automatic semicolon after block
This commit is contained in:
parent
ddc25d9d66
commit
9b0b20f2d4
|
@ -36,7 +36,7 @@ def -hidden _cpp_indent_on_closing_curly_brace %[
|
||||||
# align to opening curly brace when alone on a line
|
# align to opening curly brace when alone on a line
|
||||||
try %[ exec -itersel -draft <a-h><a-k>^\h+\}$<ret>hms\`|.\'<ret>1<a-&> ]
|
try %[ exec -itersel -draft <a-h><a-k>^\h+\}$<ret>hms\`|.\'<ret>1<a-&> ]
|
||||||
# add ; after } if class or struct definition
|
# add ; after } if class or struct definition
|
||||||
try %[ exec -draft "hm<space><a-?>(class|struct)<ret><a-k>\`(class|struct)[^{}\n]+(\n)?\s*\{\'<ret><a-space>ma;<esc>" ]
|
try %[ exec -draft "hm<space><a-?>(class|struct|union)<ret><a-k>\`(class|struct|union)[^{}\n]+(\n)?\s*\{\'<ret><a-space>ma;<esc>" ]
|
||||||
]
|
]
|
||||||
|
|
||||||
addhl -group / regions -default code cpp \
|
addhl -group / regions -default code cpp \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user