4

Eclipse by default will insert closing braces "}" when you type an opening brace "{" for most if not all file formats. This feature can be turned off for most file types in Windows->Preferences but how do you turn it off for CSS files or braces that are inserted in STYLE sections of HTML files?

MikeyBunny
  • 557
  • 4
  • 13
  • This post was maliciously downvoted along with all of my other answers going back 7 years. Please ignore the current -1 downvote, although I think this may be why my question was not getting much attention before posting a bounty. – MikeyBunny Oct 30 '17 at 09:46

1 Answers1

0

The CSS editor and the HTML editor are developed by Eclipse WTP Source Editing, not by Eclipse PDT. Currently, there is no preference to turn off automatically closing of {braces} in CSS (like there is in Java or in JavaScript).

Of course you can also open the file with the text editor, but this is certainly not what you want. All CSS editor specific preferences can be set in Window > Preferences: Web > CSS Files > Editor. These preferences are also used by the HTML editor for CSS parts.

There seems to be no such feature request yet. But you can request this enhancement here.

Source code:

howlger
  • 22,720
  • 8
  • 35
  • 64
  • I reported bugs https://bugs.eclipse.org/bugs/show_bug.cgi?id=562878 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=562877 about this. – Mikko Rantalainen May 06 '20 at 10:19