How to change comment coding style?

5 views
Skip to first unread message

Hongliang Wang

unread,
Nov 2, 2007, 8:28:32 AM11/2/07
to v...@vim.org

Hello, all,

My company restricts us to use this coding style:

/*
**
**
**
**
*/

while native comment coding syle of vim is

/*
*
*
*
*
*/

Could anybody tell me how to change the comment styles?

Thanks for answering!
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx

Andy Wokula

unread,
Nov 2, 2007, 8:43:52 AM11/2/07
to vim...@googlegroups.com
Hongliang Wang schrieb:

>
> Hello, all,
>
> My company restricts us to use this coding style:
>
> /*
> **
> **
> **
> **
> */
>
> while native comment coding syle of vim is
>
> /*
> *
> *
> *
> *
> */
>
> Could anybody tell me how to change the comment styles?
>
> Thanks for answering!

Make a modification of the filetype "c":
:e ~/.vim/after/ftplugin/c.vim

(this is for Unix;
create missing dirs;
use appropriate filetype:
if in doubt check current filetype with
:set ft?
:h :filetype
)

add the following line:
setl com=sO:**\ -,mO:**\ \ ,exO:*/,s0:/*,m:**,ex:*/,://

--
HTH
Andy

Hongliang Wang

unread,
Nov 2, 2007, 10:02:38 AM11/2/07
to v...@vim.org

Hello, all,

My company restricts us to use this coding style:

/*
**
**
**
**
*/

while native comment coding syle of vim is

/*
*
*
*
*
*/

Could anybody tell me how to change the comment styles?

Thanks for answering!
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE

Tony Mechelynck

unread,
Nov 2, 2007, 12:01:42 PM11/2/07
to vim...@googlegroups.com, v...@vim.org, loud...@msn.com
Hongliang Wang wrote:
>
> Hello, all,
>
> My company restricts us to use this coding style:
>
> /*
> **
> **
> **
> **
> */
>
> while native comment coding syle of vim is
>
> /*
> *
> *
> *
> *
> */
>
> Could anybody tell me how to change the comment styles?
>
> Thanks for answering!

You already got an answer three hours ago. Did you see it? If you didn't,
check your Spam or Held-Mail (or whatever) folder at MSN if you have one, and
set your account's spam-filtering setting at its lowest possible setting if
you can; then, if you still don't see that answer, check the Google Groups
archive.


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
107. When using your phone you forget that you don't have to use your
keyboard.

nicolas angel

unread,
Jan 3, 2008, 7:21:42 AM1/3/08
to vim...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages