Simple and lightweight Vim for webtextarea
andinput
field, to improve writing experience on web.
Demo here
Note:
This project is not to replace powerful IDEs on web pages,but rather as a web side writing(such as blogging, writing notes, ect.) of enhancements.
This project is in development, there will be some improvements and new features.
Please use the vim instructions in the English input method.

中文文档
Thevim.min.js
only 19kb, and no any dependencies.
<scriptsrc="/path/to/vim.js"></script><scripttype="text/javascript">vim.open({debug :true,showMsg :function(msg){alert('vim.js say:'+msg);}});</script>
//installnpm install vim.js//watchnpm run dev//buildnpm run build//build min js filenpm run build_min
- Chrome v39
- Firefox v34, v40
- Safari
Note: Whether to support other browsers still unknown
Command | Description |
---|
Esc | switch to general mode |
u | returned to the previous operation |
Move the cursor : | |
h or ← | move left one character |
j or ↓ | move down one line |
k or ↑ | move up one line |
l or → | move right one character |
supported nh,nj,nk,nl | |
0 or [HOME] | move to head of line |
$ or [End] | move to end of line |
G | go to end |
gg | go to first line |
delete, copy and paste: | |
x or [Delete] | delete single character |
nx or n[Delete] | deleten characters |
yy | copy current line |
nyy | copyn lines |
dd | delete current line |
ndd | deleten lines |
p,P | p paste after,P paste before |
w or W | move to next word |
supported nw and nW | |
yw | copy one word |
nyw | copyn words |
dw | delete one word |
ndw | deleten words |
Command | Description |
---|
i | insert |
I | insert line head |
a | append |
A | append line tail |
o | open line below and enter edit mode |
O | open line after and enter edit mode |
r | replace one character |
Command | Description |
---|
v or V | switch ot visual mode |
y | copy the selected text |
x or d | delete the selected text |