Can I change what constitutes a "word" in terms of selection?

I’d like to be able to double click and select an entire word, even if it includes a ' mark. Such as it's. And be able to use option+shift+arrow (on mac) to select words to the left/right. Currently those stop at the ' character.

Is it possible to modify those boundary characters to determine what constitutes a word?

Only with the wordChars language data, which may not be powerful enough for what you’re trying to do here.

1 Like

That worked great and is already live in my app tasktxt.com

Is there also a way to remove a wordChar from an existing language?
I am using codemirror/lang-sass and would like to remove the ‘-’ from the wordChars :thinking:

No, that’s not possible — at least not without creating your own LRLanguage object for the language.

Makes sense! Thanks!