Closed melhakim closed 1 year ago
\\<Space>
should add a single cursor, not toggle. That is Space
.g:VM_default_mappings
to 0, then map only the plugs you want.Thanks for the quick response!
According to the docs, \\<Space>
, and \\\
is what adds a single cursor (and that works as expected).
I have tried manually mapping using:
:map \\<Space> <Plug>(VM-Toggle-Mappings)
hoewever I get the error:
E716: Key not present in Dictionary: "Maps.mappings_toggle()"
when I hit \\<Space>
after that.
Looking at maps.vim, it seems that this function is supposed to do exactly that.
To elaborate on my issue, I don't want VM to map <S-Left>
and <S-Right>
, because I use them for their default motion. For now, I have disabled them using VM_maps
. However that disables Select h
and Select l
during extended mode.
According to the docs, \
, and \\ is what adds a single cursor (and that works as expected).
Yes I forgot.
I have tried manually mapping using:
You should use the g:VM_maps
dictionary. That cannot work because it's a buffer mapping that only exists when VM is enabled. It toggles VM mappings inside of VM, not outside of it.
let g:VM_maps["Toggle Mappings"] = '\\<Space>'
To elaborate on my issue
let g:VM_default_mappings = 0
Then you manually map the plugs you want
<Plug>(Add-Cursor-Down)
<Plug>(Add-Cursor-Up)
<Plug>(Select-All)
<Plug>(Start-Regex-Search)
<Plug>(Add-Cursor-At-Pos)
<Plug>(Select-h)
<Plug>(Select-l)
let g:VM_maps["Toggle Mappings"] = '\\<Space>'
I tried that but it doesn't change anything. It looks like this functionality is not accessible from outside the script somehow. I might be misunderstanding, but isn't this "Toggle Mappings" supposed to turn off all shortcuts for VM until it is pressed again?
I just tried it and it works. What script are you talking about?
It is meant to remove all VM buffer mappings, while staying in VM, so that for example you can move the main cursor without moving all cursors, it's like some kind of 'pause VM'. You press it again to reapply buffer mappings. In the statusline (right corner) the first letter is M
if mappings are enabled, m
if disabled.
It doesn't disable global VM mappings, if it's what you meant. It only works inside VM.
It is meant to remove all VM buffer mappings, while staying in VM, so that for example you can move the main cursor without moving all cursors,
Alright, I suppose I misunderstood then. I'll stick to remapping using VM_maps
. Thanks!
Describe the issue:
\\<Space>
does not toggle visual-multiSteps to reproduce
\\<Space>
(shortcut to toggle)Operating System: Ubuntu 22.04.1 LTS
Vim Version: VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jan 11 2023 23:53:12) Included patches: 1-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919
commit SHA/branch: 724bd53a/master