Defining Word Separators


Is there any way to define word separators in Atom. It really helps my workflow if I can double click a class name to select it that has a hyphen in the name. Something along the lines of what ST has ??


In Atom they’re called “Non-Word Characters” in Settings View:


Awesome! Thanks for the crazy fast reply!


As a longer term solution, if your language support hyphen as part of identifier name, maybe it’s worth to fix it in the appropriate language-* package.

For example php edit that setting to include $ as part as identifier.


Ahh Thanks @jeancroy thats what I needed!


Apols if this is obvious and I’m mis-using it, but I still can’t get this to work for me and it significantly affects editing speed when text selection requires any extra effort.

Working with SASS files (*.scss), I find that I want the hyphen character to be considered as a word boundary e.g. selecting any-one-of-these-terms by double-clicking or using alt-cmd-left/right (on mac) should select just the component part of the string such as ‘any’, ‘one’, etc. I’ve added the hyphen character to the nonWordCharacters setting in the Prefs for the SASS package (via Atom UI), but whenever I attempt to select a component of the string, I still find the whole ‘any-one-of-these-terms’ to be highlighted. I’ve tried closing and re-opening my SASS files to see if that helps.

I’m sure I’m doing something daft but any help would be much appreciated as I’m loving Atom otherwise (after being a long-time Textmate fan).


Wow. Basic oversight. But I suppose all oversights are basic until they’re not.

In case it throws anyone else… the SASS package has separate settings for .sass and .scss. Scroll past the ‘SASS Grammar’ section and all the settings are repeated again for ‘SCSS Grammar’. Obviously if you’re using .scss like me, you need to update the prefs for the subsequent SCSS Grammar as well as / instead of the SASS Grammar.