Themes for Dart Editor

2019-05-22 21:31发布

问题:

Right now, the white background is killing my eyes, as it's a looong dark night. Is it possible to change the theme (to something darker) from the Dart Editor (v 0.1)? What about picking a background colour and syntax highlighting?

回答1:

Yes, it is possible and I have just verified this quickfix for a darker background on the Dart Editor Version 0.1.0.201204042313:

  1. Close the Dart Editor
  2. Open with your favorite editor the file: <DART-INSTALL-DIR>\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ui.editors.prefs
  3. Change the content

from:

 #Fri Apr 06 20:28:37 EST 2012
 eclipse.preferences.version=1
 overviewRuler_migration=migrated_3.1

to:

#Fri Apr 06 20:28:38 EST 2012
AbstractTextEditor.Color.Background.SystemDefault=false
AbstractTextEditor.Color.Background=208,208,223
eclipse.preferences.version=1
overviewRuler_migration=migrated_3.1

Start your Dart Editor and the background should look like:

You may create a "complete theme" simply adding more properties to the org.eclipse.ui.editors.prefs and org.eclipse.jdt.ui.prefs files.

I strongly suggest you to have a look inside the "Eclipse Preferences (EPF)" sample files of the project http://www.eclipsecolorthemes.org/

I haven't tried yet but in theory you could manually install the plugin Eclipse Color Theme.


Update 06-Dec-2012

The new Dart Editor Build 0.2.7.1_r15699 supports theming for both editor and panels. This "trick" is not needed anymore, please customize your theme using Preferences --> Visual Theme



回答2:

Hannes Rammer built an open source tool for this

  • https://github.com/HannesRammer/Rainbow (GitHub)
  • http://pub.dartlang.org/packages/rainbow

also available online at https://rainbow-dart.appspot.com/



回答3:

I don't believe this is possible. It has been filed as an issue: http://code.google.com/p/dart/issues/detail?id=293&q=themes&colspec=ID%20Type%20Status%20Priority%20Area%20Owner%20Summary