Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.39k stars 166 forks source link

Any characters at the beginning of a line in front of a letter or space considered a word when moving word by word to the right #5582

Closed ArthurZ closed 1 day ago

ArthurZ commented 3 days ago

Issue: any characters at the beginning of a line in front of a letter or space considered a word when moving word by word to the right. When moving from the right to the left it works properly. This is inconsistent, and wrong when moving to the right.

The -- at the beginning of a line in some SQL dialects constitute a comment, when navigating them word by word to the right the cursor jumps too far. The same is for comments in bash/Python, etc. ##

Test it with the following set on a per line basis by moving with Ctrl-Right Arrow and then Ctrl-Left Arrow

------ test test
#### test test
--- test --- test --- test test
$$ test test
test --- test
-- t test
--t- test test
Alexey-T commented 3 days ago

Ctrl+Right is the hotkey of the command 'go to word end'. we have other word-jump command(s) which may help you. if you remap Ctrl+Right to them (F9 in the Command Palette).

Pls see https://wiki.freepascal.org/CudaText#Word_jump_commands

Does it help?