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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sverona
Copy link

@sverona sverona commented May 28, 2022

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.

S. Verona Malone added 2 commits May 28, 2022 15:04
This commit adds the events `NVEnter` and `NVLeave`. The intended use
case is for integration with other plugins such as Goyo.vim.
@sverona
Copy link
Author

sverona commented Jun 24, 2022

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>

@mtwebb
Copy link

mtwebb commented Jun 29, 2022

This is a nice addition. +1

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

Successfully merging this pull request may close these issues.

None yet

2 participants