[haskeline] #84: Vi mode noticeably not backward compatible with readline
haskeline
haskeline at projects.haskell.org
Wed Jun 3 16:30:30 EDT 2009
#84: Vi mode noticeably not backward compatible with readline
----------------------+-----------------------------------------------------
Reporter: jdanbrown | Owner:
Type: defect | Status: new
Priority: major | Milestone: 0.6.2
Version: 0.6 | Resolution:
Keywords: |
----------------------+-----------------------------------------------------
Old description:
> Thank you for implementing vi line editing—but please also finish the
> implementation!
>
> 1. libreadline has an extensive set of vi commands that most replacement
> libraries fail to match. Here are just a few command-mode keys that I
> notice don't work:
>
> j - previous line in history[[BR]]
> k - next line in history[[BR]]
> e - end of word[[BR]]
> E - end of bigword[[BR]]
> f - find character[[BR]]
> F - find character (backward)[[BR]]
> t - find character-1[[BR]]
> T - find character-1 (backward)[[BR]]
> D - delete rest of line[[BR]]
> C - change rest of line (delete, then enter insert mode)[[BR]]
> !^ - go to first non-whitespace character in line[[BR]]
> p - paste (pos+1)[[BR]]
> P - paste[[BR]]
> !^D - enter, when line is not empty[[BR]]
> % - jump to matching brace: () {} [][[BR]]
> . - repeat previous command
> X - delete previous character
>
> 2. Using up/down in command mode puts the cursor at the end of the line,
> whereas readline puts it at the beginning of the line. I'm not sure
> whether one is more convenient or correct, but UI consistency is more
> important here and every other program I encounter uses libreadline.
>
> 3. Both vim and libreadline handle 'cw' specially: instead of deleting
> the sequence of text moved through by the 'w' movement command—the rest
> of the word and any trailing whitespace—it only deletes the rest of the
> word. So 'cw'/'ce' and 'cW'/'cE' are synonymous even though 'dw'/'de' and
> 'dW'/'dE' aren't.
New description:
Thank you for implementing vi line editing—but please also finish the
implementation!
1. libreadline has an extensive set of vi commands that most replacement
libraries fail to match. Here are just a few command-mode keys that I
notice don't work:
j - previous line in history[[BR]]
k - next line in history[[BR]]
e - end of word[[BR]]
E - end of bigword[[BR]]
f - find character[[BR]]
F - find character (backward)[[BR]]
t - find character-1[[BR]]
T - find character-1 (backward)[[BR]]
D - delete rest of line[[BR]]
C - change rest of line (delete, then enter insert mode)[[BR]]
!^ - go to first non-whitespace character in line[[BR]]
p - paste (pos+1)[[BR]]
P - paste[[BR]]
!^D - enter, when line is not empty[[BR]]
% - jump to matching brace: () {} [][[BR]]
. - repeat previous command[[BR]]
X - delete previous character
2. Using up/down in command mode puts the cursor at the end of the line,
whereas readline puts it at the beginning of the line. I'm not sure
whether one is more convenient or correct, but UI consistency is more
important here and every other program I encounter uses libreadline.
3. Both vim and libreadline handle 'cw' specially: instead of deleting the
sequence of text moved through by the 'w' movement command—the rest of the
word and any trailing whitespace—it only deletes the rest of the word. So
'cw'/'ce' and 'cW'/'cE' are synonymous even though 'dw'/'de' and 'dW'/'dE'
aren't.
Comment (by jdanbrown):
Added X
--
Ticket URL: <http://trac.haskell.org/haskeline/ticket/84#comment:10>
haskeline <http://example.org/>
My example project
More information about the Haskeline
mailing list