Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to be able to use vi keybindings in the Chrome JavaScript console (cmd-opt-J in OS X, ctrl-shift-J elsewhere, I think). Basically, I want to be able to hop around and edit like I do in vim.

I use vi keybindings all over the terminal, such as irb, bash, python, mysql, sqlite3, etc. and I find them great for quick interactive development. (All those programs use GNU readline, so they respect my ~/.inputrc.) Currently, Chrome is one of the few places I can code but not use vi keybindings.

Any extensions or settings I can use for this?

share|improve this question
Do you want this for OS X or Linux? – Daniel Beck Feb 1 '11 at 16:22
OS X, in my case. – Benjamin Oakes Feb 1 '11 at 16:23
I might even be happy if node used GNU readline... but it doesn't. :( – Benjamin Oakes Feb 1 '11 at 16:24

Vi Input Manager can do this for all Cocoa applications. I've used it a few years ago. I don't know if it works on Snow Leopard though (if you're using SL, you didn't say) unfortunately.

Alternatively, you can experiment using the Cocoa Key Bindings system. There's a vi-line key bindings file that you could try to use.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .