4427cda8108c

Add a configuration var to open Gundo on the right.

You people are insane.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 20 Oct 2010 19:51:09 -0400
parents a9beb6c8a1dd
children aa431c484c03
branches/tags (none)
files plugin/gundo.vim

Changes

--- a/plugin/gundo.vim	Wed Oct 20 19:46:37 2010 -0400
+++ b/plugin/gundo.vim	Wed Oct 20 19:51:09 2010 -0400
@@ -45,10 +45,12 @@
 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_right')"{{{
+    let g:gundo_right = 0
+endif"}}}
 
 "}}}
 
@@ -194,7 +196,12 @@
 
     if existing_preview_buffer == -1
         exe "vnew __Gundo_Preview__"
-        wincmd H
+
+        if g:gundo_right
+            wincmd L
+        else
+            wincmd H
+        endif
     else
         let existing_preview_window = bufwinnr(existing_preview_buffer)
 
@@ -204,7 +211,12 @@
             endif
         else
             exe "vsplit +buffer" . existing_preview_buffer
-            wincmd H
+
+            if g:gundo_right
+                wincmd L
+            else
+                wincmd H
+            endif
         endif
     endif
 endfunction"}}}