0

How do I selectively mark snippet fields as being expandable or non-expandable?

For example, I have a snippet

# name: read in vector
# key: cinvec
# --
std::vector<${1:_type_}> ${2:_name_}(${3:_size_});
for(int i = 0; i < $3; ++i) std::cin >> $2[i];

But I want the $2 field to be non-expandable because it is just a name. If I accidentally write another key into $2 and press TAB, it will do nested expansion instead of just going to the next field.

Your Answer

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

Browse other questions tagged or ask your own question.