views:

393

answers:

4

I love VI and I'm looking for a plugin of some sort that would allow me to input text in my browser (preferably Firefox or Chrome) using VI commands. It would save me an immense amount of time and at the same time when writing long emails. Can anyone think of any plugins that would allow me to do this? I was hopeful with Vimperator (https://addons.mozilla.org/en-US/firefox/addon/4891) but after installing it, I realized that it didn't do the one VI think I wanted to do: create or edit a text box with VI commands. It just allowed me to do Browser commands and scrolling in VI-style.

A: 

Currently the Chrome Extensions API is fairly simple; I simply don't think that there are currently enough API hooks into the browser to be able to support something like this.

You might want to check out the confusingly-named Conkeror browser (not the same as Konqueror in Linux), which is best described as the love child of VI and Firefox. It's like VI with the Gecko rendering engine (I think).

Ken Liu
+6  A: 

since you have installed Vimperator , you can try this :

se editor=”YOUR-GVIM-PATH/vim72/gvim.exe -f”

Press Ctrl + i to call gvim to deal with the text you want to edit.

calmire
+1 I have been using vimperator for a couple of years, and did not know you could do this. Cool.
Dave Kirby
I'm gonna give vimperator another try. And your post is more reasons in itself to make the install. I *miss* vim in browser text boxes.
jeffjose
Thanks calmire! I didn't have the editor set properly. Oh, and one other note, it seems that vimperator doesn't like spaces in the path. I.e. "c:/program files/vim/gvim.exe -f" won't work due to the space in "program files".
Frank
+6  A: 

I've had great luck with itsAllText firefox extension. Probably not as smooth as your dream, but it works very well in practice.

dpb
I spent five minutes looking for the link to this plugin (forgot the name), then I scroll down and you beat me too it :) +1
Seamus
Thanks, this is what I'm looking for!I tried this option as well, and it's great for allowing me to use VIM outside of the browser while leaving everything intact. I.e. it's much more seamless. Vimperator does present a faster browsing experience, but for now, I'm gonna hold off on that since I only wanted a faster text input option right now.
Frank
A: 

I've been using the Mozex extension for Firefox for years.

Once installed, on the "Textarea" tab, assign a hot-key and enter the command to run. For example:

gnome-terminal -e "/usr/bin/vim %t"

When the hot-key is pressed, Mozex will create a temporary file and replace the "%t" above with its name.

If there's more than one text area on a page it will allow you to pick which one you want to edit.

Mozex provides a lot more functionality than just text area editing. If you want to "view source" with Vim, you can do that too.

Curt Nelson