diff --git a/plugin/gundo.vim b/plugin/gundo.vim index ad615b8..93fa7d6 100644 --- a/plugin/gundo.vim +++ b/plugin/gundo.vim @@ -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 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+" - -" 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 @@ ENDPYTHON " 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 @@ function! s:GundoMove(direction) 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