sublime-expand-selection-to-quotes icon indicating copy to clipboard operation
sublime-expand-selection-to-quotes copied to clipboard

String containing apostrophes can break the selection

Open contentfree opened this issue 12 years ago • 5 comments

  a = 'test'
  b = "This shouldn't break"

If you place your cursor after the apostrophe in b and run the command, all is well. If you place your cursor before the apostrophe in b and run the command, the selection goes from the last single quote in the a line to the apostrophe.

contentfree avatar Jan 30 '13 22:01 contentfree

There are two regions in which this fails: With the cursor at the left of the first double-quote, it will select from the end of the first line up to the apostrophe, and with the cursor between the same double-quote and the apostrophe, it selects nothing.

unphased avatar Mar 28 '13 19:03 unphased

Confirmed that it doesn't seem to work as one would expect in this case.

kek avatar Jun 26 '21 10:06 kek

I have a feeling that it would take a more clever algorithm to make this work properly. As you might have guessed, I don't use Sublime Text actively anymore so I don't think I will put any effort into this, but I will try to be quicker to merge a pull request that upgrades the plugin to handle this case.

kek avatar Jun 26 '21 10:06 kek

I have a feeling that it would take a more clever algorithm to make this work properly. As you might have guessed, I don't use Sublime Text actively anymore so I don't think I will put any effort into this, but I will try to be quicker to merge a pull request that upgrades the plugin to handle this case.

What did you end up using?

pythoncarpenter avatar Feb 10 '24 16:02 pythoncarpenter

I'm not @kek but I went from sublime -> vim -> neovim. Highly recommended 😉

unphased avatar Feb 10 '24 19:02 unphased