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

Turn selection into template literal #371

Closed
idleberg opened this issue Jul 29, 2019 · 1 comment
Closed

Turn selection into template literal #371

idleberg opened this issue Jul 29, 2019 · 1 comment

Comments

@idleberg
Copy link

idleberg commented Jul 29, 2019

Sublime Text's default JavaScript syntax package has one very nice feature I miss in this package. A selection within a backtick-enclosed string can be turned into a template literal by pressing $.

js

Other default languages such as Ruby or CoffeeScript also have this feature. It would be amazing if you could add this to the Babel package.

@Thom1729
Copy link
Contributor

The new v10.0.0-beta.1 release uses the same scopes as the default JavaScript syntax, so the default package's keybinds will automatically work.

At the moment, there is a bug in the default package's keybinds because the template string scopes were changed and the keybinds were not updated accordingly. (My bad.) There is a PR to fix this.

I'm closing this issue because the babel-sublime end of the fix is complete (as of the beta) and the Sublime end only awaiting a merge. You can take advantage of the fix right away by installing the babel-sublime beta and adding the fixed keymap from the linked PR to your User directory.

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

No branches or pull requests

2 participants