" ============================================================================ " File: mundo.vim " Description: vim global plugin to visualize your undo tree " Maintainer: Hyeon Kim " 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. " " ============================================================================ "{{{ Init let s:save_cpo = &cpo set cpo&vim if v:version < '703'"{{{ function! s:MundoDidNotLoad() echohl WarningMsg|echomsg "Mundo unavailable: requires Vim 7.3+"|echohl None endfunction command! -nargs=0 MundoToggle call s:MundoDidNotLoad() finish endif"}}} call mundo#util#init() let s:has_supported_python = 0 if g:mundo_prefer_python3 && has('python3')"{{{ let s:has_supported_python = 2 elseif has('python')" let s:has_supported_python = 1 endif if !s:has_supported_python function! s:MundoDidNotLoad() echohl WarningMsg|echomsg "Mundo requires Vim to be compiled with Python 2.4+"|echohl None endfunction command! -nargs=0 MundoToggle call s:MundoDidNotLoad() finish endif"}}} let s:plugin_path = escape(expand(':p:h'), '\') "}}} "{{{ Mundo utility functions function! s:MundoGoToWindowForBufferName(name)"{{{ if bufwinnr(bufnr(a:name)) != -1 exe bufwinnr(bufnr(a:name)) . "wincmd w" return 1 else return 0 endif endfunction"}}} function! s:MundoIsVisible()"{{{ if bufwinnr(bufnr("__Mundo__")) != -1 || bufwinnr(bufnr("__Mundo_Preview__")) != -1 return 1 else return 0 endif endfunction"}}} function! s:MundoInlineHelpLength()"{{{ if g:mundo_help return 10 else return 0 endif endfunction"}}} "}}} "{{{ Mundo buffer settings function! s:MundoMapGraph()"{{{ exec 'nnoremap