vi-sql has two keybinding profiles: vim (default) and normal. Vim mode uses hjkl navigation, sequence motions like gg, and vim-style copy/delete. Normal mode uses arrow keys and familiar terminal shortcuts.
Switch profiles by setting ui.vimMode in ~/.config/vi-sql/config.yaml:
yaml
ui: vimMode: true # true = vim, false = normal
tip
Currently only 2-key sequences are supported in vim mode (e.g. gg, dd). Longer sequences are on the roadmap.
Navigation
Action
Vim mode
Normal mode
Move up
k
↑
Move down
j
↓
Move left
h
←
Move right
l
→
Go to first item
gg
Ctrl+Home
Go to last item
G
Ctrl+End
Focus panel up
Ctrl+k
Alt+↑
Focus panel down
Ctrl+j
Alt+↓
Focus panel left
Ctrl+h
Alt+←
Focus panel right
Ctrl+l
Alt+→
Common actions
Action
Vim mode
Normal mode
Delete
dd
Ctrl+d
Copy
yy
c
Paste
Ctrl+v
Ctrl+v
Confirm
Ctrl+s
Ctrl+Enter
Filter
/
/
Refresh
Ctrl+r
Ctrl+r
Close / cancel
Esc
Esc
Global
Key
Action
Ctrl+c
Quit
F1
Full-screen help
Ctrl+o
Open connection dialog
Alt+t
Change theme
Alt+f
Expand / collapse footer
Main view
Key
Action
: (vim) / Ctrl+Space (normal)
Actions palette
gt (vim) / Ctrl+g (normal)
Go to table
Ctrl+t
New tab
Ctrl+x
Close tab
F2
Rename tab
|
Hide / show schema panel
Alt+s
Server info
Alt+i
Import CSV
ge (vim) / Ctrl+/ (normal)
Focus schema tree
Schema tree
Key
Action
e
Expand table
E
Expand all
W
Collapse all
s
Open structure
i
Open indexes
R
Rename table
Data view
Key
Action
Key
Action
-----
--------
o / Enter
Peek row
O
Full-page peek
E
Edit row
D
Duplicate row
yc (vim) / c (normal)
Copy cell
yy (vim) / C (normal)
Copy row
V
Multi-select
Esc
Clear selection
s
Toggle sort bar
S
Sort by column
H
Hide column
r
Reset hidden columns
Alt+e
Explain query
Alt+m
Export data
gd (vim) / Ctrl+b (normal)
Follow foreign key
gr (vim) / Alt+r (normal)
Find references
Row viewer (peeker)
Key
Action
Enter
Expand field
v
Open value viewer
f
Toggle full screen
C
Copy highlighted text
Structure view
Key
Action
R
Rename column
p
Toggle DDL pane
Explain viewer
Key
Action
t
Toggle ANALYZE mode
History
Key
Action
c
Copy query
Alt+d
Purge history
Index form
Key
Action
Ctrl+e
Toggle SQL editor
Ctrl+a
Add column
SQL editor
Key
Action
Alt+z
Toggle fullscreen editor
Alt+r
Query history
Ctrl+e
Open query in $EDITOR
Customizing keybindings
Edit ~/.config/vi-sql/keybindings-vim.yaml (vim mode) or ~/.config/vi-sql/keybindings-normal.yaml (normal mode) to remap any action. Both files are created with defaults on first launch.