atom-sublime-select icon indicating copy to clipboard operation
atom-sublime-select copied to clipboard

Feature request / Bug: ignore multiline template literal strings

Open FredGandt opened this issue 4 years ago • 0 comments

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";

FredGandt avatar Mar 19 '21 18:03 FredGandt