m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 08:13:40 -05:00

Bind CTRL-/ and ALT-/ to toggle-wrap by default

This commit is contained in:
Junegunn Choi
2024-07-06 14:10:02 +09:00
parent 8ff4e52641
commit 3b2e932c13
7 changed files with 18 additions and 16 deletions

View File

@@ -464,13 +464,11 @@ 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-/` or `ALT-/` to toggle line wrapping
- Set `FZF_CTRL_R_OPTS` to pass additional options to fzf
```sh
# CTRL-/ to toggle small preview window to see the full command
# CTRL-Y to copy the command into clipboard using pbcopy
export FZF_CTRL_R_OPTS="
--preview 'echo {}' --preview-window up:3:hidden:wrap
--bind 'ctrl-/:toggle-preview'
--bind 'ctrl-y:execute-silent(echo -n {2..} | pbcopy)+abort'
--color header:italic
--header 'Press CTRL-Y to copy command into clipboard'"