Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: crobar on June 11, 2018, 11:11:24 pm

Title: Auto hard wrap text/comment block possible?
Post by: crobar on June 11, 2018, 11:11:24 pm
Hello,

I've been using code::blocks for some years and it's great, thanks. In a couple of other editors I use, it is possible to automatically hard wrap blocks of text, and comment blocks at the right margin. The workflow for this is usually to place cursor in paragraph, or highlight paragraph to be hard wrapped and hit some keyboard shortcut  (CTRL+J seems to be common).  A paragraph is usually defined as a block with a newline above and below it. Code comment blocks would be wrapped with a comment character at the start of each line. The indentation of the block text is usually retained based on the first line indent.

As far as I can tell this feature is not in code::blocks. Am I correct that code::blocks can't do this? If so, I'm offering this as a suggestion for a feature. It is particularly useful when editing LaTeX, markdown reStructuredText or long code comments etc.

One example of an editor which implements this is geany, but it doesn't wrap comment blocks correctly (doesn't insert comment characters at start of new lines).

Title: Re: Auto hard wrap text/comment block possible?
Post by: oBFusCATed on June 12, 2018, 07:37:33 am
I don't think we have this feature.
But it shouldn't be too hard to copy the geany's implementation in a plugin and try to make it work more reliably.
Title: Re: Auto hard wrap text/comment block possible?
Post by: BlueHazzard on June 12, 2018, 06:39:44 pm
If you won't do it yourself, better make a ticket on SF, because here in the forum it will get lost