notational-fzf-vim icon indicating copy to clipboard operation
notational-fzf-vim copied to clipboard

Add pre- and post-hooks for integration with other plugins

Open avkliskova opened this issue 2 years ago • 2 comments

This PR adds two events User#NVEnter and User#NVLeave to enable integration with other plugins such as junegunn/goyo.vim and junegunn/limelight.vim.

avkliskova avatar May 28 '22 19:05 avkliskova

I received an email asking for more information on wiring this plugin and Goyo together, so I'll reproduce here some of my .vimrc.

call plug#begin()
" Writing
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'https://github.com/sverona/notational-fzf-vim', { 'branch': 'pre-post-hook' }
" ...
call plug#end()

autocmd! User NVLeave Goyo
autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!

" ...
let mapleader = '\'

nnoremap <leader>z :NV<CR>

avkliskova avatar Jun 24 '22 18:06 avkliskova

This is a nice addition. +1

mtwebb avatar Jun 29 '22 04:06 mtwebb