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 ks\h+$d } # align to opening paren of previous line - try %{ exec -draft [(\`\([^\n]+\n[^\n]*\n?\'s\`..|.\'& } + try %{ exec -draft [(\`\([^\n]+\n[^\n]*\n?\'s\`\(\h*.|.\'& } # copy // comments prefix try %{ exec -draft ks^\h*\K(/{2,})yP } + # indent after visibility specifier + try %[ exec -draft k^\h*(public|private|protected):\h*$j ] _ @ hook window InsertChar \} -id cpp-indent %[