Add Vim functionality to textarea
JavaScript CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo
tests
.gitignore
README.md
jsvim.js

README.md

vim-in-textarea

Add a subset of VIM functionality to textarea. Check online jsfiddle demo here.

Implemented as a single module in JavaScript, no jQuery needed. By default, it does not log anything (i.e., if it is in command or insert mode), neither it alters textarea look or style.

You can install an experimental extension that will attach vim script to all textarea elements.

It is still in development, and it was tested with a few selected browsers/OS configurations.

Features

  • single JS file
  • no external dependencies (e.g, jQuery)
  • supported visual mode v
  • yank y, delete d, paste p
  • preserve indention on Enter
  • indent paragraphs, e.g. >ap
  • delete / yank words and brackets (daw, diw, ca[, ...)
  • undo u
  • repeat commands, e.g. 5dd
  • ...and more!

Licensing and author

This work is released under BSD 3-Clause License licence. If you use the script, let me know! I am happy to hear your feedback and see the script working in the wild.

Author: Jakub Mikians, see his profile on LinkedIn.

Contact: jakub dot mikians at gmail dot com