surdu/selector-to-tag

Allow user-defined file extensions

itsjustmath opened this issue · 5 comments

Love the concept! Small feature request...I work a lot with handlebars templates (which currently aren't supported). It would be awesome if you did something similar to what emmet does:

  1. Use Open Your Keymap menu item to open your custom keymap.cson file.
  2. Add the following section into it:
atom-text-editor[data-grammar="YOUR GRAMMAR HERE"]:not([mini])':
    'tab': 'emmet:expand-abbreviation-with-tab'

Replace YOUR GRAMMAR HERE with actual grammar attribute value. The easiest way to get grammar name of currently opened editor is to open DevTools and find corresponding element: it will contain data-grammar attribute with value you need. For example, for HTML syntax it’s a text html basic.

surdu commented

If I'm not wrong about what I think you're saying, selector-to-tag already has this feature. In the settings of the package you can set on what file extensions the package should bind on.

The setting you are looking for is called File Extensions.

You can find a complete list of options and their description here: https://github.com/surdu/selector-to-tag#options

Was this what you where looking for ?

I think so. Where would I find this setting, config.cson? Can you provide an example for how to set these file extensions?

surdu commented

Atom > Preferences > Packages, in the list search for selector-to-tag and press the Settings button.

Thanks for your help!

surdu commented

My pleasure 😉