Plugins for vim-mode


I’m new to the Atom community, and I find this project very intriguing. I come from a vim background, so I installed vim-mode right away to feel more at home. However, I’m missing some of the plugins that I’m used to, and I’m wondering if there’s any plan to make it possible to extend vim-mode with other packages.

For example, I love tpope’s vim-commentary plugin, which allows me to comment and uncomment lines in files of all different languages with gcc. I would like to port this plugin over to Atom for vim-mode users, and I’m wondering if there’s any mechanism to do that besides making a PR for vim-mode itself. Since the feature isn’t found in standard vim, I would imagine that it ought to be a standalone package.


Does the built in cmd+/ solve the same problem? Or is that missing some key features?


That works perfectly for commenting, but in principle I think the question still stands. There are hundreds of vim plugins, and it would be impractical to implement all of them directly in vim-mode.

But thanks @irrationalistic, that’s exactly what I was looking for :smile:


Yeah, I totally hear you! Just wanted to give a quick solution :wink:


I guess you have to choices here: you can either port the vim plugin to Atom or write a vim plugin language interpreter in javascript to embed in Atom, and use that to load and run existing vim plugins… Either way is not exactly straightforward I think…


does vim use lisp, or is that only emacs?


Looking at the source of the plugin specified in the OP it doesn’t seem like lisp at all… I fear a DSL to be involved.


If you went to the big trouble of emulating that dsl you’d be a hero of vim users. And Atom would get a lot more users. oh well …


The nice thing is that all the specs of that dsl seem to be stored into one single page:
How nice of vim! This looks like a fun and neverending project :smile: Now I have to understand how the hell I’m supposed to use coco/r with javascript…


FWIW, coffeescript is an excellent language to run DSLs in. See atom/space-pen or in npm, teacup. And coffeescript is the native language for Atom.


space-pen looks more like an exploitation of coffeescript’s syntax than a full parser-scanner-interpreter… Anyway I found PEG.js which seems quite interesting, and also two bindings for it for native coffeescript support: and
Now I have to decide which to choose…


vim uses vimscript, which is a little nicer than Intercal.


Doesn’t the NeoVim project have a vimscript-to-Lua transpiler? Perhaps there is a Lua implementation in Javascript… But to be honest – shudder.


The only thing I would use their vimscript-to-Lua transpiler is to steal their grammar files :smiley: Really, one interpreter is slow enough… I already wrote a Lua interpreter and if you don’t want to go JIT (and advanced) you’re going to face up big bottlenecks…