Vim, Part I: Improved Python syntax, Blackboard color scheme
Every few months, I notice that TextMate exists and try to use it; inevitably, the requirement that I use arrow keys defeats the endeavor. It has a few features, however, that I like, most of which I've ported to vim, my primary text editor. These features are too numerous for a single post, so I'll highlight them in a series. First up: An improved Python syntax definition and my favorite color scheme.Python Syntax
The most popular Python syntax highlighting script is pretty complete, but it's missing a few things (Update: several of the improvements I made a year ago have been added to Dmitry Vasiliev's script, such as decorators, doctests, imports, etc. I've merged the two, so this is slightly less special than before). Specifically: docstrings, self, arguments/base classes, assignment as distinct from other operators, and a few other little things. TextMate had these, so I ported them, and the results were pretty good.
Download the improved syntax file and drop it into ~/.vim/syntax.Blackboard Color Scheme
TextMate had a color scheme that I loved: Blackboard. The colors were primaryish without being irritatingly bright or clashing; keywords, builtins, and class definitions were given appropriate prominence. I ported it to Vim. Here's what it looks like:
That example doesn't include a doctest, but they are highlighted separately in the same color as builtins.
Download the color scheme and drop it into ~/.vim/colors, then do :colorscheme blackboard to see the results. Pretty easy on the eyes, no?
Next in my Vim series: automatic handling of pair completion (and deletion).
July 4, 2009 10:10 AM
Nice post. Looking forward to the next in the series. I just switched from TextMate to Vim and I love it.
July 5, 2009 2:04 AM
Nice post. But what I most enjoyed was learning the meaning of the word Concinnity. Thank you.
:-)
July 6, 2009 12:33 PM
That's a really nice colorscheme. Thanks for sharing it.
July 10, 2009 7:05 AM
Thanks! I've been wanting to get "self" highlighted forever, but never bothered to learn how.
July 10, 2009 5:21 PM
I've ported your theme to the "original" ViM, maybe your interested in it, so here is the url
July 21, 2009 6:23 PM
What's that font you're using in your console? Looks pretty for coding.
July 21, 2009 6:24 PM
What's that font you used for your Blackboard screenshot? Looks pretty for coding.
August 21, 2009 7:32 PM
The little improvements in the syntax highlighting really do make a difference and I thank you for your work on this. Haven such a good looking colorscheme as a bonus... priceless.
Thanks.
October 6, 2009 10:38 PM
I love the blackboard theme! Nice article btw..