SilverBullet has a basic Vim mode. You can toggle it using the ${widgets.commandButton("Editor: Toggle Vim Mode")} command.
In addition, it supports various ex commands that you can run as you would expect, for instance: :imap jj <Esc>.
The ^Library/Config page can also be used to define and extend these commands. It supports the following:
map and noremapSilverBullet Command bindings take precedence over Vim bindings, you may wish to update or disable some Keyboard Shortcuts or remap the desired functionality in Vim as shown below.
To manually reload the vim section of your ^Library/Config, use the ${widgets.commandButton("Editor: Vim: Load Vim Config")} command.
Using Space Lua:
config.set {
vim = {
unmap = {
"<Space>",
{
key = "<C-c>",
mode = "insert",
},
},
map = {
{
map = "jj",
to = "<Esc>",
mode = "insert",
},
},
noremap = {
{
map = "<",
to = "<gv",
mode = "visual",
},
{
map = "<Space>ff",
to = ":findfile<CR>",
mode = "normal",
},
{
map = "<Space>rc",
to = ":runcommand<CR>",
mode = "normal",
},
},
commands = {
{
command = "Navigate: Page Picker",
ex = "findfile",
},
{
command = "Open Command Palette",
ex = "runcommand",
},
}
}
}