How to override any existing visual mapping when you are into a luasnip snippet #561
-
Hello everybody When you expand an snippet that has jump-indexes (specially if they have a default value) lua-snip enters visual mode, with the current word selected so you can easily override it. But, this has a problem, and that is you can trigger any common visual mode mapping you have (in my case, I have one for pasting, another one for expanding the visual selection etc). This is very problematic and it is very easy to overlook. Steps to reproduce
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Oh, the mode is actually SELECT not VISUAL. |
Beta Was this translation helpful? Give feedback.
Oh, the mode is actually SELECT not VISUAL.
And luckily, mappings can be defined exclusively for VISUAL, so they won't work in SELECT (see
:h mapmode-x
)