Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354095 - Feature request: Block comment wrapping/reflowing (a.k.a "fill paragraph")
Summary: Feature request: Block comment wrapping/reflowing (a.k.a "fill paragraph")
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 enhancement with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-07 15:18 EDT by Taylor Braun-Jones CLA
Modified: 2020-09-04 15:19 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Taylor Braun-Jones CLA 2011-08-07 15:18:59 EDT
Build Identifier: 20110615-0604

As a long time Emacs user making the switch to Eclipse, I have a really hard time giving up the comment wrapping feature (in Emacs, `fill-paragraph` or M-q by default). Given the sophistication of Eclipse's parser, I'm surprised this does not already exist.

If there is any question about how the reflowing should behave, I suggest following Emacs' implementation.

Some Emacs examples:

/* Some really really [...] really long comment<M-q>

Becomes:

/* Some really really [...]
 * really long comment<cursor>

--
Same thing, but the reflow key binding can be hit with the cursor anywhere on the line:

/* Some really <M-q>really [...] really long comment

Becomes:

/* Some really really [...]
 * really long comment<cursor>

--
Any comment style works:

// Some really really [...] really long comment<M-q>

Becomes:

// Some really really [...]
// really long comment<cursor>

--
And whatever block comment styling you started with is detected and kept consistent:

/*
** Some really really [...] really long comment<M-q>

Becomes:

/*
** Some really really [...]
** really long comment<cursor>


Reproducible: Always

Steps to Reproduce:
1. Type a long paragraph comment and look for a option to automatically fill/reflow the paragraph.
2. Can't find the option
3. Manually enter line breaks where required.
4. Change the wording of the first sentence.
5. Return to step (3)
Comment 1 Mason Wardle CLA 2013-01-28 12:36:15 EST
Up-vote. Same reasoning as Taylor. Eclipse CDT is pretty good and I'm adjusting well from Emacs. This text re-flow in comments would make my life easier.
Comment 2 Chris Saunders CLA 2013-11-20 19:18:24 EST
+1, another emacs user struggling with the same issue.

Interestingly, this eclipse markdown plugin:

http://www.winterwell.com/software/markdown-editor.php

...comes out of the box with emacs style reflow already bound to alt-Q. Would be great to see the same thing for c++ comments in CDT.