As I understand, w
recognizes word boundaries by splitting text into 3 groups:
1) characters that are specified in the iskeyword
setting (alphabetic, digits, and underscore)
2) other non-printable characters (symbols)
3) whitespace characters
Each time you press w
it goes to the next group 1 or group 2. I'd like to customize it so it only goes to the next group 1, jumping over "symbol words".
What almost works is this:
nnoremap w /\k\+<CR>
which uses the iskeyword
character class \k
. But it is ugly because it simulates me performing a search, which changes my highlighting, clutters my search history, and who knows what else. Is there way to make this work "cleanly" like the w
command normally is?
W
help? It has two groups of characters: whitespace, and non-whitespace, so it always goes to the first character after the next whitespace. – ElectrocauteryW
lumps the symbol characters together with alphabetic characters. What I want is to, effectively, lump symbols with whitespace, so that symbols are skipped while still creating word boundaries. – Talley