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?

  • 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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.