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?
Settings can be exported to a file using File -> Export -> Preferences, and you can import it to another Eclipse workspace.
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.
Select Window->Preferences->C/C++->Scalability->Disable syntax coloring in editor.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With