#customization
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 CONFIG file 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 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",
},
}
}
}