ohmyzsh zsh-autosuggestions forward-word: treat underscore as part of word and not as separator

Viewed 883

I have been enjoying the zsh-autosuggestions plugin in ohmyzsh on Mac Os Mojave (https://github.com/zsh-users/zsh-autosuggestions) and I'm using the ctr+space key binding to complete single words, which is often more useful than the usual right-arrow key-press that completes the entire line.

Setting: bindkey "^ " forward-word

Completing single words works better for me, but I noticed that the underscore (_) character is considered as a separator by default, forcing me to use the key combination multiple times in order to complete words containing multiple underscores. How can I tell (ohmy)zsh to consider the underscore char as if it were an alphanumeric one?

1 Answers
Related