You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current behavior of Ctrl+Left Arrow and Ctrl+Right Arrow is a little irregular. For example, in the command ls --al /home/user-1, Ctrl + Left Arrow sets the cursor as follows:
ls --al /home/user-1|
ls --al /home/user-|1
ls --al /home/|user-1
ls --|al /|home/user-1
ls -|-al /home/user-1
|ls --al /home/user-1
Notice the second-to-last line, ls -|-al /home/user. The cursor is at an unexpected position.
However, more than correcting this little bug, I'd like to see Ctrl+Left/Right Arrow stop at both the start and end of words, sequences of punctuation, and sequences of whitespace (ie, three classes of tokens). This slows down the cursor, makes it more predictable, and more useful. Currently, I find Ctrl+Arrow to be too fast and chaotic and I find myself not using it and just waiting for Left/Right Arrow.
Admittedly, there's no "standard behavior" for Ctrl+Left/Right Arrow. Different applications have different behaviors. Some do it like I propose (Mousepad), some like fish (Sublime), some like fish but backwards (Firefox), and others in-between (LibreOffice Write, Netbeans). What I like about the proposed behavior is that:
symmetry - Ctrl + Left Arrow stops at the same locations as Ctrl + Right Arrow
the token classes are a superset of common lexical grammars. Meaning, I can usually get the cursor to the text that I want to delete, insert, or replace.
The proposed rule world result in:
ls --al /home/user-1|
ls --al /home/user-|1
ls --al /home/user|-1
ls --al /home/|user-1
ls --al /home|/user-1
ls --al /|home/user-1
ls --al |/home/user-1
ls --al| /home/user-1
ls --|al /home/user-1
ls |--al /home/user-1
ls| --al /home/user-1
|ls --al /home/user-1
An alternate ruleset that might map even better to common command-line lexical grammars might be to use the following three token classes: whitespace, forward slash, and words+punctuation. The result would be:
ls --al /home/user-1|
ls --al /home/|user-1
ls --al /home|/user-1
ls --al /|home/user-1
ls --al |/home/user-1
ls --al| /home/user-1
ls |--al /home/user-1
ls| --al /home/user-1
|ls --al /home/user-1
The text was updated successfully, but these errors were encountered:
The current behavior of Ctrl+Left Arrow and Ctrl+Right Arrow is a little irregular. For example, in the command
ls --al /home/user-1
, Ctrl + Left Arrow sets the cursor as follows:Notice the second-to-last line,
ls -|-al /home/user
. The cursor is at an unexpected position.However, more than correcting this little bug, I'd like to see Ctrl+Left/Right Arrow stop at both the start and end of words, sequences of punctuation, and sequences of whitespace (ie, three classes of tokens). This slows down the cursor, makes it more predictable, and more useful. Currently, I find Ctrl+Arrow to be too fast and chaotic and I find myself not using it and just waiting for Left/Right Arrow.
Admittedly, there's no "standard behavior" for Ctrl+Left/Right Arrow. Different applications have different behaviors. Some do it like I propose (Mousepad), some like fish (Sublime), some like fish but backwards (Firefox), and others in-between (LibreOffice Write, Netbeans). What I like about the proposed behavior is that:
The proposed rule world result in:
An alternate ruleset that might map even better to common command-line lexical grammars might be to use the following three token classes: whitespace, forward slash, and words+punctuation. The result would be:
The text was updated successfully, but these errors were encountered: