How to write snippet condition to expand it only when it's positioned at the beginning of the line?
Say your snippet has the key
mysnippet_, you can use the following condition:
# condition: (looking-back "^mysnippet_" nil)
Speaking of use cases, it could make sense to have snippets for inserting org-mode headers only available when the cursor is in the first line and column:
# condition: (and (looking-back "^mysnippet_" nil) (eq 1 (line-number-at-pos)))
I first proposed to use
(eq 0 (current-column)), but that's of course nonsense because the cursor is after the snippet key.