Re:Snake: Full Python Scripting in Vim
by zefei on Sunday May 17, 2015 @08:32PM
(#9562341)
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.
Re:Snake: Full Python Scripting in Vim
by ludamad on Sunday May 17, 2015 @08:10PM
(#9562296)
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.
Re:Snake: Full Python Scripting in Vim
by egwynn on Sunday May 17, 2015 @07:55PM
(#9562253)
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.
Re:Snake: Full Python Scripting in Vim
by emidln on Sunday May 17, 2015 @10:39PM
(#9562660)
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.
Re:Snake: Full Python Scripting in Vim
by coley on Sunday May 17, 2015 @08:37PM
(#9562358)
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.
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.
Not to mention I'm a huge Metal Gear fan. =]
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
[Edit]: Grammar