-
Notifications
You must be signed in to change notification settings - Fork 82
ViModeCompatibility
Judah Jacobson edited this page Mar 6, 2016
·
3 revisions
A collection of vi commands supported by libreadline that aren't yet supported by haskeline (see #84, #87, #88):
(This space left blank since all of the below commands are now implemented. If you find more, please open a new ticket.)
Some of these can be configured using the bind
command in the .haskeline
file in your home directory. For example, the following will put you in vi mode, and let you use the j
and k
keys to scroll down and up in your history:
editMode: Vi
bind: k up
bind: j down
However, the 'k' is translated into 'up' during both command and insert mode, so the above may not do what you want is totally useless.
The following commands were missing in 0.6.1.6, but are now in the HEAD.
I'm keeping around this list so we can update the user docs once 0.6.2 is released.
Key | Command |
---|---|
j | previous line in history |
k | next line in history |
e | end of word |
E | end of bigword |
X | delete previous character |
!^ | go to first non-whitespace character in line |
D | delete rest of line |
C | change rest of line (delete, then enter insert mode) |
p | paste (pos+1) |
P | paste |
f | find character |
F | find character (backward) |
t | find character-1 |
T | find character-1 (backward) |
% | jump to matching brace: () {} [] |
. | repeat previous command |
/ | reverse search through history (with n to continue to next while searching, and shift-N to reverse search direction) |
? | forward search through history (using n/N as above) |
~ | toggle case |
^W | erase previous word |
^D | enter, when line is not empty |