Category Archives: vim

Collaborative editing, the missing Vim feature (pentadactyl + etherpad?)

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 "u" to :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.

Adequate mobile text editing device

Ideal mobile text editing device redux

As I read the responses1 to my search for the ideal mobile text editing device, reality began to set in. The heating season is now upon us, and even used technology meeting my criteria would likely exceed my stated budget. Furthermore, I’d risk replacing my current issues with a whole new set of issues and end up with a less-than-ideal mobile text editing device.

So I have rethought the problem and have decided it would be best to work on with what I have now while I wait for this ideal device to arrive on the market.

Keyboard

While I can’t change the keyboard of the ZR-5000, with a practiced lighter touch on the keys I can, in fact, touch-type passably well. It has served me well enough to draft several blog articles so far.

Software

Although not up to the high standard set by Vim, for quick note-taking, I don’t really need a fancy editor. My thoughts flow directly through my fingers into the device with only light editing. Cut-and-paste, motion keys and delete are the bare essentials. Anything more is a frill.

Synchronization

I do have an ACTiSYS IR-200L infrared dongle for my PC. The trouble is, although this is supported in Linux using IrDA, the ZR-5000 insists on speaking ASK-IR which is not supported.

There is a Windows-only program, ZRLink, which might work. I’ll try it either on an XP system at work, (… mixed reviews out there as to whether it will work on recent Windows,) or under Wine. I can get the dialogs to display properly on Wine, but I have my doubts about whether serial emulation works. My initial tests at home under Wine indicate it doesn’t. (Could #277618 have something to do with this?)

There is a 15-pin serial connector on the device, but I have no cable for it. And there’s a PCMCIA slot, but compatible devices are likely limited to older, harder-to-find components: either a 2M CF card or a modem card. While I have the latter, it exceeds the power available from batteries and I have no DC adaptor for the unit.

Perhaps I overrate synchronization anyway. My best articles are rewritten from scratch more than once.

Summary

Living in an embarrassingly technology-rich country, it is too easy for a geek like me to convince himself that his gadget cravings are needs whereas, in fact, there is still plenty of life left in the devices he already has. After all, my venerable ZR-5000 was given to me by a fellow who figured if any one of his friends would still be able to use it for something, it would be me. Well, I won’t let him down. I’ll stick with it and make it work.

There is one virtue of this device I doubt if any modern device of the same form factor can match. After a week of daily use, I still haven’t had to change the 2 ordinary AA NiMH batteries. Top that.

1 Thanks, everyone, for your responses. Although there were the inevitable few that mentioned modern devices way over my budget, and I’ve decided now to stick with the ZR-5000, your suggestions did help me bring the real issues into focus.

Ideal mobile text-editing device

Dear Lazyweb,

I’m looking for a small, (easily fits on my lap on the cramped seat of a bus,) inexpensive, (around $100 CAD,) mobile text-editing device with a 90%-sized keyboard and decent battery life that runs an open source OS and Vim, and that I can sync to my desktop system.

My first mobile device was a NEC PC-8201A, circa 1984. It ran on 4 AA NiCad batteries which I hardly needed to change more than once a week. At the time, it was my ideal mobile notetaking device. Its near-full-sized keyboard, Wordstar-compatible text editor, terminal program and serial interface allowed me to take notes which I would sync to my father’s Mac at home or to the VAX at the university.

Today, my mobile computing needs have hardly changed: text editing is almost all I do. I don’t ask for much of a display, but as an 80 to 90 wpm touch-typist, I won’t settle for anything less than a near-full-sized keyboard. I’d prefer a system that runs Debian, and Vim is a must. Some means of easily synchronizing the device with my home system is necessary: PCMCIA wireless-B would be ideal, but is not a must-have.

At the moment, I’m using an old Zaurus (not Linux-compatible) ZR-5000 which has good battery life but a very cramped keyboard, poor software, and no functional means of synchronizing the device to my PC. OK for jotting down quick notes, but frankly, I’d rather have my PC-8201A back again. I could at least type on it and sync it across the serial cable.

I took a brief look at various Psion models, but they appear to be near-impossible to find. The HP Jornada 720 looks intriguing. And the NEC Mobilepro 780
appears to be another possibility. Have I overlooked anything?

So, suggestions please.