Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse syntax highlighting preferences save and restore

I spend some time customizing the colors for syntax highlighting in Eclipse (Java, JSP, HTML, CSS, etc.) but whenever I try to export these settings via File|Export|General|Preferences and reimport them, the settings never completely get imported back. Some colors are restored and others are left unchanged, leaving me in an 'in between' state - very frustrating.

I'm using Eclipse 3.4 Ganymede, by the way.

Has anyone found a reliable way to save and restore Eclipse syntax highlighting settings?

like image 282
foxdonut Avatar asked Dec 16 '08 21:12

foxdonut


People also ask

How do I save my preferences in eclipse?

Settings can be exported to a file using File -> Export -> Preferences, and you can import it to another Eclipse workspace.

Does Eclipse have syntax highlighting?

The color and font settings can be configured from the Syntax Coloring preferences page, accessed from Window | Preferences | PHP | Editor | Syntax Coloring. Note: Syntax Coloring will also be available for JavaScript elements if JavaScript support was enabled for the project.

How do I turn off syntax highlighting in Eclipse?

Select Window->Preferences->C/C++->Scalability->Disable syntax coloring in editor.


1 Answers

I finally figured out how to do this.

I just wanted to mention beforehand that I did try to start with a fresh Eclipse install, export the preferences to a .epf file, change just one single setting, export again, and compare the files. To my surprise, trying to import settings from a minimal .epf file did not work reliably either.

The solution that worked for me was to copy these files: {Eclipse workspace directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings/*.prefs

I tried a fresh Eclipse install on another machine and after copying those files over, all my settings were restored perfectly.

like image 158
foxdonut Avatar answered Oct 01 '22 23:10

foxdonut