plugins.better-escape.settings
Options provided to the require('better_escape').setup
function.
Type: attribute set of anything
Default:
{ }
Example:
{
mapping = {
i = {
" " = {
"<tab>" = {
__raw = ''
function()
-- Defer execution to avoid side-effects
vim.defer_fn(function()
-- set undo point
vim.o.ul = vim.o.ul
require("luasnip").expand_or_jump()
end, 1)
end
'';
};
};
};
};
timeout = "vim.o.timeoutlen";
}
Declared by:
plugins.better-escape.settings.default_mappings
Whether to enable default key mappings.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.better-escape.settings.mappings
Define mappings for each mode.
Type: null or (attribute set of (anything or raw lua code))
Default:
null
Plugin default:
{
c = {
j = {
j = "<Esc>";
k = "<Esc>";
};
};
i = {
j = {
j = "<Esc>";
k = "<Esc>";
};
};
s = {
j = {
k = "<Esc>";
};
};
t = {
j = {
j = "<Esc>";
k = "<Esc>";
};
};
v = {
j = {
k = "<Esc>";
};
};
}
Example:
{
i = {
" " = {
"<tab>" = {
__raw = ''
function()
-- Defer execution to avoid side-effects
vim.defer_fn(function()
-- set undo point
vim.o.ul = vim.o.ul
require("luasnip").expand_or_jump()
end, 1)
end
'';
};
};
};
}
Declared by:
plugins.better-escape.settings.timeout
The time in which the keys must be hit in ms.
Uses the value of vim.o.timeoutlen
(options.timeoutlen
in nixvim) by default.
Type: null or lua code string or (unsigned integer, meaning >=0)
Default:
null
Plugin default: "vim.o.timeoutlen"
Declared by: