Hacker News new | past | comments | ask | show | jobs | submit login
Python and vim: Two great tastes that go great together (tummy.com)
45 points by mace on May 10, 2010 | hide | past | favorite | 11 comments



I've recently spent a little time working on a Python-based GPG module for Vim, and I have to say the Python <-> Vim interface is... clunky. You do get a very basic object for navigating the current structure of open tabs, panes and buffers, but when it comes to interacting with Vim, the Python code is literally reduced to pushing keystrokes at it. Whatever the user would type at the keyboard, you have to put into a string and send - with no assistance for proper quoting or anything.

Given that "add integration with Python instead of inventing more Vim script" has been near the top of the feature-vote results for quite a while, I hope the situation will get better soon:

http://vim.sourceforge.net/sponsor/vote_results.php


Wow, this is great stuff! As always with slides online, I wish I could get a transcript or even better a recording of the original presentation!

I'm currently trying to switch to vim for all my editing, this certainly opens up a few doors to further customization.


Try toggling the Javascript off. All the text is there in one page. As a side note, I love this presentation script.


This is Eric Meyer's S5: http://meyerweb.com/eric/tools/s5/


This presentation was given at PyCon 2007. There doesn't seem to be a recording of it online, however.


Trying to install vim-python on Ubuntu 10.04 generates this message:

    Package vim-python is a virtual package provided by:
      vim-nox 2:7.2.330-1ubuntu3
      vim-gtk 2:7.2.330-1ubuntu3
      vim-gnome 2:7.2.330-1ubuntu3
    You should explicitly select one to install.
    E: Package vim-python has no installation candidate
Any suggestions?


If you're using standard GNOME-based Ubuntu (not Kubuntu or Xubuntu), then you probably want vim-gnome.


This means that you need to install vim itself first, but there are three packages for vim. Use vim-nox if you don't care about the GUI. It does what it says: just installs vim, without gvim running on X. Then you can install vim-python.


Cute idea, vim script is... unintuitive, and reminiscent of bash.

But, similar to Javascript in a browser, half the battle is knowing the environment (ie vim's internals, analogous to DOM for js).


Presentation seems to be ancient and the Python code is fugly with camelCased identifiers. :-/


fyi, title is cut off on first slide, if you're the original author. (ff 3.6 os x 1920x1200)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: