News for hackers. Stuff that matters.
Re:Why, oh why, do those nutheads use vi? by Riesling on Thursday February 02, 2012 @10:26AM (#3543011)
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.

Re:Why, oh why, do those nutheads use vi? by drothlis on Thursday February 02, 2012 @11:05AM (#3543194)
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/

Re:Why, oh why, do those nutheads use vi? by Riesling on Thursday February 02, 2012 @11:17AM (#3543263)
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.

Re:Why, oh why, do those nutheads use vi? by sliverstorm on Thursday February 02, 2012 @03:36PM (#3544319)
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.
Re:Why, oh why, do those nutheads use vi? by Riesling on Thursday February 02, 2012 @04:28PM (#3544576)
This is actually possible in Eclipse. But I would prefer more upstream solution.
Re:Why, oh why, do those nutheads use vi? by nuclear_eclipse on Thursday February 02, 2012 @05:39PM (#3544844)
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.

Re:Why, oh why, do those nutheads use vi? by phlyingpenguin on Thursday February 02, 2012 @10:52AM (#3543128)
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

Re:Why, oh why, do those nutheads use vi? by Shanewho on Thursday February 02, 2012 @10:30AM (#3543028)
Re:Why, oh why, do those nutheads use vi? by skrebbel on Thursday February 02, 2012 @10:37AM (#3543060)
That's not what the GP meant. He meant getting Vi key bindings in any imaginable text field.