bigfive / atom-sublime-select

Enable 'sublime style' multiline selection boxes to Atom editor http://atom.io
MIT License
233 stars 49 forks source link

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

Open FredGandt opened 3 years ago

FredGandt commented 3 years ago

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