101

I've always found the eclipse's automatic close quotes and parenthesis features to be useless. For example hitting on a single " will lead to

"<cursor>"

I don't need the second quote. It's annoying to remove afterward. How to turn this feature off?

Update: I now kept the setting on. If you type another quote " it will break through.

Yada
  • 30,349
  • 24
  • 103
  • 144
  • 3
    I know this post is almost 4 years old, but in case others discover this just now as I have: You can hit tab to move your cursor to the highlighted location. This means you don't need to arrow key out of the qoutes/brackets/parens, etc. Pretty handy. I turned all closing back on once I discovered this. – jtsmith1287 Dec 31 '12 at 18:29
  • 3
    Agreed. This is the kind of behaviour you can put up with in MS word but resent in Eclipse. When developers try to guess what users want, users end up trying to guess what developers guessed they needed in the first place. – Alain Pannetier Apr 09 '13 at 05:51
  • Actually, I know have the setting turned on and just type another quote " to break through. – Yada Sep 27 '13 at 19:26
  • 3
    This is especially annoying when you want to break up a string by typing quotes inside an existing string. `"string" -> "stri" + ""ng"`... nonetheless, it's an additional press of the backspace/delete key. If only there was a setting for autocompletion in specific cases. – Adam Jensen Aug 21 '14 at 02:01
  • 1
    For Android Studio: Settings > Editor > General > Smart Keys > Inser pair quote (uncheck). – careful7j Apr 12 '16 at 08:11

6 Answers6

108

Try Window -> Preferences -> Java -> Editor -> Typing and uncheck the "Strings" checkbox in the "Automatically close" group.

Micer
  • 8,731
  • 3
  • 79
  • 73
Allethrin
  • 1,181
  • 1
  • 8
  • 6
  • @drevicko SEe a psychiatrist – bobobobo Apr 09 '13 at 18:18
  • For Perl, it's in Preferences > Perl EPIC > Editor > Smart Typing – golimar Apr 15 '13 at 13:43
  • 3
    I did all this but it's still auto-closing quotes in CSS files, arrrgh! – thdoan Dec 02 '14 at 03:11
  • For Database Development, it's in Data Management > SQL Development > SQL Editor > Typing – golimar May 12 '16 at 14:46
  • In Preferences, search for "Strings". "Typing" > "Automatically close" > "Strings" (itself enclosed in quotation marks in the Preference dialog) showed up in multiple places. I cleared "Strings" in all of them. Seems to have helped... – RBV Jul 24 '17 at 02:22
21

You need to turn this feature off for all editors: Go to Preferences and in the "type filer text" box type "typing". Then click on each result and un-check all unwanted automatically close options.

Graham
  • 251
  • 2
  • 3
  • I would like for all the options to be found this way, but I am not finding the way to disable the automatic addition of " . " when editing PHP in the Web perspective. I have turned off all auto options under the "typing" search results and restarted eclipse only to be thwarted again! – en_Raude Oct 04 '13 at 08:18
  • 2
    This is a much better answer than the accepted answer. There are multiple configs for each type of language you are using, so the config is definitely context sensitive (e.g. Java, Javascript, HTML) and apparently must be changed for each. – MuffinMan Mar 13 '15 at 21:34
  • Wow, the XML editor "typing" category in the preferences is only shown, when searching for "typing". You can't navigate to this option directly... Thanks very much. – BlackEye Nov 07 '17 at 12:48
  • 1
    For HTML files, you need to disable Web -> HTML Files -> Editor -> Typing -> "Automatically close for Attribute Values". Unlike it suggests, quotes are not only inserted for attribute values, but also when editing an HTML element's text content. – Dennie Jun 05 '18 at 10:23
2

You could also hit quote when you want to exit the auto-complete quote. This will put you outside the quote as if you closed it yourself. So this feature doesn't really break the flow of you programing.

h3dkandi
  • 1,106
  • 1
  • 12
  • 27
  • As seen in the update of the original poster this answer actually is the behavior he found to solve his problem. I don't know why people downvote. – h3dkandi Apr 16 '15 at 06:36
2

Jump out of the quotes by simply hitting Enter when you are done typing the string contents (at least, in the java editor).

James Van Huis
  • 5,481
  • 1
  • 26
  • 25
  • Thanks for the tip, helpful when I am escaping quotes in a code like `'\''` and do not want a closing quote I just now press enter and delete. – Daniel Sokolowski Nov 25 '13 at 21:46
2

To turn off auto quotes in Titanium Studio, under preferences -> Titanium Studio -> Editors -> uncheck "Auto-close matching character pairs"

jcampbell1
  • 4,159
  • 3
  • 33
  • 35
1

The location for similar auto quoting capabilities in PyDev for eclipse: Windows -> PyDev -> Editor -> Typing -> "Automatic literal closing."

In order to enable pressing enter to exit the quotes check "Enable link on automatic parentheses or literals closing."