You can save the folder ‘.metadata’ in your workspace.
This folder contain your preferences, simply restore it after a re-installation and your done.
Be aware that ‘.metadata’ folder contains not only cosmetic or formatting preferences, but also projects,plugins,… settings that you may want to delete by creating a brand new workspace
Prefer to copy the ‘core’ eclipse settings in:
‘.metadata/.plugins/org.eclipse.core.runtime/.settings/‘
Theses ‘core’ settings can be exported using ‘File -> Export -> Preferences’ too as Csaba_H said.
But the syntax coloring preferences for a specific language won’t be exported.