Closed jmzagorski closed 3 years ago
That's why delimiters are configurable globally, per buffer and per snippet - to avoid conflicts with valid code.
I will later add boundaries for placeholder search, but I still recommend setting the delimiters differently from valid code.
PS. Final delimiters are no longer supported in favor of final tag
Thank you, I did forget to update my config and forgot about per snippet config!
I wonder if no boundaries is a good thing in some situations. If you read :h template
it gives you a strategy for template files, similar to your html/html.snip example. If those template files had snippet placeholders, then we could get a snippet when a new file is created and possibly jump to those placeholders if there was a normal mode mapping to do so.
That might be outside the scope of what you want to do since the same thing can be accomplished with a snippet, but with the extra step of typing the snippet name in the new buffer.
Good, then I'm closing the issue.
I regards to templates, are you perhaps referring to something similar to #13?
Yes, #13 is exactly the solution, thanks for that tip! I guess boundaries may be a good idea at some point. In the meantime I will change my delimiters. Thank you again!
Hello,
The problem I am having is detailed below. In summary, when I expand a snippet, my cursor jumps to a placeholder that is outside the snippet template. I would be happy to look into it when I have the time.
My configuration:
Below is an animation that shows my problem.
todaysDay
function<tab><tab>
to expand my snippet${value}
on line 22, which is outside the snippet template. This is not a placeholder, but a valid piece of javascript. The snippet template form the javascript comment is put in the correct place on line 27