You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I looked through the document but I'm not sure how can I achieve this? Let's say I have a snippet with a single character ?n as key. But I want this snippet to only be active when ?n is at the beginning of the line, not when it's in the middle of the line. I'm trying to write a function to be used as the snippet condition, something like this. But there's no yas--current-key, I tried using yas--current-template but it's not bound during condition checking.
Currently expansion conditions are global, not per-snippet. But you could sort of hack it in with yas-key-syntaxes (see below). If #988 is implemented, an alternative would be to use ^n as the snippet key.
Hi, I looked through the document but I'm not sure how can I achieve this? Let's say I have a snippet with a single character
?n
as key. But I want this snippet to only be active when?n
is at the beginning of the line, not when it's in the middle of the line. I'm trying to write a function to be used as the snippet condition, something like this. But there's noyas--current-key
, I tried usingyas--current-template
but it's not bound during condition checking.The text was updated successfully, but these errors were encountered: