Bug 109046 - [formatting] No automatic indentation on enter
Summary: [formatting] No automatic indentation on enter
Status: NEW
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 0.7   Edit
Hardware: PC Windows XP
: P3 enhancement with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2005-09-08 09:22 EDT by Joakim Kemeny CLA
Modified: 2013-06-19 11:14 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Kemeny CLA 2005-09-08 09:22:24 EDT
When I press enter in the XML editor it should indent the new row according to 
the preferences. This is done in the other editors and doens't seem like a 
difficult thing to implement.
Comment 1 Amy Wu CLA 2005-09-08 10:24:50 EDT
Actually, autoindent is working by design.  When you press enter, the new line 
has the same indentation as the previous line.  Is that what you're seeing?
Comment 2 Joakim Kemeny CLA 2005-09-12 04:07:11 EDT
Yes that is what I'm seeing but I don't agree that that's the way it should 
work. The only time when I'd like to stay on the same column is when I enter a 
closing tag otherwise I want it to be indented according to the preferences 
(tag or spaces). That is the way it works in the other editors.
Comment 3 Amy Wu CLA 2005-09-12 11:16:45 EDT
The way auto-indent is working now is the default behaviour of all text 
editors in eclipse.  We would like to preserve this behaviour because we have 
specifically been asked to have this behaviour by our users.

However, I can also see the need for your auto indent feature.  The Java 
editor has both modes of auto indent.  If you are in Smart Insert Mode 
(Edit->Smart Insert Mode) the auto indent will behave like you want it.  If 
it's off, auto indent will indent to the same as the previous line.

We could probably do something similar.  And, seeing as how you said in your 
first comment "doesnt seem like a difficult thing to implement"  we'd gladly 
accept a patch from you :)
Comment 4 David Williams CLA 2005-09-24 17:43:47 EDT
Sound like another case where we there's a certain hierarchy of preferences, 
"work like text editors", "work like source editors", "do XYZ". 
Comment 5 Amy Wu CLA 2008-02-04 12:58:00 EST
mass reassignment of my bugs to xml-inbox