C_CodeComment is not defined in any of the files that come with recent versions of Vim. I searched a bit and it looks like you are using Fritz Mehner’s C/C++ plugin. It provides a C/C++ > Comments > code -> comment /* */ menu item (and a
\c* mapping1) that uses
put = ' */' appends a new line (see
:help :put) that contains the contents of the special register
=, which just evaluates whatever comes after it as a Vim expression. The particular expression used here is just a simple three character string (space, asterisk, forward-slash).
You can arrange for
*/ to be at the end of the last line2 by adding a line like
silent normal kJ^
silent put = ' */' lines. It moves up to last commented line (
k), joins it with the
*/ line (
J), and then moves the cursor to first non-blank character of the line (
\co mapping1 itself includes a
j to move the cursor to next line after the newly commented region.
However, doing this will break the assumptions of the
C_RemoveCComment function (which is used by the
C_CommentCode “inverse” function): it expects to find and process
*/ at the beginning of the line (after optional whitespace).
If you never use the C/C++ > Comments > comment -> code menu item or the
\co mapping1, then you may be able to live without the ability to use this plugin’s uncomment feature.
\ “leader” of the mappings might be different if you have redefined
2 This (in my opinion) makes for odd looking multiline comments (i.e. selecting more than one line via GUI selection or visual mode before invoking the commenting functionality):
With the middle two lines selected,
* baz(); */
which seems like an odd style (typically, if
* leaders are used on intervening lines, then the asterisks from the
/* opener, the
* leaders, and the
*/ ender are put in the same column).