atom / language-typescript

TypeScript language package for Atom
Other
21 stars 33 forks source link

Template literals #39

Open idleberg opened 5 years ago

idleberg commented 5 years ago

Summary

In languages such as Ruby or CoffeeScript, Atom has a feature to quickly change a selection inside a string into a template literal. Since template literals are supported in TypeScript, it would be nice to have the same feature for the language.

Steps:

  1. Select any part inside a string (enclosed in backticks), e.g. name
  2. Press $ key
  3. Selection becomes ${name}

Motivation

Existing feature in Ruby, CoffeeScript and possible other bundled Atom syntax languages.

Additional context

Here's an animation showcasing the feature when working in CoffeeScript

cs