plugins.multicursors.normalKeys
Normal mode key mappings.
Default: see the README.md
Example:
{
# to change default lhs of key mapping, change the key
"," = {
# assigning `null` to method exits from multi cursor mode
# assigning `false` to method removes the binding
method = "require 'multicursors.normal_mode'.clear_others";
# you can pass :map-arguments here
opts = { desc = "Clear others"; };
};
"<C-/>" = {
method = \'\'
function()
require('multicursors.utils').call_on_selections(
function(selection)
vim.api.nvim_win_set_cursor(0, { selection.row + 1, selection.col + 1 })
local line_count = selection.end_row - selection.row + 1
vim.cmd('normal ' .. line_count .. 'gcc')
end
)
end
\'\';
opts = { desc = "comment selections"; };
};
}
Type: null or (attribute set of (submodule))
Default:
null
Declared by:
plugins.multicursors.normalKeys.<name>.method
Assigning "nil"
exits from multi cursor mode.
Assigning false
removes the binding
Type: string or value false (singular enum)
Example:
''
function()
require('multicursors.utils').call_on_selections(
function(selection)
vim.api.nvim_win_set_cursor(0, { selection.row + 1, selection.col + 1 })
local line_count = selection.end_row - selection.row + 1
vim.cmd('normal ' .. line_count .. 'gcc')
end
)
end
''
Declared by:
plugins.multicursors.normalKeys.<name>.opts
You can pass :map-arguments
here.
Type: attribute set of string
Default:
{ }
Example:
{
desc = "comment selections";
}
Declared by: