Code Monkey home page Code Monkey logo

Comments (10)

yuki-yano avatar yuki-yano commented on June 3, 2024 1

C-u assigns to preview page up by default.
I think C-w is enough in most cases.

from fzf-preview.vim.

yuki-yano avatar yuki-yano commented on June 3, 2024 1

Use g:fzf_preview_preview_key_bindings
Default is 'ctrl-d:preview-page-down,ctrl-u:preview-page-up,?:toggle-preview'

C-w is a general Emacs key binding, so I don't think it needs any documentation.

from fzf-preview.vim.

bpinto avatar bpinto commented on June 3, 2024

I didn't know about C-w I think it's not documented?

Is there a way to remap these commands? I'd prefer to use C-u since that's what I use on all terminal commands, etc.

P.S.: Vim also uses C-b and C-f for page up and down.

[Control][b] - Move back one full screen
[Control][f] - Move forward one full screen
[Control][d] - Move forward 1/2 screen
[Control][u] - Move back (up) 1/2 screen

from fzf-preview.vim.

bpinto avatar bpinto commented on June 3, 2024

Thanks 👍

I've never used emacs, only vim. So when it comes to other keybindings I'm only used to readline keybindings which is used by many shells, and there C-x removes last word and C-u removes everything until the beginning of the line.

from fzf-preview.vim.

bpinto avatar bpinto commented on June 3, 2024

Adding information for anyone else reading this issue.


By default fzf maps ctrl-u to clear text until the beginning of line, so to get this behaviour inside fzf-preview.vim window all one needs to do is to remove the overriding binding:

default: let g:fzf_preview_preview_key_bindings = 'ctrl-d:preview-page-down,ctrl-u:preview-page-up,?:toggle-preview'

final: let g:fzf_preview_preview_key_bindings = 'ctrl-d:preview-page-down,?:toggle-preview'

from fzf-preview.vim.

phongvcao avatar phongvcao commented on June 3, 2024

@bpinto @yuki-ycino the above trick didn't work for me for some reasons. Just removing <C-u> from g:fzf_preview_preview_key_bindings just doesn't work for me.

from fzf-preview.vim.

yuki-yano avatar yuki-yano commented on June 3, 2024

A recent update should have made it work well.
Please update the plugin and give it a try.
#174

from fzf-preview.vim.

phongvcao avatar phongvcao commented on June 3, 2024

@yuki-ycino which recent update are you talking about? I tried updating the plugin using PlugUpdate! (vim-plug) but nothing was updated, and <C-u> to clear binding still doesn't work.

from fzf-preview.vim.

yuki-yano avatar yuki-yano commented on June 3, 2024

It works fine when I try the minimum configuration in my environment.
I don't know much about vim-plug, but try a complete reinstallation of the plugin, etc.

If you are using coc extensions, you can use the coc command to update them.

call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'yuki-ycino/fzf-preview.vim', { 'branch': 'release', 'do': ':UpdateRemotePlugins' }
call plug#end()

let g:fzf_preview_preview_key_bindings = 'ctrl-d:preview-page-down,?:toggle-preview'

Kapture 2020-09-20 at 19 42 53 2020-09-20 19_46_25

from fzf-preview.vim.

phongvcao avatar phongvcao commented on June 3, 2024

Ok I see. I upgraded fzf-preview.vim and now everything works. Thanks @yuki-ycino

from fzf-preview.vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.