cpp.kak: tweak comment copy on newline

fixes #92
This commit is contained in:
Maxime Coste 2014-04-10 20:12:46 +01:00
parent 30bdc8936b
commit 3858479d3d

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 <c-s>k<a-x> s ^\h*\K(/{2,}) <ret> y<c-o>P } try %{ exec -draft k<a-x> s ^\h*\K(/{2,}) <ret> yjglp }
# 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