friendly-snippets
friendly-snippets copied to clipboard
The latex dots snippet prevents one from typing paragraphs.
When writing a large amount of text, multiple paragraphs, and having auto-completion enabled in your snippet engine, the 'dots' snippet intercedes when finishing a paragraph. The end of paragraph one is a '.' followed by 'Enter', which triggers the snippet insertion of '\dots'.
Hi @mashtonian, I double checked and agree this should be changed to avoid the collision.
Ref: ./snippets/latex.json
snippet:
"etc": {
"prefix": "...",
"body": "\\dots",
"description": "\\dots"
},
Now the question to answer is: what would be a better prefix? I'm considering dots
or perhaps we simply remove the snippet entirely. :thinking:
Great. Thanks.
What about a pair of dots followed by enter, as opposed to a single one?
On Mon, 12 Feb 2024, 06:25 OkelleyDevelopment, @.***> wrote:
Hi @mashtonian https://github.com/mashtonian, I double checked and agree this should be changed to avoid the collision.
Ref: ./snippets/latex.json snippet:
"etc": { "prefix": "...", "body": "\\dots", "description": "\\dots" },
Now the question to answer is: what would be a better prefix? I'm considering dots or perhaps we simply remove the snippet entirely. 🤔
— Reply to this email directly, view it on GitHub https://github.com/rafamadriz/friendly-snippets/issues/394#issuecomment-1938081655, or unsubscribe https://github.com/notifications/unsubscribe-auth/APZQI47GWZO2P625WRRLBWDYTGRTLAVCNFSM6AAAAABBYMES6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZYGA4DCNRVGU . You are receiving this because you were mentioned.Message ID: @.***>
Hi, any progress on this topic? I just stumbled across this behavior.
Hi @JFMarten and @mashtonian, I've tried the ..
method and (to no surprise) it didn't provide any different behavior. The issue we're encountering is that the snippet engine is matching on .
(the first dot of the three) and so when you enter to the next line it's selecting it.
This leads me to possible "fixes"
- We try to update our snippet engines to match longer selections
- We update the snippet to purely alphabetical prefixes (so this could become
dots
)
Thoughts or objections? Feel free to raise a PR too (not trying to gatekeep a fix :sweat_smile: )
Not sure why snippets exist for 1 word commands in the first place. Wouldn't this just spam the completion menu, snippets shouldn't be used as a language reference.