farmergreg/vim-lastplace

global disable or add check for vimdiff

mckellyln opened this issue · 2 comments

I would like to use vim-lastplace, but want to disable this for vimdiff.
I could disable it with code like:

if &diff
    let g:lastplace_disable = "on"
endif

in my .vimrc, if we had such a global disable var. Do you think there is another way ?
Thank you for vim-lastplace.

Hi @mckellyln, glad you like my plugin!

vim-lastplace already has a disable feature. Try this:

if &diff
    let b:loaded_lastplace_plugin = 1
endif

I may add a setting to turn it off and on in diff files. Can you explain your use case so I can see if I can add it as a feature?

ok, thanks. Yes this works great!

Unrelated note - should/could you use keepjumps in the execute normal lines to not add to jumplist ?