JIe
2bb7059579
Some checks failed
Detach Plugins / check (FlyGrep.vim) (push) Has been cancelled
Detach Plugins / check (GitHub.vim) (push) Has been cancelled
Detach Plugins / check (JavaUnit.vim) (push) Has been cancelled
Detach Plugins / check (SourceCounter.vim) (push) Has been cancelled
Detach Plugins / check (cpicker.nvim) (push) Has been cancelled
Detach Plugins / check (dein-ui.vim) (push) Has been cancelled
Detach Plugins / check (git.vim) (push) Has been cancelled
Detach Plugins / check (iedit.vim) (push) Has been cancelled
Detach Plugins / check (scrollbar.vim) (push) Has been cancelled
Detach Plugins / check (vim-chat) (push) Has been cancelled
Detach Plugins / check (vim-cheat) (push) Has been cancelled
Detach Plugins / check (vim-todo) (push) Has been cancelled
Detach Plugins / check (xmake.vim) (push) Has been cancelled
test / Linux (nvim, nightly) (push) Has been cancelled
test / Linux (nvim, v0.3.8) (push) Has been cancelled
test / Linux (nvim, v0.4.0) (push) Has been cancelled
test / Linux (nvim, v0.4.2) (push) Has been cancelled
test / Linux (nvim, v0.4.3) (push) Has been cancelled
test / Linux (nvim, v0.4.4) (push) Has been cancelled
test / Linux (nvim, v0.5.0) (push) Has been cancelled
test / Linux (nvim, v0.5.1) (push) Has been cancelled
test / Linux (nvim, v0.6.0) (push) Has been cancelled
test / Linux (nvim, v0.6.1) (push) Has been cancelled
test / Linux (nvim, v0.7.0) (push) Has been cancelled
test / Linux (nvim, v0.7.2) (push) Has been cancelled
test / Linux (nvim, v0.8.0) (push) Has been cancelled
test / Linux (nvim, v0.8.1) (push) Has been cancelled
test / Linux (nvim, v0.8.2) (push) Has been cancelled
test / Linux (nvim, v0.8.3) (push) Has been cancelled
test / Linux (nvim, v0.9.0) (push) Has been cancelled
test / Linux (nvim, v0.9.1) (push) Has been cancelled
test / Linux (true, vim, v7.4.052) (push) Has been cancelled
test / Linux (true, vim, v7.4.1689) (push) Has been cancelled
test / Linux (true, vim, v7.4.629) (push) Has been cancelled
test / Linux (true, vim, v8.0.0027) (push) Has been cancelled
test / Linux (true, vim, v8.0.0183) (push) Has been cancelled
test / Linux (vim, nightly) (push) Has been cancelled
test / Linux (vim, v8.0.0184) (push) Has been cancelled
test / Linux (vim, v8.0.1453) (push) Has been cancelled
test / Linux (vim, v8.1.2269) (push) Has been cancelled
test / Linux (vim, v8.2.2434) (push) Has been cancelled
test / Linux (vim, v8.2.3995) (push) Has been cancelled
test / Windows (nvim, nightly) (push) Has been cancelled
test / Windows (nvim, v0.3.8) (push) Has been cancelled
test / Windows (nvim, v0.4.2) (push) Has been cancelled
test / Windows (nvim, v0.4.3) (push) Has been cancelled
test / Windows (nvim, v0.4.4) (push) Has been cancelled
test / Windows (nvim, v0.5.0) (push) Has been cancelled
test / Windows (nvim, v0.5.1) (push) Has been cancelled
test / Windows (nvim, v0.6.0) (push) Has been cancelled
test / Windows (nvim, v0.6.1) (push) Has been cancelled
test / Windows (nvim, v0.7.0) (push) Has been cancelled
test / Windows (nvim, v0.7.2) (push) Has been cancelled
test / Windows (nvim, v0.8.0) (push) Has been cancelled
test / Windows (nvim, v0.8.1) (push) Has been cancelled
test / Windows (nvim, v0.8.2) (push) Has been cancelled
test / Windows (nvim, v0.8.3) (push) Has been cancelled
test / Windows (nvim, v0.9.0) (push) Has been cancelled
test / Windows (nvim, v0.9.1) (push) Has been cancelled
test / Windows (vim, nightly) (push) Has been cancelled
test / Windows (vim, v7.4.1185) (push) Has been cancelled
test / Windows (vim, v7.4.1689) (push) Has been cancelled
test / Windows (vim, v8.0.0027) (push) Has been cancelled
test / Windows (vim, v8.0.1453) (push) Has been cancelled
test / Windows (vim, v8.1.2269) (push) Has been cancelled
test / Windows (vim, v8.2.2434) (push) Has been cancelled
test / Windows (vim, v8.2.3995) (push) Has been cancelled
docker / docker (push) Has been cancelled
mirror / check (coding) (push) Has been cancelled
mirror / check (gitee) (push) Has been cancelled
mirror / check (gitlab) (push) Has been cancelled
141 lines
4.3 KiB
VimL
141 lines
4.3 KiB
VimL
" ============================================================================
|
|
" File: mundo.vim
|
|
" Description: vim global plugin to visualize your undo tree
|
|
" Maintainer: Hyeon Kim <simnalamburt@gmail.com>
|
|
" License: GPLv2+ -- look it up.
|
|
" Notes: Much of this code was thiefed from Mercurial, and the rest was
|
|
" heavily inspired by scratch.vim and histwin.vim.
|
|
"
|
|
" ============================================================================
|
|
|
|
if !exists('g:mundo_debug') && (exists('g:mundo_disable') &&
|
|
\ g:mundo_disable == 1 || exists('loaded_mundo') || &cp)"{{{
|
|
finish
|
|
endif
|
|
|
|
let loaded_mundo = 1"}}}
|
|
|
|
" Default option values{{{
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_auto_preview', 1,
|
|
\ 'g:gundo_auto_preview')
|
|
|
|
call mundo#util#set_default('g:mundo_auto_preview_delay', 250)
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_close_on_revert', 0,
|
|
\ 'g:gundo_close_on_revert')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_first_visible_line', 0,
|
|
\ 'g:gundo_first_visible_line')
|
|
|
|
call mundo#util#set_default('g:mundo_header', 1)
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_help', 0,
|
|
\ 'g:gundo_help')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_inline_undo', 0,
|
|
\ 'g:gundo_inline_undo')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_last_visible_line', 0,
|
|
\ 'g:gundo_last_visible_line')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_map_move_newer', 'k',
|
|
\ 'g:gundo_map_move_newer')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_map_move_older', 'j',
|
|
\ 'g:gundo_map_move_older')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_map_up_down', 1,
|
|
\ 'g:gundo_map_up_down')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_mirror_graph', 0,
|
|
\ 'g:gundo_mirror_graph')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_playback_delay', 60,
|
|
\ 'g:gundo_playback_delay')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_prefer_python3', 0,
|
|
\ 'g:gundo_prefer_python3')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_preview_bottom', 0,
|
|
\ 'g:gundo_preview_bottom')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_preview_height', 15,
|
|
\ 'g:gundo_preview_height')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_python_path_setup', 0,
|
|
\ 'g:gundo_python_path_setup')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_return_on_revert', 1,
|
|
\ 'g:gundo_return_on_revert')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_right', 0,
|
|
\ 'g:gundo_right')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_verbose_graph', 1,
|
|
\ 'g:gundo_verbose_graph')
|
|
|
|
call mundo#util#set_default(
|
|
\ 'g:mundo_width', 45,
|
|
\ 'g:gundo_width')
|
|
|
|
" Set up the default mappings, unless a g:mundo_mappings has already been
|
|
" provided
|
|
if mundo#util#set_default('g:mundo_mappings', {})
|
|
let g:mundo_mappings = {
|
|
\ '<CR>': 'preview',
|
|
\ 'o': 'preview',
|
|
\ 'J': 'move_older_write',
|
|
\ 'K': 'move_newer_write',
|
|
\ 'gg': 'move_top',
|
|
\ 'G': 'move_bottom',
|
|
\ 'P': 'play_to',
|
|
\ 'd': 'diff',
|
|
\ 'i': 'toggle_inline',
|
|
\ '/': 'search',
|
|
\ 'n': 'next_match',
|
|
\ 'N': 'previous_match',
|
|
\ 'p': 'diff_current_buffer',
|
|
\ 'r': 'diff',
|
|
\ '?': 'toggle_help',
|
|
\ 'q': 'quit',
|
|
\ '<2-LeftMouse>': 'mouse_click' }
|
|
let g:mundo_mappings[g:mundo_map_move_older] = 'move_older'
|
|
let g:mundo_mappings[g:mundo_map_move_newer] = 'move_newer'
|
|
if g:mundo_map_up_down
|
|
let g:mundo_mappings['<down>'] = 'move_older'
|
|
let g:mundo_mappings['<up>'] = 'move_newer'
|
|
endif
|
|
endif
|
|
"}}}
|
|
|
|
"{{{ Create commands
|
|
|
|
command! -nargs=0 MundoToggle call mundo#MundoToggle()
|
|
command! -nargs=0 MundoShow call mundo#MundoShow()
|
|
command! -nargs=0 MundoHide call mundo#MundoHide()
|
|
command! -nargs=0 GundoToggle call mundo#util#MundoToggle()
|
|
command! -nargs=0 GundoShow call mundo#util#MundoShow()
|
|
command! -nargs=0 GundoHide call mundo#util#MundoHide()
|
|
command! -nargs=0 GundoRenderGraph call mundo#util#MundoRenderGraph()
|
|
|
|
"}}}
|