[haskeline] #84: Vi mode breaks compatibility with readline: missing commands
haskeline
haskeline at projects.haskell.org
Wed Jun 3 17:39:25 EDT 2009
#84: Vi mode breaks compatibility with readline: missing commands
----------------------+-----------------------------------------------------
Reporter: jdanbrown | Owner:
Type: defect | Status: new
Priority: major | Milestone: 0.6.2
Version: 0.6 | Resolution:
Keywords: |
----------------------+-----------------------------------------------------
Changes (by jdanbrown):
* summary: Vi mode noticeably not backward compatible with readline =>
Vi mode breaks compatibility with readline:
missing commands
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[[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.
New description:
libreadline includes an extensive set of vi commands that most replacement
libraries fail to match. I started a wiki page to keep track of the ones
I've noticed missing in haskeline: ViModeCompatibility.
Comment:
Split into one wiki page and two new tickets.
--
Ticket URL: <http://trac.haskell.org/haskeline/ticket/84#comment:11>
haskeline <http://example.org/>
My example project
More information about the Haskeline
mailing list