Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic file extension for temporary files #26

Open
jbuttery opened this issue Feb 26, 2018 · 1 comment
Open

Dynamic file extension for temporary files #26

jbuttery opened this issue Feb 26, 2018 · 1 comment

Comments

@jbuttery
Copy link
Contributor

It would be nice to be able to specify the file extension of Textern's temporary file on the fly (i.e. per editing session). This is so that editors that do auto-configuration based on file extension (for example, syntax highlighting) can do their thing.

The most obvious (well, to me anyway) way to do this is to have a context menu like "It's All Text!", where you can manually pick from a list of file extensions. This would require having a context menu, though, which may or may not be trivial to implement (I've never made an add-on).

Another way to do it would be to have a configuration file where you could pick a file extension automatically based on a regex match of the page URI, HTML element name, CSS id/class, etc. That'd be a pretty cool way to have the hotkey "do the right thing" out of the box in a lot of cases.

Personally, I'd rather have both (but of course I would, users always ask for everything :P) where the hotkey launches with the default and/or pattern-matched file extension, and choosing from the menu explicitly uses that one, overriding the other logic.

@jlebon
Copy link
Owner

jlebon commented Feb 27, 2018

Not too keen on adding a context menu, seeing as a big part of the idea is avoiding the mouse in the first place :). The filename is already named based on the URL of the page, right? Adding some DOM-related naming schemes to make it more specific is doable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants