"Hack" Atom to make text selection via keyboard happen as it does natively?



Trying to convert from TextMate over to Atom, one area that I am having a bit of difficulty adapting to is that Atom tries to be very intelligent about how to highlight “words” per grammar.

I am wondering if there is a way to disable this feature and revert back to the way that your operating system natively highlights text via the keyboard.

Also, a big issue I keep encountering, is that I, over the years, have trained myself to double click the first word that I want to highlight as part of a phrase, followed by keyboard shortcuts to select the remainders. Atom, however, will “unselect” the first word I highlighted and then continue to highlight the reminders. This is defiantly not expected, imo.

Expectation would be that double clicking a word, then pressing the keyboard shortcuts (osx: shift+option left/right arrow) would then continue to append the words to your text selection.

Also, I can live to learn with this one… but…
If I have a kebab string: “a-b-c-d” and I am using the keyboard to select the segments, natively the first keyboard stroke will give you the first segment, followed by the remaining segments including the -. In Atom, the - are their own keyboard stroke.
This one is not a “bad thing” but it is not native to the operating system, which would be my personal preference so I receive similar behavior no matter what I am working in.

My goal is to just “hack” atom to turn off these features, disable them, whatever.

Is it possible?


AFAIK, this can be controlled using the “Non Word Characters” setting (Preferences > Editor):

This isn’t done “intelligently”, but defined in the package settings. You can override them in the preferences for the package providing the language support (again, that setting is called “Non Word Characters”).


thanks for your reply @idleberg

AFAIK, this can be controlled using the “Non Word Characters” setting (Preferences > Editor):

It would be too unreliable to try and mimic native functionality here .

I did find that you can map keybindings back to their native behavior with native! directive.

My assumption is it would go something like

# keymap.cson
  "alt-shift-left": "native!"
  "alt-shift-right": "native!"

however, that doesn’t appear to be working.


Attached reference!

Note that the user defined is not “green” – nothing is happening when I use the key now