Consider a(123), with the cursor at a. In both emacs and readline, M-f moves forward one character, to the (. In prompt-toolkit, it moves to the 1.
It also would be nice to be able to configure word boundaries. In particular, I would like to be able to make it so that AbcDef and abc_def are both treated as two words for the purposes of word movement/deletion. The current approach does a regex search, but I believe you need to tokenize the input.
Also worth noting that the docs for forward-wordstate that words are composed of letters and numbers, but the implementation includes underscores as well (and that behavior in particular does not match readline and is quite annoying).
Consider
a(123)
, with the cursor ata
. In both emacs and readline,M-f
moves forward one character, to the(
. In prompt-toolkit, it moves to the1
.It also would be nice to be able to configure word boundaries. In particular, I would like to be able to make it so that
AbcDef
andabc_def
are both treated as two words for the purposes of word movement/deletion. The current approach does a regex search, but I believe you need to tokenize the input.Also worth noting that the docs for
forward-word
state that words are composed of letters and numbers, but the implementation includes underscores as well (and that behavior in particular does not match readline and is quite annoying).