Skip to content

Feature request / Bug: ignore multiline template literal strings #178

Description

@FredGandt

When working in JavaScript (for example); dragging through a template string's second, third etc. lines, a cursor should not be placed amongst them.

Example code layout:

        let foo = 3.142;
        let bar = `This template string
has
multiple lines';
        let baz = "And I'd like to drag a cursor in front of the two let declarations, " +
          "without affecting the template string";

While all three lets and the second part of baz's concatenated string should get a cursor, the second and third lines of the template string should not. Using vertical bars to represent where the cursors are placed:

Desired:

        |let foo = 3.142;
        |let bar = `This template string
has
multiple lines';
        |let baz = "And I'd like to drag a cursor in front of the two let declarations, " +
        |  "without affecting the template string";

Current undesirable result:

        |let foo = 3.142;
        |let bar = `This template string
has|
multiple| lines';
        |let baz = "And I'd like to drag a cursor in front of the two let declarations, " +
        |  "without affecting the template string";

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions