Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » How do I permanently disable smart insert, for all file types, forever?(It really is the most annoying feature I've ever come across in an IDE)
icon8.gif  How do I permanently disable smart insert, for all file types, forever? [message #655368] Sun, 20 February 2011 01:39 Go to next message
Dan Nye is currently offline Dan NyeFriend
Messages: 3
Registered: February 2011
Junior Member
I've been struggling for the past 6 hours to find a way to permanently disable the ironically-named "smart insert" feature of Eclipse. I've searched the help files, the internet, and turned off pretty much every autocomplete, content assist, and typing option going for all file types, and even blanked all comment code templates for all languages... and yet Eclipse still persists in second guessing what I know I want to do, visually raping me with extra asterisks whenever I type /* and press Enter.

I guess I should count myself lucky it's only in my JS and PHP editors, and that it doesn't do it in my CSS editor as well.

I know I can turn it off on the menu or using the shortcut key, but this seems to be a per-file setting - when I open another file (even of the same type), the bloody thing has turned itself back on - which makes my blood boil. If I turn a setting off, I expect it to stay off, not sneak itself back on at every possible opportunity!

I don't want to ditch Eclipse in favour of another IDE as I've used it for years (and I detest the SVN integration in IntelliJ), but if I can't find a way to disable what must be the most annoying feature ever invented, I might go postal!

I would be more grateful than you will ever know if someone could tell me how I can disable smart insert permanently, no ifs, no buts - always. If it helps, I'm using Eclipse 3.6.1.

Thanks,

Dan

[Updated on: Sun, 20 February 2011 01:58]

Report message to a moderator

Re: How do I permanently disable smart insert, for all file types, forever? [message #660728 is a reply to message #655368] Mon, 21 March 2011 12:27 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4507
Registered: July 2009
Senior Member

I'm not aware of a way to do it permanently, but the part of the status bar that shows that Smart Insert is the current mode can be used to turn it off just by double clicking there. And, or course, there should be a key binding for controlling it on your Edit menu.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: How do I permanently disable smart insert, for all file types, forever? [message #660761 is a reply to message #660728] Mon, 21 March 2011 13:55 Go to previous messageGo to next message
Dan Nye is currently offline Dan NyeFriend
Messages: 3
Registered: February 2011
Junior Member
I understand that I could turn it off every time I open a file, but can you imagine how tedious that becomes after the first one, two, three, ... ten, twenty, ... fifty sixty, ... files? It really does slow me down - you have no idea just how annoying this "smart" feature is to me.

I'm sure the naming of it is some sort of sick joke, as something that causes me to waste time undoing what it does (something that I don't want in the first place) can hardly be considered very "smart". Perhaps it's a big boon to people who edit Java and JSP files, who knows... but for me with my JS and PHP files, it's a very heavy millstone around a very sore neck.

I've pretty much had it up to "here" with the feature (and with with jokes that rely on visual imagery Very Happy) so I'm going to give NetBeans a try. If it does all I need then my long relationship with Eclipse will be, sadly, coming to a very abrupt end over this one issue.

I'm by no means the only person to vehemently dislike this behaviour as I've found two bugs relating to it, 250594: Smart Insert Mode always on by default raised in 2008, and 319532: Allow to disable smart auto-indent on return, raised last year.

From the seemingly childish taunts that Daniel Megert seems to derive pleasure from dishing out to the bug reporters who have to put up with this annoyance, only to dash their hopes with a "WONTFIX" status, I get the impression that this won't be fixed any time soon. I'm not making this personal - but you have to agree that the two bugs I refer to don't exactly give much hope to people who suffer from this day in, day out.

Perhaps, Daniel, if you're reading this, you can answer my question: why are you seemingly so against empowering the user to work faster if they so wish to?

Dan
Re: How do I permanently disable smart insert, for all file types, forever? [message #734087 is a reply to message #655368] Thu, 06 October 2011 16:09 Go to previous messageGo to next message
Jason Loefer is currently offline Jason LoeferFriend
Messages: 4
Registered: October 2011
Junior Member
Ditto. This feature is not only profoundly annoying to some of us, but equally pervasive, as was pointed out.

Please add an option to "permanently" disable this "feature".

TIA
Re: How do I permanently disable smart insert, for all file types, forever? [message #735734 is a reply to message #734087] Wed, 12 October 2011 15:48 Go to previous messageGo to next message
Nick Sandonato is currently offline Nick SandonatoFriend
Messages: 126
Registered: July 2009
Senior Member
Hi Jason,

You can disable individual typing features that you may not like through the typing preference pages for the various editors. For example, if you don't like the HTML editor inserting a matching end tag go to Preferences > Web > HTML Files > Editor> Typing and uncheck Insert a matching end tag. While this doesn't disable Smart Insert Mode, hopefully it'll help alleviate some of your frustration.
Re: How do I permanently disable smart insert, for all file types, forever? [message #736071 is a reply to message #735734] Thu, 13 October 2011 13:49 Go to previous messageGo to next message
Jason Loefer is currently offline Jason LoeferFriend
Messages: 4
Registered: October 2011
Junior Member
Thanks Nick. I've tried "C/C++|Editor|Typing |Automatically Close" (unchecked all of those) and "C/C++|Code Style|Code Templates|Comments|*", edited them to nothing (won't let me remove them)...all to no avail.

The biggest issue (but not the only one) I have is when I type:
/*(Enter)
I don't want the editor to "out-smart" me by inserting:
/*
*
*/
Especially since it requires 3 undos to roll out.

This started out as a reasonable exploration in program options, then became a mild annoyance, and now it's become simply INFURIATING!

Re: How do I permanently disable smart insert, for all file types, forever? [message #736100 is a reply to message #736071] Thu, 13 October 2011 15:18 Go to previous messageGo to next message
Dan Nye is currently offline Dan NyeFriend
Messages: 3
Registered: February 2011
Junior Member

Hi Nick,

While I have no doubt that the smart insert feature is invaluable to many, it's also clear that it not everyone's cup of tea, and in fact can slow people down and force them to make edits to their code that they would otherwise not have had to make. It's also obvious that this has been a contentious issue for some time - the first bug I referenced was opened in 2008.

Do you know of a reason why there is no option to disable this feature, or why people would be against offering the option to let the user decide? If not, can you think of any good justification for not adding one into a future release? I would have thought that empowering the user to work faster and hassle-free could only be a boon to the Eclipse IDE.

Dan

Re: How do I permanently disable smart insert, for all file types, forever? [message #736167 is a reply to message #736071] Thu, 13 October 2011 18:02 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4507
Registered: July 2009
Senior Member

I think you'll have to take that up with the CDT, as we don't control the behavior of the C Editor here in WTP.


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: How do I permanently disable smart insert, for all file types, forever? [message #736169 is a reply to message #736100] Thu, 13 October 2011 18:08 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4507
Registered: July 2009
Senior Member

The JavaScript Editor has a fairly complete Typing preference page for its individual Smart Insert functions. But then if it's not behaving in a beneficial manner, I'd rather see it fixed than just turned off. Asking for an option to turn it off just ends the conversation.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: How do I permanently disable smart insert, for all file types, forever? [message #754419 is a reply to message #736169] Wed, 02 November 2011 14:00 Go to previous messageGo to next message
Jason Loefer is currently offline Jason LoeferFriend
Messages: 4
Registered: October 2011
Junior Member
Hi Nitin,

It's not that anything at all needs to be fixed. Quite the contrary - Apparently it works very well already...for many developers. As a result, it's been highly refined. This is not the point.

I thought I already had, but I want to be perfectly clear on this: Smart insert is not for EVERYONE.

I simply don't understand the resistance to make it more flexible by simply adding an option to globally turn it off at the DEVELOPER's discretion, especially considering the presumably small amount of work to implement it.

In terms of the proper group, I was merely responding to a thread already posted by Dan. The editor affects all languages supported.

Thanks,

-Jason

Re: How do I permanently disable smart insert, for all file types, forever? [message #760530 is a reply to message #736071] Fri, 02 December 2011 17:39 Go to previous messageGo to next message
spambugg is currently offline spambuggFriend
Messages: 1
Registered: December 2011
Junior Member
Hi Jason,

i'm not 100% sure to match your wish, but give it a try. In Windows Menu select Preferences and type in javadoc. There is a "Content Assistant" with Java proposals, and also a code-style formatter which is matching your /* ...*... */ description.

cheers
Re: How do I permanently disable smart insert, for all file types, forever? [message #781890 is a reply to message #655368] Sun, 22 January 2012 16:35 Go to previous messageGo to next message
Ronny Kavli is currently offline Ronny KavliFriend
Messages: 1
Registered: January 2012
Junior Member

Dan,

You're far from alone detesting the "Smart-Insert"-mode. Sadly I think this is a politically infected problem more than a technical. There have been requests for a enable/disable earlier, as listed in bug report 250594. Sadly there are some really bone-headed people within the Eclipse-sphere that don't want that to happen, so screaming about it seems to be a waste of breath.

Anyhow, "Smart" Insert is broken by design. Just think of it: If an algorithm could figure out where my braces, brackets and parenthesis should be located, then there would be no need for them in the first place. Typing them by hand is extremely inexpensive compared to deleting them. Marking imbalances is, on the other hand, very valuable.

-- K

Re: How do I permanently disable smart insert, for all file types, forever? [message #1828202 is a reply to message #781890] Wed, 03 June 2020 19:54 Go to previous messageGo to next message
Pies Julius is currently offline Pies JuliusFriend
Messages: 2
Registered: June 2020
Junior Member
Hi Guys,

I know it's an old thread but as it pops up as first in google if searched for this I wanted to let you know what I did and how I made this to work. Unfortunately as agreed with others, it's out of understanding why they can't do this so diggd around a bit in the source today and was able to make this happen as follows:

1. Open Eclipse and create a new java project (call it Test or org.eclipse.ui or whatever you want)
2. Create the following directories/file within this project:
src/org/eclipse/ui/texteditor/AbstractTextEditor.java
3. Copy the content from the eclipse release you are using to this file, for e.g. this is version 4.15
https://git.eclipse.org/r/plugins/gitiles/platform/eclipse.platform.text/+/S4_15_0_RC2/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
4. Edit above code as follows:
4.1 Commenting out everything within "setInsertMode(InsertMode newMode) { }" function
4.2 Change "private InsertMode fInsertMode= SMART_INSERT;" to "private InsertMode fInsertMode= INSERT;"
5. Right click your project, select Properties -> Java Build Path -> Libraries -> Add External JARs and select all jars files from your eclipse installation plugins/ directory (just use shift to select all of them at once)
6. Select "Run -> Run As -> Java Application"
7. Rename "plugins/org.eclipse.ui.workbench.texteditor_3.14.100.v20200212-1049.jar" in your eclipse installation directory (you version may change depending on release) to org.eclipse.ui.workbench.texteditor_3.14.100.v20200212-1049.jar.zip
8. Replace the "org/eclipse/ui/texteditor/AbstractTextEditor.class" file within this zip file with the one from your own build located at "bin/org/eclipse/ui/texteditor/AbstractTextEditor.class"
9. Rename "org.eclipse.ui.workbench.texteditor_3.14.100.v20200212-1049.jar.zip" back to it's original name for e.g. "org.eclipse.ui.workbench.texteditor_3.14.100.v20200212-1049.jar"
10. Restart eclipse and now independent of your source editor kind (java, c, php, css, javascript) they all should be in normal insert mode.

IMPORTANT: this will prevent you from switching to Smart Insert as it simply disables that possibility because for some reason for e.g. PHP and CSS editors directly switch to Smart Insert mode even if default is not smart insert mode so had to totally disable the possibility to switch to this nonsens mode.

TO Eclipse Developers: You do have a pretty powerful IDE, I use it since well around 2003 or so and pretty happy with it but this nonsence smart insert mode makes one work more than less, and don't ask my what bothers me with it or what it should do differently, simply allow it to be disabled and there you go, a dam checkbox in the settings would be enough and everyone would be happy but for some reason you keep forcing it because you want to be smarter or for whatever reason. Don't tell me what to disable or what not as I do have everything disabled that could be disabled re this but nothing helps so just add a simple checkbox that can disable this and everyone would be happy with it.

I know it's a free software and we shouldn't complain, so I'm not complaining, even so trying to come up with a solution to the best of my knowledge and would even consider paying for this feature so that you don't do it for free just please please add this option, it's a such a simply change and would help so many people who do not consider one telling them why is better this way than that way.

Really hope this will be somehow helpful one way or another.

Thanks for this IDE which is a must in my opinion for different and multiple projects so really thankful for it and for all you hard work you put in it, let me know if it would be helpful to consider a patch that would add this feature to the core just not sure if you accept third party patches from a noname like me.

Regards,
Julius
Re: How do I permanently disable smart insert, for all file types, forever? [message #1828286 is a reply to message #1828202] Fri, 05 June 2020 18:13 Go to previous message
Pies Julius is currently offline Pies JuliusFriend
Messages: 2
Registered: June 2020
Junior Member
Would like to add that just noticed the broken caret in case of normal insert mode, for that you will need to:
1. Find "private Caret createRawInsertModeCaret" in the same "AbstractTextEditor.java" file
2. Comment out everything except "return createInsertCaret(styledText);"

This way you will have the same caret as with smart insert mode, meaning a normal caret.

Or even better, please see attached patch file with all the changes.

[Updated on: Fri, 05 June 2020 18:27]

Report message to a moderator

Previous Topic:Some EJBs only get published if project is open in eclipse
Next Topic:Why does Jetty server restart an application?
Goto Forum:
  


Current Time: Tue Dec 03 11:55:40 GMT 2024

Powered by FUDForum. Page generated in 0.04224 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top