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

Other options to revert contents of change?

thepenguinthatwants opened this issue · comments

Pressing return on a state (or double clicking on it) will revert the contents of the file to match that state.

Seems like I've mapped return on something else as this doesnt work. Does double click mean clicking by mouse? Is there any way to map revert content to U or something?

@thepenguinthatwants You can change the Mundo keymap with g:mundo_mappings option. :) Thank you for using Mundo!

vim-mundo/doc/mundo.txt

Lines 192 to 209 in 046fc06

3.7 g:mundo_mappings *mundo_mappings*
*mundo_map_move_older*
*mundo_map_move_newer*
*mundo_map_up_down*
To override any mappings within mundo set the value of the normal mode keys you
would like to use instead (copy the defaults below and adjust as preferred)
Note: mundo_map_move_older, mundo_map_move_newer, mundo_map_up_down options have
been deprecated in favor of settings here. Although they continue to work, they
will eventually be removed!
Defaults:
let g:mundo_mappings = {
\ '<CR>': 'preview',
\ 'o': 'preview',
\ 'j': 'move_older',

let g:mundo_mappings = {
\ '': 'preview',
\ 'o': 'preview',
\ 'j': 'move_older',
}

When I added this line on my vimrc I've got

E723: Missing end of Dictionary '}':
E15: Invalid expression: { '<CR>': 'preview', 'o': 'preview', 'j': 'move_older',
line    9:
E492: Not an editor command:  }
line    8:
E723: Missing end of Dictionary '}':
E15: Invalid expression: { '<CR>': 'preview', 'o': 'preview', 'j': 'move_older',
line    9:
E492: Not an editor command:  }

@thepenguinthatwants Remove the trailing comma like this:

let g:mundo_mappings = {
  \ '': 'preview',
  \ 'o': 'preview',
  \ 'j': 'move_older'}

I tried it and it works perfect!