Click here to Skip to main content
15,889,216 members
Articles / Programming Languages / Javascript
Tip/Trick

vim.js

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
10 Sep 2015MIT1 min read 9.1K   4   2
Simple vim for textarea and input

Introduction

This is simple vim for web textarea and input field to improve writing experience on the web. It is like writing with vim users with smooth writing experience and efficient web-side without the need to install any browser plug-ins.

Note

  • This project is not to replace powerful IDEs on web pages, but rather as a web side writing (such as blogging, writing notes, etc.) of enhancements.
  • This project is under development, there will be some improvements and new features.
  • Please use the vim instructions in the English input method.

Image 1

Features

1. General Mode

Command Description
Esc Switch to general mode
u Returned to the previous operation, support multiple text field
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] Delete n characters
yy Copy current line
nyy Copy n lines
dd Delete current line
ndd Delete n lines
p,P p paste after,P paste before

2. Edit Mode

Command Description
i Insert
a Append
o Open line below and enter edit mode
O Open line after and enter edit mode
r Replace one character

3. Visual Mode

Command Description
v or V Switch ot visual mode
y Copy the selected text
x or d Delete the selected text

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Hong Kong Hong Kong
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Question5 from me but why? Pin
gstolarov10-Sep-15 11:00
gstolarov10-Sep-15 11:00 
AnswerRe: 5 from me but why? Pin
Nikola Breznjak11-Sep-15 1:21
professionalNikola Breznjak11-Sep-15 1:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.