diff --git a/CHANGELOG.md b/CHANGELOG.md index 081547b4..f5edb30e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ CHANGELOG (seq 100; sleep 1; seq 100) | fzf --query 1 \ --bind 'result:transform-header(echo result: $FZF_MATCH_COUNT),result-final:transform-footer(echo final: $FZF_MATCH_COUNT)' ``` +- Bound `alt-left` to `backward-word` and `alt-right` to `forward-word` by default (#4833) 0.73.1 ------ diff --git a/man/man1/fzf.1 b/man/man1/fzf.1 index 85c965c4..9ea726dd 100644 --- a/man/man1/fzf.1 +++ b/man/man1/fzf.1 @@ -2012,7 +2012,7 @@ A key or an event can be bound to one or more of the following actions. \fBbackward\-kill\-subword\fR \fBbackward\-kill\-word\fR \fIalt\-bs\fR \fBbackward\-subword\fR - \fBbackward\-word\fR \fIalt\-b shift\-left\fR + \fBbackward\-word\fR \fIalt\-b shift\-left alt\-left\fR \fBbecome(...)\fR (replace fzf process with the specified command; see below for the details) \fBbeginning\-of\-line\fR \fIctrl\-a home\fR \fBbell\fR (ring the terminal bell) @@ -2059,7 +2059,7 @@ A key or an event can be bound to one or more of the following actions. \fBfirst\fR (move to the first match; same as \fBpos(1)\fR) \fBforward\-char\fR \fIctrl\-f right\fR \fBforward\-subword\fR - \fBforward\-word\fR \fIalt\-f shift\-right\fR + \fBforward\-word\fR \fIalt\-f shift\-right alt\-right\fR \fBignore\fR \fBjump\fR (EasyMotion-like 2-keystroke movement) \fBkill\-line\fR diff --git a/src/terminal.go b/src/terminal.go index 65a46606..49994522 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -871,8 +871,10 @@ func defaultKeymap() map[tui.Event][]*action { addEvent(tui.AltKey('b'), actBackwardWord) add(tui.ShiftLeft, actBackwardWord) + add(tui.AltLeft, actBackwardWord) addEvent(tui.AltKey('f'), actForwardWord) add(tui.ShiftRight, actForwardWord) + add(tui.AltRight, actForwardWord) addEvent(tui.AltKey('d'), actKillWord) add(tui.AltBackspace, actBackwardKillWord)