Open djpowers opened 9 years ago
works for letters now, but still no love for a snippet like $$,I would love to have this fixed.
Having the same issue in Atom 1.20.
This is a complex issue that arises when a snippet’s prefix begins with punctuation rather than a letter. When the user hits Tab and the cursor is preceded by several punctuation marks in a row (>=
in this example), the snippets package looks for snippets whose prefixes start with >
instead of =
because there’s no obvious “word” boundary to help it out.
It looks for such a boundary because if a snippet has a prefix ff
, we don't want it to get invoked if the user types off
and then presses Tab. But when the entire “word” is just a string of non-word characters, we shouldn’t really care about this potential false positive, so I think I’ve got an idea of how we’d fix this.
Hello,
I noticed that when trying to tab-complete an ERB tag, it does not work if the cursor is directly after HTML tags with no whitespace, and seemingly any other punctuation. I wasn't sure if this was intentional, or a limitation of some sort.
I'm using Atom 0.210.0 on Mac OS X 10.10.3.
To reproduce:
span
tag, which places the cursor in between:<span></span>
=
and then presstab
to trigger the snippet.Expected behavior: An ERB tag would be created inside the
span
, like so:Actual behavior: The cursor jumps ahead to after the closing tag without creating the ERB tag:
Triggering this snippet works if it directly follows whitespace or an alphanumeric character, so I wasn't sure if following symbols should work the same.
Please let me know if I missed some documentation, or if this should be reported elsewhere. Thank you.