vx0
Vim-inspired visual editor for JSX element trees
npm i -g vx0
vx0 hello.jsx
Modes
Vx0 uses several different modes for editing element trees.
- normal (cyan)
- visual (magenta)
- insert (yellow)
- edit props (blue)
Keyboard shortcuts
Keyboard shortcuts work differently depending on mode. The current mode will be indicated by the color of the command bar at the bottom and the color of the outline cursor around the current element.
Normal mode
j
: move cursor downk
: move cursor upspace
: enter visual modei
: enter insert modee
: enter edit props modeesc
: exit to normal modey
: yankd
: deletep
: paste afterP
: paste beforeu
: undoctrl+r
: redoa
: add componente
: edit propsc
: edit color propb
: edit background-color propf
: edit font-size prop
Visual mode
Visual mode currently allows elements to be moved up and down.
j
: shift element downk
: shift element up
Insert mode
Insert mode allows for editing text content. To commit changes, press the esc
key.
Edit props mode
Invoking edit props mode will focus the command bar at the bottom.
First, type the prop name to edit and press return
.
Then, type in a value to set the prop and press return
.