summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rc/cpp.kak4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rc/cpp.kak b/src/rc/cpp.kak
index e0c35967..5da7e844 100644
--- a/src/rc/cpp.kak
+++ b/src/rc/cpp.kak
@@ -30,9 +30,11 @@ hook global WinSetOption filetype=cpp %~
# cleanup trailing white space son previous line
try %{ exec -draft k<a-x>s\h+$<ret>d }
# align to opening paren of previous line
- try %{ exec -draft [(<a-k>\`\([^\n]+\n[^\n]*\n?\'<ret>s\`..|.\'<ret>& }
+ try %{ exec -draft [(<a-k>\`\([^\n]+\n[^\n]*\n?\'<ret>s\`\(\h*.|.\'<ret>& }
# copy // comments prefix
try %{ exec -draft <c-s>k<a-x>s^\h*\K(/{2,})<ret>y<c-o>P }
+ # indent after visibility specifier
+ try %[ exec -draft k<a-x><a-k>^\h*(public|private|protected):\h*$<ret>j<a-gt> ]
_ @
hook window InsertChar \} -id cpp-indent %[