Close#669
You can use your mouse or binadble preview-up and preview-down actions
to scroll the content of the preview window.
fzf --preview 'highlight -O ansi {}' --bind alt-j:preview-down,alt-k:preview-up
- Make structs smaller
- Introduce Result struct and use it to represent matched items instead of
reusing Item struct for that purpose
- Avoid unnecessary memory allocation
- Avoid growing slice from the initial capacity
- Code cleanup
- Slightly more efficient processing of Options
- Do not return reference type arguments that are mutated inside the
function
- Use util.Constrain function when appropriate
Related: #452
When `--multi` is set, tab key will bring your cursor down, and
shift-tab up. But since fzf by default draws the screen in bottom-up
fashion, one may feel that the opposite of the behavior is more
desirable and choose to customize the key bindings as follows.
export FZF_DEFAULT_OPTS="--bind tab:toggle-up,shift-tab:toggle-down"
This configuration, however, becomes no longer straightforward when
`--reverse` is set and fzf switches to top-down layout. To address the
requirement, this commit adds `toggle-in` and `toggle-out` option which
switch direction depending on `--reverse`-ness.
export FZF_DEFAULT_OPTS="--bind tab:toggle-out,shift-tab:toggle-in"
`--null` is ambiguous. For completeness' sake, we need both `--read0`
and `--print0`.
`--read0` only makes sense when the input contains multiline entries.
However, fzf currently cannot correctly display multiline entries,
I'm going to make `--read0` an undocumented feature.
This can be used to avoid parse errors that can happen when the command
contains the closing character. Since the command does not finish at
a certain character, the key binding should be the last one in the
group. Suggested by @tiziano88. (#265)
e.g. fzf --bind "ctrl-m:execute=COMMAND..." --bind ctrl-j:accept