6 ms·
Snake: Full Python Scripting in Vim
- vladharbuz 11y agoThis 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.
- adamors 11y agoHow does this differ from the Python support Vim already has?
- egwynn 11y agoIt 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 11y agoAdding 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.
- cschmidt 11y agoIsn't this also one of the goals of NeoVim? That you can script from any language.
- ludamad 11y agoSure, 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.
- zefei 11y agoNice 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.
- coley 11y agoI'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. =]
- nichochar 11y agoThis is so cool, thanks! I wonder what the limitations are?
- nomel 11y agoYour imagination. :D
- raverbashing 11y agoSo, Emacs running in a lisp interpreter running in python inside vim?
- fideloper 11y agoCurrently feeling very deep nastalgia for Metal Gear
- neotrinity 11y agoTrue that! When I first saw the starting credits of MGS i was like ...whoooaaaa !
- jamescampbell 11y agoThis might finally get me to switch from Sublime Text 3 to VIM. Been looking for an excuse to make the jump anyway.
- erikb 11y agoI never wrote Vimscript or Python plugins for vim. What's the difference between snake and vim's normal python plugins?
- weavie 11y agoIsn't this actually "Vim scripting in Python"?
- Stratoscope 11y agoEnglish 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
- UserRights 11y agoBTW what are your tips for programming python with vim?
- Yuioup 11y agoThere are no pathogen instructions. Can I just clone it into bundle directory? Will this work? [Edit]: Grammar
- afarrell 11y agoIs there some way I can pop into pdb when doing this? That would solve the biggest problem I have when writing vim scripts.