plugins.visual-multi.settings
The configuration options for visual-multi without the VM_
prefix.
For example, the following settings are equivialent to these :setglobal
commands:
foo_bar = 1
->:setglobal VM_foo_bar=1
hello = "world"
->:setglobal VM_hello="world"
some_toggle = true
->:setglobal VM_some_toggle
other_toggle = false
->:setglobal noVM_other_toggle
Type: attribute set of anything
Default:
{ }
Example:
{
default_mappings = 1;
maps = {
"Add Cursor Down" = "<M-Down>";
"Add Cursor Up" = "<M-Up>";
"Mouse Cursor" = "<M-LeftMouse>";
"Mouse Word" = "<M-RightMouse>";
"Select All" = "<C-M-n>";
};
mouse_mappings = 1;
show_warnings = 1;
silent_exit = 0;
}
Declared by:
plugins.visual-multi.settings.add_cursor_at_pos_no_mappings
When starting VM by adding a single cursor at position, don’t enable buffer mappings, so that you can keep moving freely the cursor to add more cursors elsewhere.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 0
Declared by:
plugins.visual-multi.settings.case_setting
Starting case matching for patterns. Can be switched inside VM. Leave empty to use your current setting.
Type: null or one of “”, “smart”, “sensitive”, “ignore” or raw lua code
Default:
null
Plugin default: ""
Declared by:
plugins.visual-multi.settings.custom_motions
To remap any standard motion (h
, j
, k
, l
, f
…) commands.
It can be useful if you use keyboard layouts other than QWERTY.
Valid motions that you can remap are:
h j k l w W b B e E ge gE , ; $ 0 ^ % \| f F t T
Type: null or (attribute set of (string or raw lua code)) or raw lua code
Default:
null
Plugin default: { }
Example:
{
h = "l";
l = "h";
}
Declared by:
plugins.visual-multi.settings.custom_noremaps
To remap any key to normal! commands.
Type: null or (attribute set of (string or raw lua code)) or raw lua code
Default:
null
Plugin default: { }
Example:
{
"<<" = "<<";
"==" = "==";
">>" = ">>";
}
Declared by:
plugins.visual-multi.settings.custom_remaps
To remap VM mappings to other VM mappings.
Type: null or (attribute set of (string or raw lua code)) or raw lua code
Default:
null
Plugin default: { }
Example:
{
"<c-p>" = "N";
"<c-s>" = "q";
}
Declared by:
plugins.visual-multi.settings.default_mappings
Default mappings are permanent
, that is, always available, and applied when Vim starts.
Buffer mappings instead are applied per-buffer, when VM is started.
Permanent mappings, except <C-n>
, can be disabled by setting this option to 0
.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 1
Declared by:
plugins.visual-multi.settings.disable_syntax_in_imode
Whether to disable syntax highlighting in insert mode.
You could want to do it for performance reasons.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 0
Declared by:
plugins.visual-multi.settings.filesize_limit
VM won’t start if buffer size is greater than this.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 0
Declared by:
plugins.visual-multi.settings.highlight_matches
Controls VM default highlighting style for patterns matched, but not selected.
Possible useful values are "underline"
and "red"
.
Otherwise an empty string if you want the normal |Search|
highlight, or a full highlight
command (help |:hi|
).
Type: null or string or raw lua code
Default:
null
Plugin default: "underline"
Example:
"hi Search ctermfg=228 cterm=underline"
Declared by:
plugins.visual-multi.settings.insert_special_keys
Some keys in insert mode can have a different behaviour, compared to vim defaults. Possible values:
"c-a"
:<C-A>
go to the beginning of the line, at indent level"c-e"
:<C-E>
go to the end of the line"c-v"
:<C-V>
paste from VM unnamed register
Type: null or (list of (string or raw lua code)) or raw lua code
Default:
null
Plugin default:
[
"c-v"
]
Declared by:
plugins.visual-multi.settings.leader
Mappings preceded by \\
are meant prefixed with |g:VM_leader|
.
Some of the permanent/visual mappings use the |g:VM_leader|
as well, and you could want to
use a different one for them.
In this case you can define the leader as an attrs.
Type: null or string or (submodule)
Default:
null
Plugin default: "\\\\"
Example:
{
buffer = "z";
default = "\\";
visual = "\\";
}
Declared by:
plugins.visual-multi.settings.live_editing
Controls how often text is updated in insert mode.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 1
Declared by:
plugins.visual-multi.settings.maps
Customize key mappings.
Type: null or (attribute set of (string or raw lua code)) or raw lua code
Default:
null
Plugin default: { }
Example:
{
"Add Cursor Down" = "<M-Down>";
"Add Cursor Up" = "<M-Up>";
"Mouse Cursor" = "<M-LeftMouse>";
"Mouse Word" = "<M-RightMouse>";
"Select All" = "<C-M-n>";
}
Declared by:
plugins.visual-multi.settings.mouse_mappings
Whether to enable mouse mappings.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 0
Declared by:
plugins.visual-multi.settings.persistent_registers
If true VM registers will be stored in the |viminfo|
.
The viminfo
option must include !
, for this to work.
Also see |:VMRegisters|
.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 0
Declared by:
plugins.visual-multi.settings.plugins_compatibilty
Used for plugins compatibility, see |vm-compatibility|
.
Type: null or (attribute set of (anything or raw lua code)) or raw lua code
Default:
null
Plugin default: { }
Declared by:
plugins.visual-multi.settings.quit_after_leaving_insert_mode
So that you don’t have to type <Esc>
twice.
If you set this to 1
, maybe you can remap Reselect Last
, so that you can quickly restart VM
with your last selection.
See |vm-quick-reference|
.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 0
Declared by:
plugins.visual-multi.settings.recursive_operations_at_cursors
When executing normal commands in cursor mode (dw
and similar), by default recursive mappings
are used, so that user text object can be used as well.
Set to 0
if you always want commands in cursor mode to be non-recursive.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 1
Declared by:
plugins.visual-multi.settings.reindent_filetypes
Autoindentation (via |indentkeys|
) is temporarily disabled in insert mode, and you have to
reindent edited lines yoursef.
For filetypes included in this list, edited lines are automatically reindented when exiting insert mode.
Type: null or (list of (string or raw lua code)) or raw lua code
Default:
null
Plugin default: [ ]
Declared by:
plugins.visual-multi.settings.reselect_first
The first region will be reselected after most commands, if set to 1
.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 0
Declared by:
plugins.visual-multi.settings.set_statusline
Enable statusline when VM is active.
- With a value of
1
, the statusline will be set once, on VM start. - With a value of
2
, the statusline will be refreshed on|CursorHold|
event. - With a value of
3
, also on|CursorMoved|
event.
Type: null or one of 1, 2, 3 or raw lua code
Default:
null
Plugin default: 2
Declared by:
plugins.visual-multi.settings.show_warnings
When entering VM and there are mapping conflicts, a warning is displayed.
Set to 0
to disable this warning.
You can still run |:VMDebug|
to see if there are conflicts.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 1
Declared by:
plugins.visual-multi.settings.silent_exit
Don’t display a message when exiting VM.
You may prefer it if you already set up statusline integration.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 0
Declared by:
plugins.visual-multi.settings.single_mode_auto_reset
If insert mode is entered while |vm-single-mode|
is enabled, it will be reset automatically
when exiting insert mode, unless this value is 0
.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 1
Declared by:
plugins.visual-multi.settings.single_mode_maps
Set to 0
to disable entirely insert mode mappings to cycle cursors in |vm-single-mode|
.
If you only want to change the default mappings, see |vm-mappings-buffer|
.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 1
Declared by:
plugins.visual-multi.settings.skip_empty_lines
When adding cursors up/down, skip empty lines.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 0
Declared by:
plugins.visual-multi.settings.skip_shorter_lines
When adding cursors up/down, skip shorter lines.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 1
Declared by:
plugins.visual-multi.settings.use_first_cursor_in_line
In insert mode, the active cursor is normally the last selected one.
Set this option to 1
to always use the first cursor in the line.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 0
Declared by:
plugins.visual-multi.settings.user_operators
Cursor mode only.
The elements of the list can be simple strings (then any text object can be accepted) or an attrs with the operator as key, and the number of characters to be typed as value.
These operators can be either vim or plugin operators, mappings are passed recursively.
Note: |vim-surround|
and |vim-abolish|
have built-in support, this isn’t needed for them
to work.
Type: null or (list of (string or attribute set of (unsigned integer, meaning >=0) or raw lua code)) or raw lua code
Default:
null
Plugin default: [ ]
Example:
[
"yd"
"cx"
{
cs = 2;
}
]
Declared by:
plugins.visual-multi.settings.verbose_commands
Set to 1
if you want command prompts to be more informative, rather than as minimal as
possible.
Type: null or (one of 0, 1) or raw lua code
Default:
null
Plugin default: 0
Declared by: