wezterm
wezterm copied to clipboard
Enhanced vi-like word motions in copy mode
Item 2 from #4471, which are more complete vi motions. Before the PR, copy-mode already had:
- w for moving to the next word
- e for moving to the end of WORD (not word)
- b for moving to the start of word
And now it has
- W for moving to the next WORD
- e for moving to the end of word (fixed)
- E for moving to the end of WORD
- B for moving to the start of WORD
In the code, word and WORD are called word and non_blank_word, respectively, since vim's definition of WORD is a sequence of non-blank characters separated by whitespace. These bindings were manually tested and seem to work as intended, however I thought of adding tests to validate the behavior but found no examples of how to do so, any tips would be greatly appreciated.