Last Updated: December 21, 2018
· benjaminrh

Turn textareas into a mini Vim or Emacs

If you use Vim or Emacs, you have probably exited windows and entered a lot of nonsense by mistake while trying to use a simple browser textarea.

Between Vimium, Vimperator, VimFx, and Pentadactyl, there are quite a number of Vim-style solutions for browsers. I haven't looked for Emacs ones because I don't use it, and don't even get me started on the ones that require you to setup a server so you can get around Chrome and launch an actual editor instance. But none of them have satisfied my itch for a simple, lightweight cross-browser solution for turning my textarea into a Vim window.

Therefore, I have taken advantage of CodeMirror's excellent Vim/Emacs keybinding support to create this extremely simple userscript that will happily turn textareas into a little mini version of your favorite editor just by double-clicking on a textarea! And when I say mini, note that the Vim part allows you to use macros. That's ridiculous!

Ladies and Gentlemen: Vim Area

There are settings (near the top of the userscript file) that let you select your favorite editor (Vim/Emacs), and a few other things.