Htaccess file type for snippets?


#1

I’m trying to add snippets to Atom for htaccess files, but can’t find the correct file type to assign in the snippet definition. I’ve tried a number of different types including the * catch-all, but to no avail. Can anyone point me in the correct direction, please?


#2

When you open an htaccess file, what grammar is selected in the status bar?


#3

HTACCESS (all caps): That doesn’t work either.


#4

It works just fine for me.

In my snippets.cson:

'.htaccess':
  'Snippet Name':
    'prefix': 'hi'
    'body': 'This is a snippet'

When I go into a .htaccess file with the HTACCESS grammar active, type “hi” and hit Tab, it expands as expected.


#5

Thanks for looking into it. This code has no effect in any file type:

'.htaccess':
  'Force SSL for a specific Domain':
    'prefix': 'forcessl'
    'body': 'hello world'

#6

I think there must’ve been a hidden character in there somewhere. When I copy your snippet over and modify it by hand. it works. However, the autosuggestion of available snippets when I start typing “force” doesn’t appear in this file type.


#7

Do you have autocomplete-plus disabled for that kind of file?


#8

No, I haven’t changed the default settings for this.