diff --git a/rc/cpp.kak b/rc/cpp.kak index b53f0787..ae07f7a8 100644 --- a/rc/cpp.kak +++ b/rc/cpp.kak @@ -9,7 +9,7 @@ hook global BufSetOption mimetype=text/x-c(\+\+)? %{ def -hidden _cpp_indent_on_new_line %~ eval -draft -itersel %_ # preserve previous line indent - try %{ exec -draft K } + try %{ exec -draft \;K } # indent after lines ending with { or ( try %[ exec -draft k [{(]\h*$ j ] # cleanup trailing white space son previous line @@ -23,7 +23,7 @@ def -hidden _cpp_indent_on_new_line %~ # indent after visibility specifier try %[ exec -draft k ^\h*(public|private|protected):\h*$ j ] # indent after if|else|while|for - try %[ exec -draft )MB \`(if|else|while|for)\h*\(.*\)\h*\n\h*\n?\' s \`|.\' 11 ] + try %[ exec -draft \;)MB \`(if|else|while|for)\h*\(.*\)\h*\n\h*\n?\' s \`|.\' 11 ] _ ~ @@ -36,7 +36,7 @@ def -hidden _cpp_indent_on_closing_curly_brace %[ # align to opening curly brace when alone on a line try %[ exec -itersel -draft ^\h+\}$hms\`|.\'1 ] # add ; after } if class or struct definition - try %[ exec -draft "hm(class|struct|union)\`(class|struct|union)[^{}\n]+(\n)?\s*\{\'ma;" ] + try %[ exec -draft "hm;(class|struct|union)\`(class|struct|union)[^{}\n]+(\n)?\s*\{\'ma;" ] ] addhl -group / regions -default code cpp \