1

I would like to create a yassnippet with a placeholder, so something like

value = $1(insert_value)

with the meaning that I would like to see the text "insert value" but when I press TAB and then type something, the text is replaced.

I would also like that the placeholder actually becomes a real text if I do not press TAB or I press TAB twice.

How these things can me done? Thank you

2

The behavior you describe is provided by placeholder fields, such as ${1:default value}. After pressing tab once to navigate to the field, you can type a replacement value. Or you can hit tab again to keep the default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.