Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Whenever I am using a program other than vim I feel clumsy.

Plugins for Eclipse, Chrome and so on will only bring you so far. The other way around, namely turning vim into a multipurpose IDE does not satisfy my needs. One needs to admit that some features (refactoring support in Eclipse for example) cannot be matched by the available vim plugins. I know there are other solutions, like eclim, but I am looking for something more universal (think of using vim bindings in your email client).

This is why I have been thinking about implementing a vim emulation layer recently, so that every program can profit from vim keybindings. Basically this would be implemented as some form of keygrabber that would translate vim specific commands into regular ones.

Does anyone know of related pre-existing projects one could use as a reference. A quick google search did not deliver any results for me.



You didn't specify an operating system, but for OS X there's KeyRemap4MacBook[1]. Among a zillion other things, it has a setting for "Ubiquitous Vim Bindings" which enables vi-like bindings everywhere, except in terminals, emacs, and vi itself. And some things like password dialog boxes default to insert mode.

I'm not a vi person myself so I can't comment on how effective it is, but I do use KeyRemap4MacBook to enable certain system-wide emacs/readline-like keybindings that are missing (C-w for backward-kill-word, C-m for return) and some ergonomic tweaks (Return key mapped to Control when held down, because I don't have a right-hand Control key on my keyboard).

[1] http://pqrs.org/macosx/keyremap4macbook/


I am using Linux right now.

I realize that the process of intercepting keystrokes is really OS specific. On windows you need to use hooks, on linux you need to deal with x.

Anyhow, thanks for the link. Since it is open source, I will look into it.


Is there a big reason an IDE couldn't have a child editor process running inside the UI, and operate directly on the file? That would allow you to plug the editor if your choice into the IDE.


This is actually possible in Eclipse. But I would prefer more upstream solution.


Specifically for Eclipse: http://vrapper.sourceforge.net/home/

It gives you modal editing, all the basic vi movements and commands, and still lets you use all the power of Eclipse's standard editor features.


I'm not sure if this still works, but I'll be trying it a bit later today. (and I am guessing you're not after GTK only VIM editing)

http://vim.wikia.com/wiki/Vi_key_bindings_in_gtk



That's not what the GP meant. He meant getting Vi key bindings in any imaginable text field.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: