Simply, I'm missing a feature from Emacs: underscores are word boundaries, so it is extremely helpful when editing code for snake_case languages. <a-i>_ is good, but it would be better to support an option in config to work with _ like with -, where w and e related workflow works fine.
Luckily there's already an option for that, with extra_word_chars you can control if characters are considered to be part of a word.
@occivink thank you, could you give more details? I'm new to Kakoune.
What exactly should I put into my .kakrc to unset _ from word chars?
Oh I misunderstood, unfortunately extra_word_chars only supports adding characters, not removing some.
@fominok try this: https://github.com/mawww/kakoune/wiki/Selections#how-to-make-word-keys-discern-camelcase-or-snake_case-parts
@maximbaz thank you, it works. Not sure if I need to close this issue now: maybe having an opposite for extra_word_chars could be useful.
I think the solution would be to change extra_word_chars to default to _, and remove the hardcoded underscore-is-a-word-char behaviour. That way its just a matter of overriding that option.
This is a neat idea
Most helpful comment
I think the solution would be to change extra_word_chars to default to
_, and remove the hardcoded underscore-is-a-word-char behaviour. That way its just a matter of overriding that option.