
Snake: Full Python Scripting in Vim - daenz
https://github.com/amoffat/snake
======
zefei
Nice work! The pip/virtualenv loader is really great, and can make the plugin
dev more purely focused on the plugin. I think this part can be a great
standalone project.

But I don't know about the boilerplate functions, some of them feel useful
(like output capturing, state preserving), while others are just shallow
abstractions over the vim API, which is almost never good. Abstraction over
API is only useful when it provides different and better semantics, like
jQuery over DOM.

------
vladharbuz
This looks great! I know vimscript is painful, and even though I'm not sure
how easy the existing Python solutions are, this seems like a breeze.

------
cschmidt
Isn't this also one of the goals of NeoVim? That you can script from any
language.

~~~
ludamad
Sure, and you can in Vim for the most part too. Snake has some excellent ideas
how to use idiomatic Python, however, which would likely rest upon a more low
level exposure of NeoVim anyway.

------
adamors
How does this differ from the Python support Vim already has?

~~~
egwynn
It looks to me like boilerplate that allows you to more easily interface
between the python world and the vim world. So instead of putting a bunch of
python in your _~ /.vimrc_, you would install this plugin, and then put your
relevant python in your _~ /.vimrc.py_.

~~~
emidln
Adding to this answer, it looks like this will handle virtualenvs requested
for dependencies as well (albeit not completely yet). This is a pretty big
deal in order for almost anything non-trivial since libraries like requests
quickly come into play.

------
nichochar
This is so cool, thanks! I wonder what the limitations are?

~~~
nomel
Your imagination. :D

~~~
raverbashing
So, Emacs running in a lisp interpreter running in python inside vim?

------
coley
I'm looking forward to playing around with this. Vim is my editor of choice,
and it would be nice to configure/extend it in something other than vimscript.
Gives me a good reason to familiarize myself with Python as well.

Not to mention I'm a huge Metal Gear fan. =]

------
weavie
Isn't this actually " _Vim_ scripting in _Python_ "?

~~~
Stratoscope
English is a very flexible and versatile language. The word "in" may be used
in either of those senses, among many others.

Dictionary.com lists examples of both meanings:

1\. (used to indicate inclusion within space, a place, or limits): walking in
the park.

5\. (used to indicate means): sketched in ink; spoken in French.

[http://dictionary.reference.com/browse/in](http://dictionary.reference.com/browse/in)

------
erikb
I never wrote Vimscript or Python plugins for vim. What's the difference
between snake and vim's normal python plugins?

------
fideloper
Currently feeling very deep nastalgia for Metal Gear

~~~
neotrinity
True that! When I first saw the starting credits of MGS i was like
...whoooaaaa !

------
afarrell
Is there some way I can pop into pdb when doing this? That would solve the
biggest problem I have when writing vim scripts.

------
jamescampbell
This might finally get me to switch from Sublime Text 3 to VIM. Been looking
for an excuse to make the jump anyway.

------
Yuioup
There are no pathogen instructions. Can I just clone it into bundle directory?
Will this work?

[Edit]: Grammar

------
UserRights
BTW what are your tips for programming python with vim?

