Unicode completion plugin.
[profile.git] / .vim / script / p4
index 404d80d..4badc84 100644 (file)
@@ -49,6 +49,14 @@ fun! P4submit()
         set bufhidden=hide
         setlocal noswapfile
         file [p4 diff\]
+        " Map q to quit easily.
+        nnoremap <silent> <buffer> q <C-W>q
+
+        " Vim 7.4 really doesn't want us to quit windows from a script.
+        try
+          au QuitPre * qa!
+        catch
+        endtry
 
         " Switch back to the top window and put the cursor by the description.
         wincmd k
@@ -56,6 +64,12 @@ fun! P4submit()
         normal G
         ?^Description:
         let @/ = ""
+        normal j
+        normal ^
+
+        " Set formatting.
+        se noexpandtab
+        se ts=8
       endif
     catch
       " We get here if no blurb was deleted.  This is the case if we aren't