Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Eclipse be convinced to line-wrap comments in C++?

Tags:

eclipse

// I am sick of having to insert line breaks when
// my comments reach 80 characters.

Ctrl+Shift+F doesn't wrap the comments.

Any clues?

like image 779
nornagon Avatar asked Jan 11 '11 04:01

nornagon


People also ask

How do I change the comment style in eclipse?

Eclipse: Change the block comment style of ctrl+shift+/

How do you break a long line in eclipse?

You can't edit the default profiles so you have to hit New... and type a name like 'Eclipse 140 Line Width' for your profile and OK . Change the Maximum Line width from 80 to 140. Then OK your way out. If you then want to fix up your existing code, select your target code and use the Source > Format menu option.

How do you wrap text in STS?

There is a "Toggle Word Wrap" command hidden in the "Window > Editor" menu (default shortcut is Alt+Shift+Y). Or you can use the Quick Access bar: Ctrl+3, and type wrap.


1 Answers

It seems it is not possible. A shame, really.

Source: this mail from the CDT mailing list, dating April 2011 : http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg21675.html

EDIT (March 2013)

It now seems possible, but only for /* this kind of comments */. Set the desired width in the formatter options, and trigger by selecting your comment and pressing ctrl + shift + f.

like image 157
Norswap Avatar answered Sep 20 '22 03:09

Norswap