Author Topic: Auto hard wrap text/comment block possible?  (Read 334 times)

Offline crobar

  • Multiple posting newcomer
  • *
  • Posts: 12
Auto hard wrap text/comment block possible?
« 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).


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11128
    • Travis build status
Re: Auto hard wrap text/comment block possible?
« Reply #1 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.
(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 BlueHazzard

  • Lives here!
  • ****
  • Posts: 2022
Re: Auto hard wrap text/comment block possible?
« Reply #2 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