vi-sql logo

Vim Mode

Vim mode is one of vi-sql's two keybinding profiles. It uses hjkl navigation, sequence motions like gg, and vim-style copy/delete. Enable it in the options page, or set ui.vimMode in your config.yaml:

yaml
ui:
  vimMode: true # true = vim, false = normal
tip

Not a vim user? See the Keybindings page for the default key map.

KeyAction
kMove up
jMove down
hMove left
lMove right
ggGo to first item
GGo to last item
Ctrl+kFocus panel up
Ctrl+jFocus panel down
Ctrl+hFocus panel left
Ctrl+lFocus panel right

Common actions

KeyAction
ddDelete
yyCopy
Ctrl+vPaste
Ctrl+sConfirm
/Filter
Ctrl+rRefresh
Enter / SpaceSelect
aAdd
eEdit
Ctrl+uClear input
EscClose / cancel

Global

KeyAction
Ctrl+cQuit
F1Full-screen help
Ctrl+oOpen connection dialog
Alt+tChange theme
Alt+fExpand / collapse footer

Main view

KeyAction
:Actions palette
gtGo to table
gvGo to view
Ctrl+tNew tab
Ctrl+xClose tab
F2Rename tab
|Hide / show schema panel
Alt+sServer info
Alt+iImport CSV
geFocus schema tree

Schema tree

KeyAction
eExpand table
EExpand all
WCollapse all
sOpen structure
iOpen indexes
RRename table

Data view

KeyAction
o / EnterPeek row
OFull-page peek
EEdit row
DDuplicate row
ycCopy cell
yyCopy row
yrjCopy row as JSON
yrcCopy row as CSV
VMulti-select
EscClear selection
sToggle sort bar
SSort by column
HHide column
rReset hidden columns
Alt+eExplain query
Alt+mExport data
gdFollow foreign key
grFind references

Row viewer (peeker)

KeyAction
EnterExpand field
vOpen value viewer
fToggle full screen
CCopy highlighted text

Structure view

KeyAction
RRename column
pToggle DDL pane

Explain viewer

KeyAction
tToggle ANALYZE mode

History

KeyAction
cCopy query
Alt+dPurge history

Index form

KeyAction
Ctrl+eToggle SQL editor
Ctrl+aAdd column

SQL editor

KeyAction
Alt+zToggle fullscreen editor
Alt+rQuery history
Ctrl+eOpen query in $EDITOR
gfFormat SQL
Ctrl+n / Autocomplete: next
Ctrl+p / Autocomplete: previous
Ctrl+y / EnterAutocomplete: accept

Customizing keybindings

Edit keybindings-vim.yaml in your config directory (run vi-sql --paths to find it) to remap any action. The file is created with defaults on first launch.