$ cnpm install readline-vim
Adds vim bindings to nodejs readline.
npm install readline-vim
Repl Example:
var rlv = require('readline-vim');
var repl = require('repl');
var r = repl.start();
// pass the readline component of the repl in order to add vim bindings to it
rlv(r.rli);
Table of Contents generated with DocToc
A subset of vim keybindings is supported by readline-vim
:
Esc
, Ctrl-[
: normal modei
, I
, a
, A
: insert mode with the usual side effectsh
cursor leftl
cursor rightw
word rightb
word left0
beginning of line$
end of linecb
: change word leftcw
: change word rightcc
, C
change linedb
: delete word leftdw
: delete word rightdd
, D
delete linex
delete rightX
delete leftk
go back in historyj
go forward in historyCopyright 2014 - 2016 © taobao.org |