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

After setup callback #60

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

Conversation

iamFIREcracker
Copy link

This PR adds support for a user defined function that yankstack will run after the initial setup.

I recently switched from pathogen to Vim's built-in support for plugins, and noticed that calling yankstack#setup() to get custom mappings set up did not work anymore; it turns out I have to throw a packloadall somewhere in my vimrc, but that breaks other things.

So I thought: why not let the user know when the initial setup is complete? I could then add the following to my vimrc, and call it a day:

function! YankStackAfterSetup()
    nmap Y y$
    nmap D d$
    nmap gp <Plug>yankstack_substitute_older_paste
    nmap gP <Plug>yankstack_substitute_newer_paste
endfunction

let g:yankstack_after_setup = 'YankStackAfterSetup'

What do you think about that? Can you think of a better way to solve this?

Ciao,
Matteo

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

1 participant