setting middle of a three-piece comment with lot of spaces possible?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

setting middle of a three-piece comment with lot of spaces possible?

Igor Prischepoff
Hello,
I'd like to have such comments:
/*
 * Description: Bla bla bla
 * Input param: one
 *              _

                ^ here is where a cursor should be placed when i will press
                <enter>  (under 'o' letter in 'one' word)
               
Of course leading ' *' middle part should be automatically added.
Can this be achieved with 'comments' option?

my current setup:
:set comments?
comments=s:/*,mb:*,ex:*/
:set formatoptions?
formatoptions=croqn

I've tried to set m: part like
set comments=s:/*,mb:\ *\ \ \ \ \ \ \ \ \ \ \ \ ,ex:*/
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
but it didn't working.
Instead of getting nicely formatted and ready to fill next line i've got
/*
 * Description: bla bla bla
 _

 ^
 |--- cursor and no middle part is inserted!
 
That is my problem.


Vim 6.3,vim7.0alpha with all patches.

--
Igor.