Bug 144313 - Preference to turn off auto-insertion
Summary: Preference to turn off auto-insertion
Status: VERIFIED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords: bugday, contributed, helpwanted
: 218283 (view as bug list)
Depends on: 222077
Blocks:
  Show dependency tree
 
Reported: 2006-05-29 16:25 EDT by John Arthorne CLA
Modified: 2008-06-10 13:41 EDT (History)
2 users (show)

See Also:
thatnitind: review+


Attachments
Patch to provide Typing preference pages for XML, HTML, and JSP (43.98 KB, patch)
2008-03-10 16:06 EDT, Nick Sandonato CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2006-05-29 16:25:28 EDT
Build: Callisto RC3

A pet peeve of mine is editors that automatically insert characters that I did not type.  One such "feature" is the auto-completion of closing tags in the HTML editor.  If I type <b> followed by </ , it automatically inserts the characters "b>"  The problem is that I don't always read as I'm typing, so I end up with "</b>b>".  I have turned off the HTML Source > "Automatically make suggestions" preference, but it still insists on inserting characters.  Please provide a preference to turn this off.
Comment 1 John Arthorne CLA 2006-05-29 16:42:24 EDT
Another option is to skip over retyped auto-inserted characters.  For example the Java editor automatically closes strings and braces, but if I type the closing quote or brace myself, it just overwrites it. I.e., if I type the entire sequence myself, the result should exactly match what I typed. 
Comment 2 Amy Wu CLA 2006-05-30 09:45:53 EDT
Currently, auto-insertion is tied to the "Smart Insert mode" which you can turn on and off via the menu option (in the Edit menu)

This means, you can toggle auto-insertion on/off per editor, but you have to specifically turn it off every time you open the editor.

I can look into turning this into a preference.
Comment 3 Amy Wu CLA 2007-09-13 13:24:38 EDT
It'd be nice if we had preferences for every auto-insert option like Java editor does, but at this point, I'd be happy if we just had 1 preference to turn on/off auto-insert.  Once the preference is added, basically anywhere where we're currently checking for if the "Smart insert mode" is on, we should also check if the auto-insert preference is on or off.
Comment 4 Amy Wu CLA 2008-02-15 13:29:45 EST
*** Bug 218283 has been marked as a duplicate of this bug. ***
Comment 5 Nick Sandonato CLA 2008-03-10 14:59:53 EDT
Added dependency on bug 222077. That enhancement contains code that provides additional smart-insert functionality that should have typing preferences taken into account.
Comment 6 Nick Sandonato CLA 2008-03-10 16:06:50 EDT
Created attachment 92080 [details]
Patch to provide Typing preference pages for XML, HTML, and JSP

This patch contains Typing preference pages for XML, HTML, and JSP.  These preferences are referenced in the XML, HTML, and JSP auto edit strategies.

The Typing preference page can be found under the Editor category of XML, HTML, or JSP.
Comment 7 Nick Sandonato CLA 2008-03-11 10:06:25 EDT
(In reply to comment #1)
> Another option is to skip over retyped auto-inserted characters.  For example
> the Java editor automatically closes strings and braces, but if I type the
> closing quote or brace myself, it just overwrites it. I.e., if I type the
> entire sequence myself, the result should exactly match what I typed. 
> 

I looked into this possibility, and while not difficult to implement, I could see this causing problems.  For example, if one were to type "Word<b>endingwith</b>b" I don't think there would be a way for us to know that that trailing b was purposefully typed as part of a text node, or if it was a case of typing to fast.
Comment 8 Nitin Dahyabhai CLA 2008-03-27 03:16:43 EDT
Whew, almost overlooked it.  Nice addition.  Released.
Comment 9 David Williams CLA 2008-04-24 00:44:20 EDT
mass change to add 'contributed' keyword based on bugzilla query, please correct if that's not accurate (by marking patches as obsolete and removing the 'contributed' keyword. 
Comment 10 Nick Sandonato CLA 2008-06-10 13:41:44 EDT
Verified in S-3.0RC4-20080610084135.