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

Cmd+V support on Mac #428

Closed
2 of 6 tasks
obxhdx opened this issue Dec 11, 2019 · 6 comments
Closed
2 of 6 tasks

Cmd+V support on Mac #428

obxhdx opened this issue Dec 11, 2019 · 6 comments

Comments

@obxhdx
Copy link

obxhdx commented Dec 11, 2019

  • vim or neovim?
    • vim
    • neovim
  • Output of vim --version or nvim --version: v0.4.3
  • Output of :echo has("python"): 0
  • Output of :echo has("python3"): 1
  • Output of :echo &pythondll(only vim, not neovim):
  • Output of :echo &pythonthreedll(only vim, not neovim):
  • Output of :py print(sys.version):
  • Output of :py3 print(sys.version): 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)]
  • Output of :echo g:Lf_Debug_Cmd: rg --no-messages --files --color never
  • Output of :echo g:Lf_FilesFromCache: 1
  • Operating system:
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Configurations related to LeaderF in vimrc:
" Contents from /tmp/minimal.vimrc
let mapleader = " "
call plug#begin('~/.vim/plugins')
Plug 'Yggdroot/LeaderF', { 'do': './install.sh' }
call plug#end()

Describe your question, feature request, or bug.

Leaderf doesn't support Cmd+V for pasting content on its prompt. Given that this is the default shortcut on Mac, it becomes very counter-intuitive for Mac users to have to use CTRL+V only in this case instead.

I tried to use Lf_CommandMap but couldn't get it to map correctly my Cmd+V to CTRL+V.

Note that I can paste normally using Cmd+V in my Vim inside the terminal with no extra configuration. I used other fuzzy finders in the past (fzf, clap) and this always worked with no extra configuration as well.

Steps to reproduce

  1. Call Leaderf file
  2. Press Cmd+V to paste anything on the prompt
  3. See that nothing gets pasted in the Leaderf window
  4. Open some file or simply close Leaderf window without opening anything
  5. See the content you pasted in the buffer that was open

Actual behaviour

leaderf-cmd-v-trimmed

Expected behaviour

Cmd+V behaves just like CTRL+V.

@Yggdroot
Copy link
Owner

This issue is because of vim/vim#5349.

@obxhdx
Copy link
Author

obxhdx commented Dec 12, 2019

Thanks for looking into it! I’m actually using neovim though, in case you wanna open an issue in their repo as well.

@Yggdroot
Copy link
Owner

The issue for neovim: neovim/neovim#11551

@Yggdroot
Copy link
Owner

Yggdroot commented Feb 4, 2020

Close this issue as neovim/neovim#11551 has been closed.

@Yggdroot Yggdroot closed this as completed Feb 4, 2020
@obxhdx
Copy link
Author

obxhdx commented Feb 4, 2020

Sorry but I don't understand why this is a vim/nvim issue, when LeaderF is the only place in the entire terminal environment where Cmd+V doesn't work. This key combo works as expected in iTerm, inside tmux, inside vim, inside nvim, and with other plugins like fzf and Clap. It's literally only inside LeaderF that it doesn't work.

@Yggdroot
Copy link
Owner

Yggdroot commented Feb 5, 2020

Because LeaderF uses getchar() to get the input characters, others do not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants