Need help with Kate (25.08.1) word navigation

This is driving me insane, when I use ctrl + left/right arrow or ctrl + shift + left/right arrow on a word that contains an underscore or hyphen, etc the navigation stops on the underscore rather than the start of the token which is an absolute pita when editing documents that contain snippets of code such as c++

For example, if I’m writing a document that includes hyphenated words

This is a line that includes a double barrelled name Mr Armitage-Smith which shows the problem.

Then any navigation starting at the beginning of the name stops after Armitage instead of the end of Smith

I have scoured Kate settings but can find nothing that would let me configure what characters should be included as part of a word.

So how do I configure Kate to include hyphens and underscores as part of words?

i’m using 23.08.5

and hyphens are treated as words unless they are together, so -- is skipped over as a whole word and navigation stops at a hyphen in a compound word

--- (1 word)

hyphen-case (3 words)

underscores are treated as part of a word so

snake_case (2 words)

with the underscore treated as the last character of the first word

however if you disable camel case navigation in settings then

snake_case (1 word)

camelCase (1word)

is this not your experience on 25.08.1?

ahh, it was camel case causing the issue, tyvm :folded_hands:

We altered the default for the next release to have camel case off.

1 Like