When editing source files, indentation automatically inserts spaces. For someone like
me who is "a little pedantic", these trailing spaces hanging around are less than
ideal. And there are many other situations where trailing spaces can be left "hanging
around".
What would be good is for jEdit to be a little smarter about spaces. These features
should probably be optional, or implemented via a plugin.
Suggestion 1: "virtual spaces"
When auto-indenting, don't actually insert spaces immediately. Just position the cursor
at the appropriate column. _If_ the user then types something on that line, _then_
spaces can actually be inserted. _If_ the user doesn't type something on that line
(e.g. move away from that line, or hit Enter for the next line), then no spaces are
left on that line.
Suggestion 2: automatic removal of trailing spaces
When a user has edited a line, and then moves away from that line, automatically remove
trailing spaces on that line.
Note: Don't change lines that the user hasn't edited. The WhiteSpace plugin has an
option to remove trailing spaces when a file is saved. But this has the disadvantage
that when editing a file in a multiple-developer scenario, and other developers _do_
leave trailing spaces, and using version control, a particular check-in of edits will
potentially show many lines changed simply due to trailing spaces being removed. But
I just want to be tidy within the scope of my own edits, and not fiddle with spaces
throughout the rest of the file.
Submitted | cmcqueen1975 - 2008-05-16 00:53:27 | Assigned | |
---|---|---|---|
Priority | 5 | Labels | WhiteSpace |
Status | open | Group | None |
Resolution | None |
2008-05-16 09:05:08 kpouer |
Logged In: YES |
---|---|
2008-05-16 18:02:25 rschwenn |
Logged In: YES |
2008-05-16 21:38:29 k_satoda |
Logged In: YES |
2008-05-30 02:15:21 ezust |
Logged In: YES |
2008-05-30 02:15:22 ezust |
- **summary**: Virtual space, remove trailing spaces --> WhiteSpace: Virtual space, remove trailing spaces |
2012-02-10 19:13:17 jarekczek |
- **labels**: --> WhiteSpace |
2012-02-10 20:04:07 jarekczek |
- **summary**: WhiteSpace: Virtual space, remove trailing spaces --> WhiteSpace: remove
trailing spaces from the edited line |
2012-02-10 20:04:07 jarekczek |
Suggestion 1 seems unrealistic and would rather be a core feature. The only open case is now the second suggestion. Yeah, it would be a safe feature that could be always on. |
2012-04-06 08:43:44 jarekczek |
- **status**: pending-rejected --> open |