cpp.kak: fix copying of comments to next line

This commit is contained in:
Maxime Coste 2014-08-30 14:56:01 +01:00
parent 6dc223ed6a
commit 289cb0485e

View File

@ -19,7 +19,7 @@ def -hidden _cpp_indent_on_new_line %~
# align to previous statement start when previous line closed a parenthesis # align to previous statement start when previous line closed a parenthesis
# try %{ exec -draft <a-?>\)M<a-k>\`\(.*\)[^\n()]*\n\h*\n?\'<ret>s\`|.\'<ret>1<a-&> } # try %{ exec -draft <a-?>\)M<a-k>\`\(.*\)[^\n()]*\n\h*\n?\'<ret>s\`|.\'<ret>1<a-&> }
# copy // comments prefix # copy // comments prefix
try %{ exec -draft k<a-x> s ^\h*\K(/{2,}) <ret> yjglp } try %{ exec -draft \;<c-s>k<a-x> s ^\h*\K/{2,} <ret> y<c-o><c-o>P<esc> }
# indent after visibility specifier # indent after visibility specifier
try %[ exec -draft k<a-x> <a-k> ^\h*(public|private|protected):\h*$ <ret> j<a-gt> ] try %[ exec -draft k<a-x> <a-k> ^\h*(public|private|protected):\h*$ <ret> j<a-gt> ]
# indent after if|else|while|for # indent after if|else|while|for