[haskeline] #84: Vi mode noticeably not backward compatible with readline

haskeline haskeline at projects.haskell.org
Mon Jun 1 16:40:33 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!
>
> 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]]
>   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
>
> Additionally, 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.
>
> Note: I'm not sure if v0.6 is correct—this is whichever version ships
> with ghc-6.10.3.

New description:

 Thank you for implementing vi line editing—but please also finish the
 implementation!

 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

 Additionally, 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.

 Note: I'm not sure if v0.6 is correct—this is whichever version ships with
 ghc-6.10.3.

Comment (by jdanbrown):

 Added e, E

-- 
Ticket URL: <http://trac.haskell.org/haskeline/ticket/84#comment:4>
haskeline <http://example.org/>
My example project


More information about the Haskeline mailing list