Bug 42469 - [typing] caret home positionning in comment should be optionnal
Summary: [typing] caret home positionning in comment should be optionnal
Status: RESOLVED DUPLICATE of bug 72957
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 45245 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-03 15:17 EDT by quartz quartz CLA
Modified: 2006-10-23 10:20 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description quartz quartz CLA 2003-09-03 15:17:43 EDT
allow to disable this (very annoying) feature:

"Instead of moving the caret back to the first character on the comment line,
Home moves directly to start of the actual comment text on that line ."

We want a smart home (beginning of text), but not that smart.
(3.0m3)
Comment 1 quartz quartz CLA 2003-09-09 10:10:26 EDT
Also allow to disabled this "caret-stop-at-word-in-indentifier" thing. It is
very unconfortable and causes a lot of extra typing.
Comment 2 Kai-Uwe Maetzel CLA 2003-09-09 10:32:40 EDT
See Window>Preferences>Java>Editor>Typing>Smart cursor positioning in Java 
names.
Comment 3 Ron Baldwin CLA 2003-12-13 15:16:26 EST
This "enhancement" is pure evil and the sort of thing I would put in my enemy's
text editor.  I find myself cursing Eclipse several times a day because of it.

This behavior has the following problems:

1. As I'm writing code, I'm constantly hitting Home to get to the first column
of whatever indentation level I'm currently at, especially when I'm about to
move up or down to different lines.  This no longer works if I'm on a comment line.

2. I want to remove a line and replace it with something else.  I used to hit
Home, then Shift+End.  I then start typing the new line which replaces the
selected line leaving the previous line's indentation intact.  On a comment
line?  Out of luck.

3. I want to fix the indentation of a line, probably because I copied code that
uses different rules for tab vs. spaces or spaces per indentation.  I used to
hit Home, then Shift+Home to select all leading white space.  I then press Tab
the appropriate number of times.  On a comment line?  If I'm typing fast, I end
up killing the comment characters and have to retype them.  If I'm typing slow
enough to realize that Home disobeyed, I have to stop, hit the left arrow three
times to get to the start of the text, then continue pressing Shift+Home, and
then some number of Tabs.  Oh, wait, that doesn't work either, because the
second Home ends up going *backwards* from the expected direction and I end up
selecting and deleting *just* the comment characters.

"Home" in a text editor should never mean "go somewhere in the *middle* of the
text."  This is the sort of "enhancement" that sounds good in theory, but just
doesn't work in real life.  It should be removed, or at least made a setting
that defaults to "off."
Comment 4 Dani Megert CLA 2003-12-16 07:43:38 EST
Agree. I got also trapped by this. Especially it behaves different when on a
line with
/** ab<caret>c...
(caret positioned in front of / and then toggling at 3 different positions)
and
 * ab<caret>c...
(caret positioned in front of first character then toggling between line start
and first character)
Comment 5 Christof Marti CLA 2004-03-29 07:12:26 EST
Please assign the PR to me.
Comment 6 Ron Baldwin CLA 2004-04-14 10:58:08 EDT
Are there any plans to do something with this before 3.0?
Comment 7 Christof Marti CLA 2004-04-14 12:59:48 EDT
Time permitting, yes.
Comment 8 Christof Marti CLA 2004-06-03 04:23:42 EDT
*** Bug 45245 has been marked as a duplicate of this bug. ***
Comment 9 Christof Marti CLA 2004-06-03 04:24:58 EDT
Post 3.0 item.
Comment 10 Gabriele Garuglieri CLA 2005-03-01 10:25:45 EST
Should'd it now be later enough? :)
Comment 11 Ron Baldwin CLA 2006-04-06 12:40:17 EDT
Is it possible that this could be looked at for 3.2?  If so, please reopen.
Comment 12 Leo Yamamoto CLA 2006-09-19 11:30:15 EDT
How much later does it need to be for this incident?
Comment 13 Dani Megert CLA 2006-10-23 10:18:38 EDT
See also bug 72957, which would allow to configure this.
Comment 14 Dani Megert CLA 2006-10-23 10:20:06 EDT

*** This bug has been marked as a duplicate of 72957 ***