But having to press shift for a capitalised word is not a pain. OK, sounds about right.
But having to press shift for a capitalised word is not a pain. OK, sounds about right.
Another consideration: whether the program you're typing in will stop at underscores or hyphens when using Ctrl + Shift + Left/Right Arrow when highlighting. If I want to highlight `this_variable_with_a_long_name` without using the mouse, it's going to be a pain if I have to hit the left arrow key six times instead of once. (Frustratingly, it varies from editor to editor.)
x-y = ‘a string or something’
#
# bunch of lines of code here
#
x = 5
y = 2
assert x-y == 3As far as keyboard navigation around partial or whole words, I find it really helpful to have separate keybindings. For me (on a Mac so keyboard layouts matter), opt+left/right moves a “whole word” (as in to the nearest non-word character) and ctrl+left/right moves to the nearest internal word boundary (where boundary is mostly arbitrary; in bouncyCase it moves to the nearest non contiguous case change, in any-punctuated_case it moves to the nearest punctuation).
Agree it’s frustrating how much this varies by editor, but being able to configure the behavior is one of my first checks when deciding if I’ll use the editor at all.
Many years ago, I was programming in COBOL, where kebab-case is the norm. For a while there I was programming in both "C" AND in COBOL. That was a nightmare, I invariably used the wrong syntax for my variable-names, as both languages used incompatible syntax for those variable-names.
But yeah kebab-case-might-be-easier than camelCaseToRead in the long run.
and it’s also quite far from the home row on the keyboard.
I'm not going to adopt a coding style that requires me to reach that far repeatedly for every name.