Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

✌️simple vim for textarea and input

NotificationsYou must be signed in to change notification settings

toplan/Vim.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

demo gif

中文文档

Usage

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>

Building

//installnpm install vim.js//watchnpm run dev//buildnpm run build//build min js filenpm run build_min

Browser support

  • Chrome v39
  • Firefox v34, v40
  • Safari

Note: Whether to support other browsers still unknown

Features

1. general mode

CommandDescription
Escswitch to general mode
ureturned 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
Ggo to end
gggo to first line
delete, copy and paste:
x or [Delete]delete single character
nx or n[Delete]deleten characters
yycopy current line
nyycopyn lines
dddelete current line
ndddeleten lines
p,Pp paste after,P paste before
w or Wmove to next word
supported nw and nW
ywcopy one word
nywcopyn words
dwdelete one word
ndwdeleten words

2. edit mode

CommandDescription
iinsert
Iinsert line head
aappend
Aappend line tail
oopen line below and enter edit mode
Oopen line after and enter edit mode
rreplace one character

3. visual mode

CommandDescription
v or Vswitch ot visual mode
ycopy the selected text
x or ddelete the selected text

About

✌️simple vim for textarea and input

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp