Author Topic: [request] Adjust comments to a vertical line  (Read 4587 times)

Offline cd

  • Single posting newcomer
  • *
  • Posts: 3
[request] Adjust comments to a vertical line
« on: April 06, 2008, 03:42:21 am »
:o [request for next version of Code::Blocks]
Please adhere edit/comments to RIGHT edge

Adjust comments to a vertical line position (RIGHT)
Note: The comments that started in the first column, do not Adjust


like hp50g program editor
http://www.debug4x.com
http://www.debug4x.com/Debug4x_b134.exe

example:   before comments misalignment

/* Config ports microcontroller
    Motorola GP32 */
typedef union {
  byte Byte;
  struct {
    byte PTA0        :1;                    // Port  A Data Bit 0
    byte PTA1        :1;                                       // Port A  Data Bit 1
    byte PTA2        :1;                         // Port A Data Bit 2
    byte PTA3        :1;                              // Port A Data Bit 3
    byte PTA4        :1;                  // Port A Data Bit 4
    byte PTA5        :1;                            // Port A Data Bit 5
    byte PTA6        :1;                                       // Port A Data Bit 6
    byte PTA7        :1;        // Port A Data Bit 7
  } Bits;
} PTASTR;


-----------------------------
Later comments alignment
----------------------------


/* Config ports microcontroller
    Motorola GP32 */
typedef union {
  byte Byte;
  struct {
    byte PTA0        :1;                // Port A Data Bit 0
    byte PTA1        :1;                // Port A Data Bit 1
    byte PTA2        :1;                // Port A Data Bit 2
    byte PTA3        :1;                // Port A Data Bit 3
    byte PTA4        :1;                // Port A Data Bit 4
    byte PTA5        :1;                // Port A Data Bit 5
    byte PTA6        :1;                // Port A Data Bit 6
    byte PTA7        :1;                // Port A Data Bit 7
  } Bits;
} PTASTR;



Is good idea?


[attachment deleted by admin]
« Last Edit: May 08, 2008, 03:08:32 am by cd »

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [request] Adjust comments to a vertical line
« Reply #1 on: May 07, 2008, 01:01:18 pm »
Please file this feature request at Berlios so that it doesn't get lost.
Be a part of the solution, not a part of the problem.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: [request] Adjust comments to a vertical line
« Reply #2 on: May 07, 2008, 02:28:50 pm »
I'm not sure that can be done easily, but it's a great idea nevertheless. Actually that's what editors should always have been like.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Jeisson

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: [request] Adjust comments to a vertical line
« Reply #3 on: May 07, 2008, 07:38:47 pm »
I don't know if it is feasible. I would love the editor manages automatically the "word wrap" in comments while one is writting. For example
Code: [Select]
/** MyClass                                                  |
    This is a long line. While I am writing here I have not  |
    need of press Enter because the editor inserts line feeds|
    and indentation automatically. If I delete a word with   |
    backspace key, following lines are fixed. The vertical   |
    line at right is the right margin.                       |
**/                                                          |

Thanks for this lovely IDE.

Offline cd

  • Single posting newcomer
  • *
  • Posts: 3

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: [request] Adjust comments to a vertical line
« Reply #5 on: May 09, 2008, 09:26:59 pm »
Hi !

I think it's a nice feature but I want more !!!  :D

In fact, I would like the app to ask for the char that must be used for alignment so that you give '//' for comments alignement or ':' for structure members definition (useful after renaming).
Let's suppose the first occurrence is the good one !

Dje