vi-sql logo

Keybindings

By default vi-sql uses the normal keybinding profile: arrow-key navigation and familiar terminal shortcuts. Switch to vim in the options page, or set ui.vimMode in your config.yaml:

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

Prefer vim? See the Vim Mode page for hjkl navigation and sequence motions.

KeyAction
Move up
Move down
Move left
Move right
Ctrl+HomeGo to first item
Ctrl+EndGo to last item
Alt+↑Focus panel up
Alt+↓Focus panel down
Alt+←Focus panel left
Alt+→Focus panel right

Common actions

KeyAction
Ctrl+dDelete
cCopy
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
Ctrl+SpaceActions palette
Ctrl+gGo to table
Alt+vGo to view
Ctrl+tNew tab
Ctrl+xClose tab
F2Rename tab
|Hide / show schema panel
Alt+sServer info
Alt+iImport CSV
Ctrl+/Focus 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
cCopy cell
CCopy row
Alt+jCopy row as JSON
Alt+cCopy row as CSV
VMulti-select
EscClear selection
sToggle sort bar
SSort by column
HHide column
rReset hidden columns
Alt+eExplain query
Alt+mExport data
Ctrl+bFollow foreign key
Alt+rFind 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
Ctrl+fFormat SQL
Autocomplete: next
Autocomplete: previous
EnterAutocomplete: accept

Customizing keybindings

Edit keybindings-normal.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.