Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to make the interactive Node.js shell use vi mode?

This is a minor inconvenience, but since nobody seems to have asked it, here it is:

With Python, I can place set editing-mode vi in ~/.inputrc and then the Python and iPython interactive shells will use vi mode. Is it possible to do something similar with Node.js?

like image 829
Sahand Avatar asked Feb 03 '26 04:02

Sahand


1 Answers

You can use rlwrap, but it comes at a price - you will loose native node TAB completion (you can find details here: Can rlwrap use a wrapped command's own TAB completion?):

rlwrap -a -- node
like image 142
paluh Avatar answered Feb 04 '26 16:02

paluh