From 2e4921876d9722204634332c9b506ab3a028ebdf Mon Sep 17 00:00:00 2001 From: gryf Date: Mon, 1 Aug 2011 22:17:43 +0200 Subject: [PATCH] Update of plugins DirDiff, gundo and buffergator, update colorscheme lucius. --- GetLatest/GetLatestVimScripts.dat | 8 +- autoload/gundo.vim | 407 +++++++++++++++++ colors/lucius.vim | 704 +++++++----------------------- doc/gundo.txt | 2 + plugin/DirDiff.vim | 42 +- plugin/buffergator.vim | 2 +- plugin/gundo.py | 15 +- 7 files changed, 621 insertions(+), 559 deletions(-) create mode 100644 autoload/gundo.vim diff --git a/GetLatest/GetLatestVimScripts.dat b/GetLatest/GetLatestVimScripts.dat index f01d7ac..6d860b1 100644 --- a/GetLatest/GetLatestVimScripts.dat +++ b/GetLatest/GetLatestVimScripts.dat @@ -1,11 +1,11 @@ ScriptID SourceID Filename -------------------------- ### plugins -3619 16002 buffergator -102 13435 DirDiff.vim +3619 16041 buffergator +102 16171 DirDiff.vim 1984 13961 :AutoInstall: FuzzyFinder 311 7645 grep.vim -3304 15996 gundo.vim +3304 16172 gundo.vim 2727 11120 jsbeautify.vim 3252 13948 :AutoInstall: L9 2289 8922 loremipsum @@ -25,7 +25,7 @@ ScriptID SourceID Filename 2855 12456 github.vim 1143 11833 inkpot.vim 2555 15432 jellybeans.vim -2536 15197 lucius.vim +2536 16179 lucius.vim 3299 14475 sorcerer.vim 1165 3741 tolerable.vim 3309 15759 vydark diff --git a/autoload/gundo.vim b/autoload/gundo.vim new file mode 100644 index 0000000..1b5de02 --- /dev/null +++ b/autoload/gundo.vim @@ -0,0 +1,407 @@ +" ============================================================================ +" File: gundo.vim +" Description: vim global plugin to visualize your undo tree +" Maintainer: Steve Losh +" 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 + +if v:version < '703'"{{{ + function! s:GundoDidNotLoad() + echohl WarningMsg|echomsg "Gundo unavailable: requires Vim 7.3+"|echohl None + endfunction + command! -nargs=0 GundoToggle call s:GundoDidNotLoad() + finish +endif"}}} + +if has('python')"{{{ + let s:has_supported_python = 1 +else + let s:has_supported_python = 0 +endif + +if !s:has_supported_python + function! s:GundoDidNotLoad() + echohl WarningMsg|echomsg "Gundo requires Vim to be compiled with Python 2.4+"|echohl None + endfunction + command! -nargs=0 GundoToggle call s:GundoDidNotLoad() + finish +endif"}}} + +let s:plugin_path = escape(expand(':p:h'), '\') + +if !exists('g:gundo_width')"{{{ + let g:gundo_width = 45 +endif"}}} +if !exists('g:gundo_preview_height')"{{{ + let g:gundo_preview_height = 15 +endif"}}} +if !exists('g:gundo_preview_bottom')"{{{ + let g:gundo_preview_bottom = 0 +endif"}}} +if !exists('g:gundo_right')"{{{ + let g:gundo_right = 0 +endif"}}} +if !exists('g:gundo_help')"{{{ + let g:gundo_help = 1 +endif"}}} +if !exists("g:gundo_map_move_older")"{{{ + let g:gundo_map_move_older = 'j' +endif"}}} +if !exists("g:gundo_map_move_newer")"{{{ + let g:gundo_map_move_newer = 'k' +endif"}}} +if !exists("g:gundo_close_on_revert")"{{{ + let g:gundo_close_on_revert = 0 +endif"}}} + +"}}} + +"{{{ Gundo utility functions + +function! s:GundoGetTargetState()"{{{ + let target_line = matchstr(getline("."), '\v\[[0-9]+\]') + return matchstr(target_line, '\v[0-9]+') +endfunction"}}} + +function! s:GundoGoToWindowForBufferName(name)"{{{ + if bufwinnr(bufnr(a:name)) != -1 + exe bufwinnr(bufnr(a:name)) . "wincmd w" + return 1 + else + return 0 + endif +endfunction"}}} + +function! s:GundoIsVisible()"{{{ + if bufwinnr(bufnr("__Gundo__")) != -1 || bufwinnr(bufnr("__Gundo_Preview__")) != -1 + return 1 + else + return 0 + endif +endfunction"}}} + +function! s:GundoInlineHelpLength()"{{{ + if g:gundo_help + return 6 + else + return 0 + endif +endfunction"}}} + +"}}} + +"{{{ Gundo buffer settings + +function! s:GundoMapGraph()"{{{ + exec 'nnoremap