atom / snippets

Atom snippets package
MIT License
205 stars 100 forks source link

Snippets do not work for linux hidden files #211

Closed rushl closed 5 years ago

rushl commented 8 years ago

When a filename begins with a dot, snippets do not work. Renaming the file without the dot will enable snippets again.

50Wliu commented 8 years ago

Does this happen in safe mode (atom --safe)? And what Atom version are you using?

rushl commented 8 years ago

Yes, it does happen in safe mode. I'm on Atom 1.9.8, but it's done this in previous versions as well.

gregrickaby commented 7 years ago

Confirmed. On my local, I like to offload the contents of wp-content/uploads to our development server with the following .htaccess snippet:

# Offload local images to dev environment.
RedirectMatch 301 ^/wp-content/uploads/(.*) http://someclient.devserver.com/wp-content/uploads/$1

If I open snippets.cson and add the following:

'.source.':
    'Offload local images to dev environment.':
        'prefix': 'offload'
        'body': '''
                # Offload local images to dev environment.
                RedirectMatch 301 ^/wp-content/uploads/(.*) http://{$1}.{$2}.com/wp-content/uploads/$1
                '''

However, when I open .htaccess and try to add this snippet, nothing happens.

Atom 1.11.2 macOS

ncksnydr commented 7 years ago

@rushl @gregrickaby Came across this post and found a solution. Adding here just incase you—or others like me—still need it.

".text.plain":
  'Large Flag':
    'prefix': 'lflag'
    'body': """
    #
    #      ${1:Comment}
    #-------------------------------------------------- #
    """
savetheclocktower commented 5 years ago

Sounds like this was a matter of scope matching. Closing!