# HG changeset patch # User Steve Losh # Date 1287617383 14400 # Node ID 9d0c32dd7651eb79b6aee1d5dd921e2792a30db3 # Parent d6cb7a873013d8bee4cd40d9a234f31a7573691c Add folding markers. Sometimes I hate Vim. diff -r d6cb7a873013 -r 9d0c32dd7651 plugin/gundo.vim --- a/plugin/gundo.vim Wed Oct 20 19:14:38 2010 -0400 +++ b/plugin/gundo.vim Wed Oct 20 19:29:43 2010 -0400 @@ -10,23 +10,18 @@ "{{{ Init -if !exists('g:gundo_debug') && (exists('loaded_gundo') || &cp) + +if !exists('g:gundo_debug') && (exists('loaded_gundo') || &cp)"{{{ finish endif - -let loaded_gundo = 1 - -let s:vim_warning_string = "Gundo requires Vim 7.3+" -let s:python_warning_string = "Gundo requires that Vim be compiled with Python 2.4+" +let loaded_gundo = 1"}}} -" Check for Vim required version -if v:version < '703' - echo s:vim_warning_string +if v:version < '703'"{{{ + echo "Gundo requires Vim 7.3+" finish -endif +endif"}}} -" Check for Python support and required version -if has('python') +if has('python')"{{{ let s:has_supported_python = 1 python << ENDPYTHON @@ -38,22 +33,24 @@ " Python version is too old if !s:has_supported_python - echo s:python_warning_string + echo "Gundo requires that Vim be compiled with Python 2.4+" finish endif else " no Python support - echo s:warning_string + echo "Gundo requires that Vim be compiled with Python 2.4+" finish -endif +endif"}}} -if !exists('g:gundo_width') +if !exists('g:gundo_width')"{{{ let g:gundo_width = 45 -endif +endif"}}} + "}}} "{{{ Movement -function! s:GundoMove(direction) + +function! s:GundoMove(direction)"{{{ let start_line = getline('.') " If we're in between two nodes we move by one to get back on track. @@ -86,11 +83,13 @@ let target_line = matchstr(getline("."), '\v\[[0-9]+\]') let target_num = matchstr(target_line, '\v[0-9]+') call s:GundoRenderPreview(target_num) -endfunction +endfunction"}}} + "}}} "{{{ Gundo buffer mappings -function! s:GundoMapGraph() + +function! s:GundoMapGraph()"{{{ nnoremap