Filed under: Python
Kudos to anyone who has tried to code on plane or in an airport without noise canceling earphones. Not only is it way too noisy but the lighting can really mess with your eyes after a short time. My main issue when trying to accomplish something while in transit is finding enough space to open up my laptop fully, which means my viewing angle is far less than optimal.
On my last journey to the south I took some time to read up on colors and fonts used in IDE’s. There are a bunch of good sites out there with solid suggestions on programming fonts. For me I initially used Courier New (come on, who hasn’t accepted the defaults at one time or another) but soon switched over to Consolas when changed over to Vista — enjoyed Consolas for a while but then fell in love with Bitstream Vera Sans Mono after a stint working on one of my Ubuntu laptops.
For most (but not all) of our Python development we use Komodo IDE, this IDE allows full control (although the granularity of control could be better with respect to the categories of language Element Types) over the fonts and colors used. Here is the first scheme that we used (and some still use) in our shop when developing:
This one worked for quite some time for me but it was too harsh on my eyes when working on my laptop screen (using 1920×1200 resolution) but was OK when on my external display (24" Widescreen LCD). Fiddling with the various settings I’ve come up with these two schemes that really help reduce eye strain for me on my laptop screen and external display, even when surrounding light and viewing angles are sub-optimal.
This last one is the scheme that I’m presently using, it seems to work great on the plane — a subtle change is that the operators are bold, subtle but makes a difference.
10 Comments so far
Leave a comment
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Would you be so kind as to release the source komodo scheme files? Been looking for something similar to that blue one. The gray is also quite nice.
Comment by Scott April 4, 2009 @ 10:45 amHere is the blue scheme
————–Begin snippet
Version = 2
Booleans = {‘caretLineVisible’: False, ‘preferFixed’: 1, ‘useSelFore’: True}
CommonStyles = {‘attribute name’: {‘fore’: 7872391},
‘attribute value’: {‘fore’: 3100463},
‘bracebad’: {‘back’: 65535, ‘bold’: 1, ‘fore’: 6579400},
‘bracehighlight’: {‘bold’: 1, ‘fore’: 6579400},
‘classes’: {‘fore’: 13209},
‘comments’: {‘fore’: 6710886, ‘italic’: True},
‘control characters’: {‘back’: 16777215, ‘fore’: 0},
‘default_fixed’: {‘back’: 16777215,
‘bold’: 0,
‘eolfilled’: 0,
‘face’: ‘Courier New’,
‘fore’: 0,
‘hotspot’: 0,
‘italic’: 0,
’size’: 10,
‘useFixed’: 1},
‘default_proportional’: {‘back’: 16777215,
‘bold’: 0,
‘eolfilled’: 0,
‘face’: ‘Verdana’,
‘fore’: 0,
‘hotspot’: 0,
‘italic’: 0,
’size’: 10,
‘useFixed’: 0},
‘fold markers’: {},
‘functions’: {‘fore’: 204},
‘identifiers’: {‘fore’: 26112},
‘indent guides’: {‘fore’: 8421504},
‘keywords’: {‘fore’: 10040115},
‘keywords2′: {‘fore’: 7872391},
‘linenumbers’: {‘fore’: 5592405},
‘numbers’: {‘fore’: 139},
‘operators’: {‘fore’: 8855416},
‘preprocessor’: {‘fore’: 6908265},
‘regex’: {‘fore’: 25800},
’stderr’: {‘fore’: 16711680, ‘italic’: 1},
’stdin’: {‘fore’: 0},
’stdout’: {‘fore’: 0},
’stringeol’: {‘back’: 10079487, ‘eolfilled’: 1, ‘fore’: 6710886},
’strings’: {‘fore’: 3368601},
‘tags’: {‘fore’: 16724480},
‘variables’: {‘fore’: 0}}
LanguageStyles = {‘Apache’: {‘directives’: {‘fore’: 9145088},
‘extensions’: {‘fore’: 139},
‘ip_addresses’: {‘fore’: 6908265},
‘parameters’: {‘fore’: 7872391}},
‘C#’: {‘UUIDs’: {‘fore’: 0},
‘commentdockeyword’: {‘fore’: 0},
‘commentdockeyworderror’: {‘fore’: 14483456},
‘globalclass’: {‘fore’: 9145088},
‘verbatim’: {‘fore’: 0}},
‘C++’: {‘UUIDs’: {‘fore’: 0},
‘commentdockeyword’: {‘fore’: 0},
‘commentdockeyworderror’: {‘fore’: 14483456},
‘globalclass’: {‘fore’: 9145088},
‘verbatim’: {‘fore’: 0}},
‘CSS’: {‘ids’: {‘fore’: 139},
‘important’: {‘fore’: 9109504},
‘tags’: {‘fore’: 9145088},
‘values’: {‘fore’: 7872391}},
‘Diff’: {‘additionline’: {‘fore’: 9109504},
‘chunkheader’: {‘fore’: 9145088},
‘deletionline’: {‘fore’: 139},
‘diffline’: {‘fore’: 6908265, ‘italic’: 1},
‘fileline’: {‘fore’: 7872391, ‘italic’: 1}},
‘Errors’: {‘Error lines’: {‘fore’: 102, ‘hotspot’: 1, ‘italic’: 1}},
‘HTML’: {‘attributes’: {‘fore’: 102},
‘cdata’: {‘fore’: 9109504},
‘comments’: {‘italic’: False},
‘default’: {‘fore’: 26112},
‘other’: {‘fore’: 6710886},
‘tags’: {‘fore’: 10027008}},
‘IDL’: {‘UUIDs’: {‘fore’: 0},
‘commentdockeyword’: {‘fore’: 0},
‘commentdockeyworderror’: {‘fore’: 14483456},
‘globalclass’: {‘fore’: 9145088},
‘verbatim’: {‘fore’: 0}},
‘Java’: {‘UUIDs’: {‘fore’: 0},
‘commentdockeyword’: {‘fore’: 0},
‘commentdockeyworderror’: {‘fore’: 14483456},
‘globalclass’: {‘fore’: 9145088},
‘verbatim’: {‘fore’: 0}},
‘JavaScript’: {‘UUIDs’: {‘fore’: 0},
‘commentdockeyword’: {‘fore’: 0},
‘commentdockeyworderror’: {‘fore’: 14483456},
‘globalclass’: {‘fore’: 9145088},
‘identifiers’: {‘fore’: 26112},
‘verbatim’: {‘fore’: 0}},
‘PHP’: {‘comments’: {‘italic’: False},
‘identifiers’: {‘fore’: 153},
‘other’: {‘fore’: 6710886},
‘variables’: {‘fore’: 26112}},
‘Perl’: {‘arrays’: {‘fore’: 26112},
‘data sections’: {‘fore’: 6710886},
‘hashes’: {‘fore’: 26112},
‘here documents’: {‘bold’: 1, ‘fore’: 8594211},
‘variables’: {‘fore’: 39168}},
‘Python’: {‘bracehighlight’: {‘back’: 6750207},
‘classes’: {‘fore’: 6711039},
‘comments’: {‘fore’: 16763955},
‘default’: {‘back’: 6684672, ‘fore’: 13421823},
‘functions’: {‘fore’: 6711039},
‘identifiers’: {‘back’: 6684672,
‘bold’: False,
‘fore’: 16777215,
‘useFixed’: True},
‘keywords’: {‘bold’: True, ‘fore’: 3394815},
‘numbers’: {‘fore’: 6750207},
‘operators’: {‘fore’: 12632256},
’strings’: {‘fore’: 3407667}},
‘Regex’: {‘charclass’: {‘fore’: 2237106, ‘italic’: 1},
‘charescape’: {‘fore’: 9145088, ‘italic’: 1},
‘charset_operator’: {‘fore’: 7872391, ’size’: 12},
‘comment’: {‘fore’: 6908265, ‘italic’: 1},
‘default’: {},
‘eol’: {},
‘groupref’: {‘fore’: 2237106, ‘italic’: 1},
‘grouptag’: {‘fore’: 7872391, ’size’: 8},
‘match_highlight’: {‘back’: 10092543},
‘operator’: {‘fore’: 7872391, ’size’: 12},
‘quantifier’: {‘bold’: 1, ‘fore’: 16711680, ’size’: 12},
’special’: {‘bold’: 1, ‘fore’: 16711680},
‘text’: {}},
‘Ruby’: {‘class variables’: {‘fore’: 26112},
‘data sections’: {‘fore’: 6710886},
‘here documents’: {‘fore’: 3368601},
‘instance variables’: {‘fore’: 26112},
‘modules’: {‘fore’: 153},
’symbols’: {‘fore’: 26214}},
‘Rx’: {‘breakpoints’: {‘back’: 14540253},
‘children’: {‘back’: 14540236},
‘default’: {‘bold’: 1},
‘parents’: {‘back’: 13434828}},
‘Text’: {},
‘XML’: {‘attribute name’: {‘fore’: 26112},
‘attribute value’: {‘fore’: 153},
‘cdata’: {‘fore’: 9109504},
‘cdata content’: {‘fore’: 3368601},
‘cdata tags’: {‘fore’: 6710835},
‘comments’: {‘italic’: False},
‘data’: {‘fore’: 3368601},
‘declarations’: {‘fore’: 16724787},
‘entity references’: {‘fore’: 2302862},
‘pi content’: {‘fore’: 9145088},
‘pi tags’: {‘fore’: 9109504},
‘prolog’: {‘fore’: 0},
‘tags’: {‘fore’: 10027008},
‘xpath attributes’: {‘fore’: 9109504},
‘xpath content’: {‘fore’: 36095},
‘xpath tags’: {‘fore’: 11}}}
Colors = {‘activeBreakpointColor’: 526573,
Comment by jlhumber April 4, 2009 @ 5:14 pm‘bookmarkColor’: 14342664,
‘callingLineColor’: 16764159,
‘caretFore’: 12632256,
‘caretLineBack’: 16119285,
‘currentLineColor’: 16764108,
‘edgeColor’: 15658734,
‘foldMarginColor’: None,
‘pendingBreakpointColor’: 569096,
’selBack’: 13421772,
’selFore’: 13395660}
————–End snippet
Hi, I’ve tried your blue scheme and it looks very nice!
Comment by Alex May 4, 2009 @ 3:13 amIn the past years I’ve been using a similar color scheme on another editor and I was trying to reproduce it on Komodo.
But, when I try to edit colors in the Preferences window, it seems to me that you can choose just those few ones displayed.
I’ve tried to manually edit the .ksf file but I can’t understand what those numbers stand for… do you have any clue?
Hi Alex, the preferences window will allow you to choose more than just the standard set of colors. If you look really close you’ll see a small triangle on the upper right hand side of the color icon. This will open up the standard o/s color picker where you can tweak the colors — I’ve not dabbled in the ksf itself.
Comment by jlhumber May 4, 2009 @ 8:01 pmThanks for your answer! Unfortunately at the moment it looks like there is some kind bug that prevents the small triangle to show up on komodo 5.1 running on linux ubuntu.. but probably they’ll have it fixed with the next 5.2 release
Comment by Alex May 6, 2009 @ 4:49 amhttp://bugs.activestate.com/show_bug.cgi?id=82683
cheers!
Hello! I REALLY liked the last two schemes, especially the gray one! Would you mind sharing the other two? I’ve been working a lot with Python and Komodo Edit lately and I would really appreciate that!
Thanks in advance,
Comment by Alex Tercete May 23, 2009 @ 5:03 pmAlex Tercete
Here is the gray scheme
————–Begin snippet
Version = 2
Booleans = {‘caretLineVisible’: False, ‘preferFixed’: 1, ‘useSelFore’: True}
CommonStyles = {‘attribute name’: {‘fore’: 7872391},
‘attribute value’: {‘fore’: 3100463},
‘bracebad’: {‘back’: 65535, ‘bold’: 1, ‘fore’: 6579400},
‘bracehighlight’: {‘bold’: 1, ‘fore’: 6579400},
‘classes’: {‘fore’: 13209},
‘comments’: {‘fore’: 6710886, ‘italic’: True},
‘control characters’: {‘back’: 16777215, ‘fore’: 0},
‘default_fixed’: {‘back’: 16777215,
‘bold’: 0,
‘eolfilled’: 0,
‘face’: ‘Bitstream Vera Sans Mono’,
‘fore’: 0,
‘hotspot’: 0,
‘italic’: 0,
’size’: 10,
‘useFixed’: 1},
‘default_proportional’: {‘back’: 16777215,
‘bold’: 0,
‘eolfilled’: 0,
‘face’: ‘Verdana’,
‘fore’: 0,
‘hotspot’: 0,
‘italic’: 0,
’size’: 10,
‘useFixed’: 0},
‘fold markers’: {},
‘functions’: {‘fore’: 204},
‘identifiers’: {‘fore’: 26112},
‘indent guides’: {‘fore’: 8421504},
‘keywords’: {‘fore’: 10040115},
‘keywords2′: {‘fore’: 7872391},
‘linenumbers’: {‘fore’: 5592405},
‘numbers’: {‘fore’: 139},
‘operators’: {‘fore’: 8855416},
‘preprocessor’: {‘fore’: 6908265},
‘regex’: {‘fore’: 25800},
’stderr’: {‘fore’: 16711680, ‘italic’: 1},
’stdin’: {‘fore’: 0},
’stdout’: {‘fore’: 0},
’stringeol’: {‘back’: 10079487, ‘eolfilled’: 1, ‘fore’: 6710886},
’strings’: {‘fore’: 3368601},
‘tags’: {‘fore’: 16724480},
‘variables’: {‘fore’: 0}}
LanguageStyles = {‘Apache’: {‘directives’: {‘fore’: 9145088},
‘extensions’: {‘fore’: 139},
‘ip_addresses’: {‘fore’: 6908265},
‘parameters’: {‘fore’: 7872391}},
‘C#’: {‘UUIDs’: {‘fore’: 0},
‘commentdockeyword’: {‘fore’: 0},
‘commentdockeyworderror’: {‘fore’: 14483456},
‘globalclass’: {‘fore’: 9145088},
‘verbatim’: {‘fore’: 0}},
‘C++’: {‘UUIDs’: {‘fore’: 0},
‘commentdockeyword’: {‘fore’: 0},
‘commentdockeyworderror’: {‘fore’: 14483456},
‘globalclass’: {‘fore’: 9145088},
‘verbatim’: {‘fore’: 0}},
‘CSS’: {‘ids’: {‘fore’: 139},
‘important’: {‘fore’: 9109504},
‘tags’: {‘fore’: 9145088},
‘values’: {‘fore’: 7872391}},
‘Diff’: {‘additionline’: {‘fore’: 9109504},
‘chunkheader’: {‘fore’: 9145088},
‘deletionline’: {‘fore’: 139},
‘diffline’: {‘fore’: 6908265, ‘italic’: 1},
‘fileline’: {‘fore’: 7872391, ‘italic’: 1}},
‘Errors’: {‘Error lines’: {‘fore’: 102, ‘hotspot’: 1, ‘italic’: 1}},
‘HTML’: {‘attributes’: {‘fore’: 102},
‘cdata’: {‘fore’: 9109504},
‘comments’: {‘italic’: False},
‘default’: {‘fore’: 26112},
‘other’: {‘fore’: 6710886},
‘tags’: {‘fore’: 10027008}},
‘IDL’: {‘UUIDs’: {‘fore’: 0},
‘commentdockeyword’: {‘fore’: 0},
‘commentdockeyworderror’: {‘fore’: 14483456},
‘globalclass’: {‘fore’: 9145088},
‘verbatim’: {‘fore’: 0}},
‘Java’: {‘UUIDs’: {‘fore’: 0},
‘commentdockeyword’: {‘fore’: 0},
‘commentdockeyworderror’: {‘fore’: 14483456},
‘globalclass’: {‘fore’: 9145088},
‘verbatim’: {‘fore’: 0}},
‘JavaScript’: {‘UUIDs’: {‘fore’: 0},
‘commentdockeyword’: {‘fore’: 0},
‘commentdockeyworderror’: {‘fore’: 14483456},
‘globalclass’: {‘fore’: 9145088},
‘identifiers’: {‘fore’: 26112},
‘verbatim’: {‘fore’: 0}},
‘PHP’: {‘comments’: {‘italic’: False},
‘identifiers’: {‘fore’: 153},
‘other’: {‘fore’: 6710886},
‘variables’: {‘fore’: 26112}},
‘Perl’: {‘arrays’: {‘fore’: 26112},
‘data sections’: {‘fore’: 6710886},
‘hashes’: {‘fore’: 26112},
‘here documents’: {‘bold’: 1, ‘fore’: 8594211},
‘variables’: {‘fore’: 39168}},
‘Python’: {‘bracehighlight’: {‘back’: 6750207},
‘classes’: {‘back’: 3355443, ‘fore’: 6711039},
‘comments’: {‘back’: 3355443, ‘fore’: 52275},
‘decorators’: {‘back’: 3355443},
‘default’: {‘back’: 3355443, ‘fore’: 13421823},
‘functions’: {‘fore’: 6711039},
‘identifiers’: {‘back’: 3355443,
‘bold’: False,
‘fore’: 16777215,
‘useFixed’: True},
‘keywords’: {‘bold’: True, ‘fore’: 6737151},
‘numbers’: {‘fore’: 10526975},
‘operators’: {‘bold’: True, ‘fore’: 12632256},
’strings’: {‘fore’: 15125382}},
‘Regex’: {‘charclass’: {‘fore’: 2237106, ‘italic’: 1},
‘charescape’: {‘fore’: 9145088, ‘italic’: 1},
‘charset_operator’: {‘fore’: 7872391, ’size’: 12},
‘comment’: {‘fore’: 6908265, ‘italic’: 1},
‘default’: {},
‘eol’: {},
‘groupref’: {‘fore’: 2237106, ‘italic’: 1},
‘grouptag’: {‘fore’: 7872391, ’size’: 8},
‘match_highlight’: {‘back’: 10092543},
‘operator’: {‘fore’: 7872391, ’size’: 12},
‘quantifier’: {‘bold’: 1, ‘fore’: 16711680, ’size’: 12},
’special’: {‘bold’: 1, ‘fore’: 16711680},
‘text’: {}},
‘Ruby’: {‘class variables’: {‘fore’: 26112},
‘data sections’: {‘fore’: 6710886},
‘here documents’: {‘fore’: 3368601},
‘instance variables’: {‘fore’: 26112},
‘modules’: {‘fore’: 153},
’symbols’: {‘fore’: 26214}},
‘Rx’: {‘breakpoints’: {‘back’: 14540253},
‘children’: {‘back’: 14540236},
‘default’: {‘bold’: 1},
‘parents’: {‘back’: 13434828}},
‘SQL’: {‘comments’: {‘fore’: 3355443},
‘identifiers’: {‘fore’: 26112},
‘keywords’: {‘bold’: False}},
‘Text’: {},
‘XML’: {‘attribute name’: {‘fore’: 26112},
‘attribute value’: {‘fore’: 153},
‘cdata’: {‘fore’: 9109504},
‘cdata content’: {‘fore’: 3368601},
‘cdata tags’: {‘fore’: 6710835},
‘comments’: {‘italic’: False},
‘data’: {‘fore’: 3368601},
‘declarations’: {‘fore’: 16724787},
‘entity references’: {‘fore’: 2302862},
‘pi content’: {‘fore’: 9145088},
‘pi tags’: {‘fore’: 9109504},
‘prolog’: {‘fore’: 0},
‘tags’: {‘fore’: 10027008},
‘xpath attributes’: {‘fore’: 9109504},
‘xpath content’: {‘fore’: 36095},
‘xpath tags’: {‘fore’: 11}}}
Colors = {‘activeBreakpointColor’: 526573,
‘bookmarkColor’: 14342664,
‘callingLineColor’: 13382604,
‘caretFore’: 12632256,
‘caretLineBack’: 10516560,
‘currentLineColor’: 16764108,
‘edgeColor’: 15658734,
‘foldMarginColor’: 16777215,
‘pendingBreakpointColor’: 569096,
’selBack’: 13421772,
’selFore’: 13395660}
————–End snippet
Comment by jlhumber May 23, 2009 @ 5:21 pmI’m a Komodo newbie, how can I add this scheme? I created a new one called “Gray” with the “New” button on the Preferences window, opened %AppData%\ActiveState\KomodoIDE\5.0\schemes\Gray.ksf and replaced its contents with your snippet, but the background is still white.
Comment by Daniel Serodio June 5, 2009 @ 9:42 amThat should have been enough. I just tried the same process and it worked. Began by clicking New, named the Scheme, opened the ksf in Komodo, changed all the ‘ and ’ characters to a single quote character ‘, saved the changes, and then restarted Komodo.
Comment by jlhumber June 5, 2009 @ 6:03 pmThanks for the tip, the problem were the ´ and ` characters
Comment by Daniel Serodio June 10, 2009 @ 3:18 pm