Skip to content

How to use $VISUAL? #98

Answered by dcampos
eric-hansen asked this question in Q&A
Feb 3, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You need to select some text in visual mode, then press the key you've mapped to the cut_text action, followed the trigger for the snippet and expand it. The text you selected will replace the $VISUAL placeholder in the snippet.

In normal mode, you can also use a mapping for cut_text to do the same thing. Let's say the mapping is g<Tab> and you want to use text within brackets, simply press g<Tab>ib, enter the trigger and expand the snippet with the $VISUAL placeholder.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@eric-hansen
Comment options

Answer selected by eric-hansen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants