Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Template literals #656

Open
Open

Description

@idleberg

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 JavaScript since ES2015, 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

Activity

  1. h0n24 commented on Jul 29, 2019

    @h0n24

    This is necessary only in the template literals, aka text between back-ticks ` `.
    No need for them inside "" or ''.

    Additionally check gif in the original discussion: https://discuss.atom.io/t/template-literals-autocomplete/67161

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions