-
Notifications
You must be signed in to change notification settings - Fork 36
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
g:fzf_preview_preview_key_bindings not working #174
Comments
It certainly doesn't seem to be working. |
yes I can wait. |
I was able to fix it sooner than expected. Please check. |
so when I set my call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'ryanoasis/vim-devicons'
call plug#end()
let g:coc_global_extensions = ['coc-fzf-preview']
let g:fzf_preview_preview_key_bindings = 'ctrl-k:preview-up,ctrl-j:preview-down,?:toggle-preview' then Ctrl-J works, but Ctrl-K doesn't work for some reasons (it does scroll up, but it only scrolls up for like 5-10 lines before the current line, not scrolling up for forever. In contrast, Ctrl-J can literally scroll down very far. |
Ok so you can try my config, and then do this:
The ability to scroll up till the first line is important, as most functions in my code are longer than 5-10 lines. Hence it would be great if the codes 20-30 lines above the searched result line can be seen. To illustrate my point, this is what I did & how far I can scroll up (only 5-10 lines above the search result line and the scroll stops): |
The fzf preview cannot show the result of scrolling. You can change grep's preview script to show the entire file, but it will start at the beginning of the file. |
How exactly do I do this? Is there a way I can specify this via an option (e.g. g:fzf_preview_*?). Is it possible to have an option that center the matched result line in the preview screen, or let users customize how many lines above the matched result line? |
You can set it up with |
ok thanks Yuki I'll look into it. |
Problems summary
g:fzf_preview_preview_key_bindings
not working. The keybindings weren't helping me scrolling in the preview buffer of fzf-preview.vim. My same keybindings worked fine using original FZF's default preview mode.Environment Information
fzf-preview version (package.json): 0.4.9
OS: macOS Catalina 10.15.5 19F101 x86_64
Vim/Neovim version:
Provide a minimal init.vim
The text was updated successfully, but these errors were encountered: