-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Snippets that overwrite existing ones #2695
Comments
@siannopollo I suspect that you're hitting this issue: #1867 Could you perhaps take a look and let me know if it is the same problem, or if not -- clarify what the difference is? Thanks! |
@izuzak That issue seems to be separate from this one, since I can reproduce this error without removing the snippets.cson file. And I'm only seeing this problem with snippets that overwrite snippets introduced by a package. Any of my custom snippets, for which there are no other competing tab triggers within the same scope, work without a problem. I can reproduce this error by:
|
Ahhh, thanks @siannopollo -- totally neglected that fact because I was focused on the other issue. Appreciate the clarification 🙇 |
I have this problem too. Any workaround except |
Is this going to be addressed? Pretty annoying to not be able to modify snippets I use several times a day like |
@bclinkinbeard I am able to override them Add this to your snippets.cson, then reload, and open a coffee file:
|
That works, but overriding for JS files doesn't seem to. I have tried both of the following to avoid the semi-colon to no avail.
and
|
Not sure. This works for me in js: '.source.js':
'log':
'prefix': 'log'
'body': 'console.OMGlog($1);$0' Did you reload? |
That does not work for me, even if I completely quit Atom and reopen. |
What else is in your snippets file? What if that is the only thing? Try |
OK that is weird. The only other thing in my snippets file is this, which is what is breaking it.
If I remove that, the |
Did you have 2 top level |
Ah jeez, that was in fact the problem. Sorry about that, and thanks for helping me sort it out. |
Oh, man. That really needs to be documented here. Just spent an hour trying to figure out why none of my snippets except that last one was getting picked up… |
Docs added in atom/flight-manual.atom.io#102. I'm going to close this as it seems to be a poorly-communicated limitation. |
I am having similar issue. Can not override the
|
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks! |
The Language Rspec package comes with it's set of snippets, and those are fine, except that they use double quoted strings (I know, I know, roll your eyes so we can get past that part :-). Anyway, I set up my own snippets in my snippets.cson file (the one accessed via Atom > Open Your Snippets) that overwrite some of the existing Rspec ones.
When I first open up Atom and try to use one of my custom snippets they don't seem to be loaded and the Language Rspec ones are used instead. If I then open up my snippets.cson file and hit cmd+s Atom picks them up and starts using my snippets.
The text was updated successfully, but these errors were encountered: