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

vim / nvim plugin #13

Open
pschmitt opened this issue Jun 5, 2020 · 2 comments
Open

vim / nvim plugin #13

pschmitt opened this issue Jun 5, 2020 · 2 comments

Comments

@pschmitt
Copy link
Contributor

pschmitt commented Jun 5, 2020

Hey I managed to get emoji-fzf working in vim and I wanted to share my quick and dirty setup.
If I find the time & motivation I'll implement a propper vim plugin.

The following binds Ctrl-K to open emoji-fzf to complete the current word (it will replace it with the emoji).

Example workflow:

  • in insert mode
  • type ambul<Ctrl-K>
  • hit Enter
  • ambul get replaced with 🚑
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'

" emoji-fzf
inoremap <expr> <c-k> fzf#vim#complete(fzf#wrap({
  \ 'source':  'emoji-fzf preview --prepend',
  \ 'options': '--header "Emoji Selection" --no-hscroll',
  \ 'reducer': { lines -> split(lines[0])[0] } }))
@pschmitt
Copy link
Contributor Author

pschmitt commented Jun 5, 2020

Aha. I just noticed you did something similar @noahp while going through the readme.

@noahp
Copy link
Owner

noahp commented Jun 6, 2020

Nice, I like your approach!

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