New user cannot get beginning-of-line snippets to work with overwrite
I want to have different snippets triggered depending on whether or not I'm at the beginning of a line. My snippets file is as follows.
snippet testsnippet "standard version of testsnippet"
expansion of the standard version of testsnippet
endsnippet
snippet testsnippet "beginning-of-line version of testsnippet" !b
expansion of beginning-of-line version of testsnippet
endsnippet
When I try to expand testsnippet at a point that is not the beginning of a line, then UltiSnips automatically uses the standard version, as expected. However, when I try to expand testsnippet at the beginning of a line, then Ultisnips prompts me to choose between the standard version and the beginning-of-line version. I was under the impression that the "!" option would make it so that I wouldn't have to choose between the two snippets when I trigger the snippet at the beginning of a line. I only started playing around with UltiSnips today, so I'm probably doing something very silly. Any help is greatly appreciated.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- UltiSnips Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Tim for more information if necessary.