Skip to content

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.

1 participant