simnalamburt / vim-mundo

:christmas_tree: Vim undo tree visualizer

Home Page:https://simnalamburt.github.io/vim-mundo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesnt work if also have animate and lens plugins

thepenguinthatwants opened this issue · comments

Hi!
For some reasons with these plugins

Plug 'camspiers/animate.vim'
Plug 'camspiers/lens.vim'

mundo cant choose other objects and it just when pressing j it randomly jumps into other buffers.

Thank you for the report and I successfully reproduced the problem.

Well... I don't know the detail of implementation of animate.vim and lens.vim. But this is my theory.

  • Animate.vim and Lens.vim want to resize "current" buffer
  • Everytime you type j key in Mundo, it updates editor buffer, mundo preview buffer, and mundo buffer simultaneously. Well, it changes what "current" buffer is quite a lot.
  • But animate.vim and lens.vim have no idea that "current" buffer has been changed by other plugins. So they randomly change the many buffers' size and focus.

If this theory is correct, I believe this is an issue of animate.vim or lens.vim, not vim-mundo. How do you think?

Yeah you are right! Its certainly not a problem of this plugin. Mundo has always being very nice plugin.

Its just that I was suprised for it to affect mundo.

@thepenguinthatwants Well this is just a theory, and there is a chance that Mundo actually has a problem. 😅 I don't know how to do it yet but maybe vim-mundo can workaround this problem without changing animate.vim or lens.vim

Please let me know if it there is an actual issue of vim-mundo, or if you find out how to workaround this problem. Thanks!

commented

you can disable lens.vim for specific filetypes, namely Mundo and MundoDiff, with the
g:lens#disabled_filetypes options. i.e.

let g:lens#disabled_filetypes = ['Mundo', 'MundoDiff']

you can determine a buffer's filetype with the command :set ft?.

it seems there was a problem with lens.vim and animate.vim after all and setting this option does not functin as expected unless animate.vim is disabled. see issue #12 from lens.vim. you can resolve the issue by plugging a fork by ipod825, who has also implemented a seperate resizing plugin based on user defined rules. you might also apply the diff manually as it just a few lines.

lens.vim also supplies an option to disable the plugin, as well as a toggling function which may also be of interest.

let g:lens#disabled = 1
function! lens#toggle() abort