Leon Gaban
Leon Gaban

Reputation: 39044

How to allow double click selection of strings with - in them, within Atom?

Say I have a string like 'cheap-module-inline-source-map' in the following:

enter image description here

In Atom, I want to be able to just double click that string to select the entire string. However it only let's me select the words I click on.

I did find the following in Settings > Editor:

enter image description here

Originally it was /\()"':,.;<>~!@#$%^&*|+=[]{}?-…

I removed the - however this did not fix the issue.

Upvotes: 1

Views: 806

Answers (1)

Dan Lowe
Dan Lowe

Reputation: 56667

You have already looked at the global settings (under "Editor"), but many settings (including this one) appear in the various packages so that you can customize things per syntax.

This setting seems to exist in both language-javascript and language-babel, and perhaps you have other Javascript packages that have it (there are many of them out there...)

If you navigate to...

  • Settings
  • Packages
  • search for "javascript" or "babel"
  • click "Settings" on the package

Then you will find a "Grammar" settings section in most syntax packages. This is the one from language-javascript.

language-javascript settings panel

As you can see it has a copy of the Non-Word Characters setting. You can set this explicitly, though I would have expected it to inherit from the global value.

language-babel has this too, though you need to scroll down a bit further to find it.

Upvotes: 5

Related Questions