Author Topic: Change comment style  (Read 6549 times)

Offline mgoyanes

  • Multiple posting newcomer
  • *
  • Posts: 14
Change comment style
« on: February 23, 2012, 12:02:58 pm »
Hi there.

I'm using code::blocks to program in C language.

Is it possible to change the default coment style (//) to the C style (/**/)?
If I press CTRL+SHIFT+C code is commented with // and it gives error when compiling.
I know I can enter /**/ by hand but I was thinking if there was the possibility to create a key combination.

Regards,

mgoyanes

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Change comment style
« Reply #1 on: February 23, 2012, 12:42:16 pm »
You can use the keybinder plugin to define shortcuts for edit->box comment or edit->stream comment.
I'm not really sure what is the difference between the two.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline mgoyanes

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Change comment style
« Reply #2 on: February 24, 2012, 10:36:33 am »
Sorry but where can I download that plugin?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Change comment style
« Reply #3 on: February 24, 2012, 10:41:51 am »
Hm, my magic ball seems to be broken at the moment and I cannot tell your os/distro/c::b version, so I can't tell you how to install it.

p.s. search for it and you'll find how to install it.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline mgoyanes

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Change comment style
« Reply #4 on: February 24, 2012, 11:28:51 am »
Sorry but did'n know that was needed to know that.

Code::Blocks  10.05 running on a windows 7 64bits machine.

I tryed to google it but I was unable to find. Probably putting the wrong keywords

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Change comment style
« Reply #5 on: February 24, 2012, 11:39:38 am »
Reinstall and enable the contrib plugins...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline mgoyanes

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Change comment style
« Reply #6 on: February 26, 2012, 02:12:34 pm »
You can use the keybinder plugin to define shortcuts for edit->box comment or edit->stream comment.
I'm not really sure what is the difference between the two.

Sweet. Many thanks

box comment:
/*
*
* int a;
*
*/

stream comment:
/*

  int a;

*/

rihardmarius

  • Guest
Re: Change comment style
« Reply #7 on: August 18, 2016, 09:12:47 pm »
One way is to go to Edit > Box-comment, but it doesn't have a shortcut by default.
To change this go to Settings > Editor > Keyboard shortcuts,
expand Edit > Box-comment and assign ctrl-shift-c to the Box-comment command, it will override the Comment command.

Cheers