Author Topic: Brace Commenting Macro  (Read 7820 times)

MindprisM

  • Senior Community Member
  • Posts: 127
  • Hero Points: 8
Brace Commenting Macro
« on: July 14, 2008, 01:43:37 AM »
At Brace Lines, will insert comments according to brace type and conditionals.
The comment inserted does not have to be deleted before invoking - all comments
are stripped from line before new comments are inserted.

Usage: Assign to a key, move cursor to a brace line and invoke.

Definintion:Brace lines, see examples.

Code: [Select]
// Brace line definition: All lines marked with "*" below are brace lines:

  for(;;){
  }                   *
  for (;;)
  {                   *
  }                   *
  if (something){
  }                   *
  if (something)
  {                   *
  }                   *
  if (something){
  }else{              *
  }                   *
  if (something){
  }else if(1){        *
  }else{              *
  }                   *
  while (){
  }                   *

//etc.

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: Brace Commenting Macro
« Reply #1 on: July 14, 2008, 02:42:04 AM »
What is __00.sh ?  The file compiles without it.

I guess this is an alert of some kind, since nobody would name a header file __00  :)

Graeme

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Brace Commenting Macro
« Reply #2 on: July 14, 2008, 04:37:46 AM »
This inserts comments into the file, modifying the file, right?  That will probably be useful for some.  The behavior that people were looking for in the other thread was to automatically render a similar type of thing but without actually inserting any comments into the file.  If you've used SourceInsight before, that's the behavior people were looking for.

MindprisM

  • Senior Community Member
  • Posts: 127
  • Hero Points: 8
Re: Brace Commenting Macro
« Reply #3 on: July 14, 2008, 08:43:46 AM »
What is __00.sh ?  The file compiles without it.

I guess this is an alert of some kind, since nobody would name a header file __00  :)

Graeme


Its "my machine" defs, program locations, plus Windows API Defs. So its a NOYB file, hence the name ;)

MindprisM

  • Senior Community Member
  • Posts: 127
  • Hero Points: 8
Re: Brace Commenting Macro
« Reply #4 on: July 14, 2008, 08:50:53 AM »
This inserts comments into the file, modifying the file, right?  That will probably be useful for some.  The behavior that people were looking for in the other thread was to automatically render a similar type of thing but without actually inserting any comments into the file.  If you've used SourceInsight before, that's the behavior people were looking for.

Yes, inserts comments. I do have a screen painting DLL Im using with slick, but in order to paint in the right location on a target machine it would involve a bunch of font metrics and system metrics (versus manual adjustments I do to get it right). Plus it paints right on the desktop, so you got no way to erase other than forcing and app to repaint.

Someone could take that macro and do a tip form on a timer though.