Do you wish, like I do, you could edit collaboratively in Vim? This feature is number 10 on the Vim voting page, so it seems I’m not alone. How about Pentadactyl coupled with any of the existing web-based collaborative editors, such as Etherpad? OK, so it’s not quite Vim, and there are some rough edges to this particular pairing, but I’m finding it’s good enough for my needs. It even gives me a Vim-like editing experience while other participants use the default Etherpad editor.
Yes, I know about whiteboard.debian.net, but for the past three years I have been using a single instance of Etherpad with my family to maintain a shopping list to which we all make contributions. First of all, that’s not a Debian activity, so to make the switch, I’d need to make a personal clone of the service for our personal use. But more importantly, we find Etherpad features such as colours for different participants and the timeline are just too useful to give up on. On the other hand, the less the web editor interferes with your web browser’s default textarea behaviour, the easier time Pentadactyl is going to have. Indeed, I asked on #pentadactyl @ irc.oftc.net about some problems I was having and I was told flat out that Pentadactyl does not work with graphical web editors. So, you may wish to use another web-based collaborative editor for this reason. That being said, I did learn a few things about helping Pentadactyl get along better with Etherpad, so if you would like to try it yourself, read on.
The key to getting started was to enter ‘text edit mode’ within the textarea with
<C-t>. For the most part, this behaves like Vim ‘normal mode’. I am still learning, but many basic motion and editing keys behave just as they would in Vim. Fantastic!
However, the moment I tried to
:undo I hit my first problem. Using the latest release version of Pentadactyl (1.0rc1 at time of writing), pressing
:undo produced no visible result. I tried the latest daily build as well, and only saw a marginally more helpful
"Node not found" error message displayed in the status area. But it turns out you can use ‘passthrough mode’ to use the textarea’s own undo. Just
:tmap u <C-v><C-z> and we’re back in business again.
I’m still experimenting with this setup, so the jury’s still out on whether I’ll stick with it, or whether the remaining incompatibilities between Pentadactyl and Etherpad will drive me nuts. But it looks promising. Clearly, judicious use of
:autocmd to always start in ‘text edit mode’ and bind that undo key whenever I enter the site will help make the experience even better. If you try it out yourself, I’d love to hear how things went for you. Or if you have found an even better solution that works for you, do share.