m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-20 01:23:43 -05:00

Add preview window option for setting the initial scroll offset

Close #1057
Close #2120

  # Initial scroll offset is set to the line number of each line of
  # git grep output *minus* 5 lines
  git grep --line-number '' |
    fzf --delimiter : --preview 'nl {1}' --preview-window +{2}-5
This commit is contained in:
Junegunn Choi
2020-07-27 00:15:25 +09:00
parent c0a83b27eb
commit 0f9cb5590e
5 changed files with 97 additions and 17 deletions

View File

@@ -26,6 +26,13 @@ CHANGELOG
# Preview window hidden by default, it appears when you first hit '?'
fzf --bind '?:preview:cat {}' --preview-window hidden
```
- Added preview window option for setting the initial scroll offset
```sh
# Initial scroll offset is set to the line number of each line of
# git grep output *minus* 5 lines
git grep --line-number '' |
fzf --delimiter : --preview 'nl {1}' --preview-window +{2}-5
```
- Added support for ANSI colors in `--prompt` string
- Vim plugin
- `tmux` layout option for using fzf-tmux