Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add action preview-half-page-down #2145

Merged
merged 2 commits into from
Oct 5, 2020

Conversation

tinmarino
Copy link
Contributor

@tinmarino tinmarino commented Aug 16, 2020

Hi @junegunn,
Awesome command. It took me one week-end to learn but I can jump anywhere.

I would personally like to jump half screen in the preview window (like ctrl-d in vim), actually I map it to alt-d.
This PR does not change the default behavior.


Well it's just like jumping a full screen divided by two but to follow french courtesy, I join a screencast where I 1/2 press alt-d and then ald-u

fzf_cut1

@tinmarino
Copy link
Contributor Author

tinmarino commented Aug 16, 2020

Here after myconf to edit any file look for files all is from your dense README execpt the bash -c trick to combine outputs that is from an issue.

  fzf_cmds=(bash -c "
    vi -NEs +'redir>>/dev/stdout | packadd fzf.vim'
            +'echo join(fzf#vim#_recent_files(), \"\\n\")'
            +'redir END | q'
    rg --color never --files \".\";
    rg --color never --files \"$HOME\";
    rg --color never --files \"$v\";")
  export FZF_DEFAULT_COMMAND="${fzf_cmds[*]}"
  fzf_opts=(
    # Enable exact match
    #--exact
    # Multi Selection
    --multi
    --reverse
    "--preview-window=right:60%" --height 100%
    --preview \"bat "--style=numbers" "--color=always" --line-range :500 {}\"
    --bind ?:toggle-preview
    --bind ctrl-space:toggle-preview
    --bind ctrl-j:down
    --bind ctrl-k:up
    --bind ctrl-u:half-page-up
    --bind ctrl-d:half-page-down
    --bind ctrl-s:toggle-sort
    --bind alt-u:preview-half-page-up
    --bind alt-d:preview-half-page-down
    #--bind ctrl-y:preview-up
    #--bind ctrl-e:preview-down
  )
  export FZF_DEFAULT_OPTS="${fzf_opts[*]}"

Anyway, thanks for the great plugin.

@phongvcao
Copy link

+1. I need this feature.

@junegunn junegunn merged commit c0aa5a4 into junegunn:master Oct 5, 2020
@junegunn
Copy link
Owner

junegunn commented Oct 5, 2020

Merged, thanks!

@tinmarino
Copy link
Contributor Author

Thank you @junegunn : awesome software!

@rayiik
Copy link

rayiik commented Oct 6, 2020

Yes thank you I will be loving this feature as well.

kralicky pushed a commit to kralicky/fzf that referenced this pull request Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants