I love the new pressing-return-in-a-line-comment behavior Follow
It's going to be hard to get out of my Enter, Home, Slash, Slash, Spacebar habit though.
IDEA guys: are you ever going to implement automatic word wrapping, more along the lines of traditional text document editor word wrapping?
I think it would be neat and would save me a lot of pressing return and backspace (HungryBackspace plugin helps this though) if maybe IDEA represented every statement internally as a single line, and wrapped it dynamically when displaying, and when saving to a file. So if I had the following line (dashes indicate the width of my margin, 80 columns):
I could delete the arrayName argument, and it would produce:
All this done automatically. I think this would be great - what do other people think? Will something like this go into Aurora before it's released, IDEA developers?
Please sign in to leave a comment.
By "Delete the argument" I mean I could just select it and press Backspace, or delete it with Backspace character by character, whatever.
Sounds interesting. Have you filed a feature request ?
On the other hand: if you open the same files with other editors, the code looks awful.
There would, of course, have to be a way to disable this. IDEA's abilities
to customize line wrapping behavior isn't sufficiently flexible to implement
our formatting rules, although it's getting closer. For instance, we like to
format method declarations with long argument lists like this:
public void doIt (
IDEA has no way to say the closing parenthesis should be outdented as shown.
Similarly, IDEA can't do this with class/interface declarations:
public class Sprocket
Generally, we like to format long lists one member per line (because they're
easier to change that way) and use indention to mark boundaries.
It would also be nice if IDEA could support another technique we like to
use--columnar alignment to improve visibility and stress the logical
relationships among elements on adjacent lines--as in sequences of
declarations in which the identifiers and assignment operators (if there are
initializers) on adjacent lines are aligned.
What an IDE really needs to support coding styles properly is some kind of
rule-based formatting engine. And ideally the formatting would be for
presentation only--that is, it wouldn't actually modify the line structure
or formatting of existing content (or perhaps the system would have separate
sets of formatting rules for presentation and persisted content). This would
put an end to the perennial conflicts over coding style--every user would
see the source formatted as he prefers.
"Keith Lea" <email@example.com> wrote in message
along the lines of traditional text document editor word wrapping?
backspace (HungryBackspace plugin helps this though) if maybe IDEA
represented every statement internally as a single line, and wrapped it
dynamically when displaying, and when saving to a file. So if I had the
following line (dashes indicate the width of my margin, 80 columns):
people think? Will something like this go into Aurora before it's released,
IMHO this sounds like a great plugin, but a bad feature request
I think it sounds like a GREAT feature request, esp. Michael Besosa's idea of different rules for the presentation vs. persistance. I wouldn't have to care what our code style guidelines are, I could view my files the way I want, and store it the way the suits want, and everyone would be happy.
This does not sound like a simple change to IDEA, however, so I wouldn't expect it in Aurora (they seem to be about to start racing for the finish line anyway). But please file a feature request!
If anyone is interested to vote I've filed a request for this: http://www.intellij.net/tracker/idea/viewSCR?publicId=19474