Skip to content

Commit

Permalink
Bind ALT-/ to toggle-wrap as well
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn committed Jul 6, 2024
1 parent 53d4b90 commit 10e1087
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CHANGELOG
```sh
history | fzf --tac --wrap --bind 'ctrl-/:toggle-wrap' --wrap-sign $'\t'
```
- fzf by default binds `CTRL-/` to `toggle-wrap`
- fzf by default binds `CTRL-/` and `ALT-/` to `toggle-wrap`
- Updated shell integration scripts to leverage line wrap
- CTRL-R binding includes `--wrap-sign $'\t'` to indent wrapped lines
- `kill **` completion uses `--wrap` to show the whole line by default
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ the following key bindings in bash, zsh, and fish.
- `CTRL-R` - Paste the selected command from history onto the command-line
- If you want to see the commands in chronological order, press `CTRL-R`
again which toggles sorting by relevance
- Press `CTRL-/` to toggle line wrapping
- Press `CTRL-/` or `ALT-/` to toggle line wrapping
- Set `FZF_CTRL_R_OPTS` to pass additional options to fzf
```sh
# CTRL-Y to copy the command into clipboard using pbcopy
Expand Down
2 changes: 1 addition & 1 deletion man/man1/fzf.1
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@ A key or an event can be bound to one or more of the following actions.
\fBtoggle\-sort\fR
\fBtoggle\-track\fR (toggle global tracking option (\fB\-\-track\fR))
\fBtoggle\-track\-current\fR (toggle tracking of the current item)
\fBtoggle\-wrap\fR \fIctrl\-/\fR
\fBtoggle\-wrap\fR \fIctrl\-/\fR \fIalt\-/\fR
\fBtoggle+up\fR \fIbtab (shift\-tab)\fR
\fBtrack\-current\fR (track the current item; automatically disabled if focus changes)
\fBtransform(...)\fR (transform states using the output of an external command)
Expand Down
1 change: 1 addition & 0 deletions src/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ func defaultKeymap() map[tui.Event][]*action {
add(tui.CtrlZ, actSigStop)
}
add(tui.CtrlSlash, actToggleWrap)
addEvent(tui.AltKey('/'), actToggleWrap)

addEvent(tui.AltKey('b'), actBackwardWord)
add(tui.ShiftLeft, actBackwardWord)
Expand Down

0 comments on commit 10e1087

Please sign in to comment.