> Writing Vim Plugins in Python

A nice quick introduction to writing Vim plugins in Python.

Worth the read if only for the awesome gems of prose1 like this:

You see, the ancient legend says that before the universe was compiled, the creator deity pondered for a spell, and then on the first day said Let there be parentheses! and he saw they were good. Then on the second day he said Let code be data and data be code and there was much rejoicing. Then on the third day he hacked up a meta-programming macro, and fucked off for the rest of the week as the universe generated itself. Then, millions of years later man invented haskell and was like “What now god?” and god was like “Shiiiiieeet, son!” because in his omnipotence he saw it was also pretty fucking awesome, though mostly in an incomparable to lisp in an apples to barnacles kind of way.

and this:

How do you know if your Vim can handle Python code? Well, it is easy:

  • If you are outside of Vim you just run vim –version and look for +python which indicates you’ve got it or -python which indicates that whomever compiled your vim package is a major douchenozzle.

  • If you are inside of Vim you can just issue the :py 1 command. If nothing happens, you are good. If you get an error message complaining that py is not an editor command, then... Douchenozzle.

The version of Vim Apple includes with Mountain Lion does appear to have Python support compiled in, if you're wondering.


  1. No sarcasm, they cracked me up. 

Share on App.net

Comments !

++useful

elsewhere