Skip to main content

Module word

Module word 

Source
Expand description

Word-wise motion.

Everything here indexes graphemes, never bytes or chars, so Ctrl+Left through CJK or emoji moves in the same units the cursor does.

Functionsยง

next_word_boundary
The next boundary at or after col: skip whitespace, then consume one run of like-classed graphemes.
previous_word_boundary
The previous boundary at or before col, mirroring next_word_boundary.
word_at
The run containing col, as (start, end) grapheme indices.