r849 - in /trunk/packages/vim-scripts: autoload/ debian/ doc/ plugin/

zack at users.alioth.debian.org zack at users.alioth.debian.org
Wed Jan 17 18:52:49 UTC 2007


Author: zack
Date: Wed Jan 17 19:52:49 2007
New Revision: 849

URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=849
Log:
round of script updates

Added:
    trunk/packages/vim-scripts/doc/alternate.txt
Modified:
    trunk/packages/vim-scripts/autoload/Align.vim
    trunk/packages/vim-scripts/debian/changelog
    trunk/packages/vim-scripts/debian/vim-scripts.status
    trunk/packages/vim-scripts/doc/Align.txt
    trunk/packages/vim-scripts/doc/bufexplorer.txt
    trunk/packages/vim-scripts/doc/project.txt
    trunk/packages/vim-scripts/doc/vcscommand.txt
    trunk/packages/vim-scripts/plugin/AlignMaps.vim
    trunk/packages/vim-scripts/plugin/AlignPlugin.vim
    trunk/packages/vim-scripts/plugin/NERD_comments.vim
    trunk/packages/vim-scripts/plugin/a.vim
    trunk/packages/vim-scripts/plugin/bufexplorer.vim
    trunk/packages/vim-scripts/plugin/cecutil.vim
    trunk/packages/vim-scripts/plugin/cvsmenu.vim
    trunk/packages/vim-scripts/plugin/project.vim
    trunk/packages/vim-scripts/plugin/vcscommand.vim
    trunk/packages/vim-scripts/plugin/vcscvs.vim
    trunk/packages/vim-scripts/plugin/vcssvn.vim

Modified: trunk/packages/vim-scripts/autoload/Align.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/autoload/Align.vim?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/autoload/Align.vim (original)
+++ trunk/packages/vim-scripts/autoload/Align.vim Wed Jan 17 19:52:49 2007
@@ -1,7 +1,7 @@
 " Align: tool to align multiple fields based on one or more separators
 "   Author:		Charles E. Campbell, Jr.
-"   Date:		Feb 23, 2006
-"   Version:	29d	ASTRO-ONLY
+"   Date:		Jul 19, 2006
+"   Version:	30
 " GetLatestVimScripts: 294 1 :AutoInstall: Align.vim
 " GetLatestVimScripts: 1066 1 cecutil.vim
 " Copyright:    Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@@ -97,7 +97,7 @@
 if exists("g:loaded_align") || &cp
  finish
 endif
-let g:loaded_align = "v29d"
+let g:loaded_align = "v30"
 let s:keepcpo      = &cpo
 set cpo&vim
 

Modified: trunk/packages/vim-scripts/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/changelog?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/changelog (original)
+++ trunk/packages/vim-scripts/debian/changelog Wed Jan 17 19:52:49 2007
@@ -7,11 +7,15 @@
   * debian/vim-registry/
     - added (automatically generated using vim-scripts.pl) vim registry
       entries for the shipped addons
-  * scripts adds/removals/upgrades:
-    - removed scripts:
-      | plugin/Chdir.vim (superseded by the 'autochdir' option)
+  * addons adds/removals/upgrades (from now on, this "section" of the
+    changelog will reference "scripts" as "addon", according to the addon
+    registry entries in debian/vim-registry/):
+    - upgraded addons: alternate, bufexplorer, align, cvsmenu, vcscommand,
+      nerd-commenter, project
+    - removed scripts (removed in this release, so it has never had an addon
+      name): plugin/Chdir.vim (superseded by the 'autochdir' option)
 
- -- Stefano Zacchiroli <zack at debian.org>  Wed, 17 Jan 2007 16:16:46 +0100
+ -- Stefano Zacchiroli <zack at debian.org>  Wed, 17 Jan 2007 19:36:57 +0100
 
 vim-scripts (7-3) unstable; urgency=low
 

Modified: trunk/packages/vim-scripts/debian/vim-scripts.status
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/vim-scripts.status?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/vim-scripts.status (original)
+++ trunk/packages/vim-scripts/debian/vim-scripts.status Wed Jan 17 19:52:49 2007
@@ -22,7 +22,8 @@
 author_url:  http://www.vim.org/account/profile.php?user_id=49
 email:       feline at irendi.com
 license:     license [1], see below
-version:     2.14
+extras:	     doc/alternate.txt
+version:     2.15
 
 script_name: plugin/whatdomain.vim
 addon:	     whatdomain
@@ -43,7 +44,7 @@
 email:       delux256-vim at yahoo dot com
 license:     license [2], see below
 extras:	     doc/bufexplorer.txt
-version:     7.0.11
+version:     7.0.12
 
 script_name: plugin/minibufexpl.vim
 addon:       minibufexplorer
@@ -106,7 +107,7 @@
 email:       drchip at campbellfamily.biz
 license:     GNU GPL, see /usr/share/common-licenses/GPL-2
 extras:	     doc/Align.txt, plugin/AlignMaps.vim, plugin/cecutil.vim, autoload/Align.vim
-version:     29/34
+version:     30/35
 
 script_name: plugin/cvsmenu.vim
 addon:       cvsmenu
@@ -116,7 +117,7 @@
 author_url:  http://www.vim.org/account/profile.php?user_id=6184
 email:       adah at sh163.net
 license:     GNU LGPL, see /usr/share/common-licenses/LGPL-2
-version:     1.124
+version:     1.140
 
 script_name: plugin/vcscommand.vim
 addon:       vcscommand
@@ -127,7 +128,7 @@
 email:       bob.hiestand at gmail.com
 license:     public domain
 extras:	     doc/vcscommand.txt, plugin/vcscvs.vim, plugin/vcssvn.vim, syntax/CVSAnnotate.vim, syntax/SVNAnnotate.vim, plugin/vcscommit.vim
-version:     Beta8
+version:     Beta10
 
 script_name: plugin/utl.vim
 addon:       utl
@@ -230,7 +231,7 @@
 author_url:  http://www.vim.org/account/profile.php?user_id=7006
 email:       mrg39 at student.canterbury.ac.nz
 license:     no license
-version:     1.68
+version:     1.69
 
 script_name: plugin/project.vim
 addon:       project
@@ -241,7 +242,7 @@
 email:       aricvim at charter.net
 license:     no license
 extras:      doc/project.txt
-version:     1.4
+version:     1.4.1
 
 --
 

Modified: trunk/packages/vim-scripts/doc/Align.txt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/doc/Align.txt?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/doc/Align.txt (original)
+++ trunk/packages/vim-scripts/doc/Align.txt Wed Jan 17 19:52:49 2007
@@ -1,4 +1,4 @@
-*align.txt*	The Alignment Tool			Mar 20, 2006
+*align.txt*	The Alignment Tool			Sep 01, 2006
 
 Author:  Charles E. Campbell, Jr.  <NdrOchip at ScampbellPfamily.AbizM>
 	  (remove NOSPAM from Campbell's email first)
@@ -1118,9 +1118,9 @@
 	  <TR><TD> ...field three... </TD><TD> ...field four... </TD></TR>
 <
 ==============================================================================
-4. Alignment Tool History				*align-history*
-
-ALIGN HISTORY
+4. Alignment Tool History				*align-history* {{{1
+
+ALIGN HISTORY						{{{2
 	29 : Jan 18, 2006 * cecutil updated to use keepjumps
 	     Feb 23, 2006 * Align now converted to vim 7.0 style using
 	                    auto-loading functions.
@@ -1173,7 +1173,12 @@
 	                    ignorecase option handled
 	 9 : Jun 25, 2002 : implemented cyclic padding
 
-ALIGNMENT MAP HISTORY					*alignmap-history*
+ALIGNMENT MAP HISTORY					*alignmap-history* {{{2
+	35  : Sep 01, 2006 : * \t= and cousins used "`"s.  They now use \xff
+			       characters.
+			     * \acom can now work with doxygen style /// comments
+			     * <char-0xff> used in \t= \T= \w= and \m= instead
+			       of backquotes.
 	34  : Feb 23, 2006 : * AlignMaps now converted to vim 7.0 style using
 	                       auto-loading functions.
 	33  : Oct 12, 2005 : * \ts, now uses P1 in its AlignCtrl call
@@ -1227,4 +1232,5 @@
 	                   :   various bugfixes to \afnc, \T=, etc
 
 ==============================================================================
+Modelines: {{{1
 vim:tw=78:ts=8:ft=help:fdm=marker:

Added: trunk/packages/vim-scripts/doc/alternate.txt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/doc/alternate.txt?rev=849&op=file
==============================================================================
--- trunk/packages/vim-scripts/doc/alternate.txt (added)
+++ trunk/packages/vim-scripts/doc/alternate.txt Wed Jan 17 19:52:49 2007
@@ -1,0 +1,177 @@
+
+*alternate.txt* Alternate Plugin                  Sat May 13 15:35:38 CDT 2006
+
+Author:  Michael Sharpe  <feline at irendi.com>
+Copyright: (c) 2000-2006 Michael Sharpe
+           We grant permission to use, copy modify, distribute, and sell this
+           software for any purpose without fee, provided that the above 
+           copyright notice and this text are not removed. We make no guarantee
+           about the suitability of this software for any purpose and we are 
+           not liable for any damages resulting from its use. Further, we are 
+           under no obligation to maintain or extend this software. It is 
+           provided on an "as is" basis without any expressed or implied 
+           warranty.
+
+==============================================================================
+1. Contents     *AS* *AV* *AT* *AN* *IH* *IHS* *IHV* *IHT* *IHN* *alternate*
+
+        1. Contents...........................: |alternate|
+        2. Purpose............................: |alternate-purpose|
+        3. Commands...........................: |alternate-commands|
+        4. Configuration......................: |alternate-config|
+        5. Installation.......................: |alternate-installation|
+        6. Bugs/Enhancements..................: |alternate-support|
+        7. Acknowledgments....................: |alternate-acknowledgments|
+
+==============================================================================
+2. Purpose                                                 *alternate-purpose*
+
+The purpose of a.vim is to allow quick and easy switching between source files
+and corresponding header files. Many languages (C, C++, ada, ocaml, lex/yacc)
+have the concept of source/header files or the like. It is quite common during
+development or review to need to edit both files together. This plugin attempts
+to simplify that process. There are commands which while editing a source
+file allow for the quick switching to the corresponding header and vice versa.
+The only difference between the commands is how the switch occurs. More recent 
+functionality allow the switching to a file under the cursor too.  In the
+following sections the commands, configuration and installation procedures are
+described.
+
+==============================================================================
+3. Commands                                               *alternate-commands*
+
+There are 4 commands provided by this plugin. They are
+
+:A switches to the header file corresponding to the source file in the current
+   buffer (or vice versa).
+
+:AS similar to :A except the current buffer is split horizontally such that the
+    source file is on one split and the header is in the other.
+
+:AV similar to :AS except that the split is vertical
+
+:AT similar to :AS and :AV except a new tab is opened instead of a split
+
+:IH switches to the file under cursor (or the file specified with the 
+    command). This command uses the builtin a.vim search path support and the 
+    &path variable in conjunction.
+
+:IHS similar to :IH execpt the current buffer is split horizontally first
+
+:IHS similar to :IH execpt the current buffer is split vertically first
+
+:IHS similar to :IH execpt a new tab is created for the file being switched to
+
+:IHN switches to the next matching file for the original selection
+
+In all cases if the corresponding alternate file is already loaded that buffer
+is preferred. That is this plugin will never load the same file twice.
+
+Some maps are also provided for the IH command (mainly for example purposes)
+<Leader>ih - switches to the file under the cursor using the :IHS command
+<Leader>is - switches to the source file of the header file under the cursor 
+             using the :IHS command and the :A command
+<leader>ihn - switches to the next match in the sequence.
+
+==============================================================================
+4. Configuration                                            *alternate-config*
+
+It is possible to configure three separate pieces of behaviour of this plugin.
+
+a) Extensions: Each language has different extensions for identifying the
+source and header files. Many languages support multiple different but related
+extensions. As such this plugin allow for the complete specification of how
+source and header files correspond to each other via extension maps. There are
+a number of maps built in. For example, the following variable setting
+
+  g:alternateExtensions_CPP = "inc,h,H,HPP,hpp"
+
+indicates that any file with a .CPP exetension can have a corresponding file
+with any of the .inc, .h, .H, .HPP, .hpp extension. The inverse is not
+specified by this map though. Typically each extension will have a mapping. So
+there would exist maps for .h, .inc, .H, .HPP, .hpp too. Extension maps should
+be specified before loading this plugin. Some of the builtin extension maps are
+as follows,
+
+C and C++
+g:alternateExtensions_h = "c,cpp,cxx,cc,CC"
+g:alternateExtensions_H' = "C,CPP,CXX,CC"
+g:alternateExtensions_cpp' = "h,hpp"
+g:alternateExtensions_CPP' = "H,HPP"
+g:alternateExtensions_c' = "h"
+g:alternateExtensions_C' = "H"
+g:alternateExtensions_cxx' = "h"
+
+Ada
+g:alternateExtensions_adb' = "ads"
+g:alternateExtensions_ads' = "adb"
+
+Lex/Yacc
+g:alternateExtensions_l' = "y,yacc,ypp"
+g:alternateExtensions_lex' = "yacc,y,ypp"
+g:alternateExtensions_lpp' = "ypp,y,yacc"
+g:alternateExtensions_y' = "l,lex,lpp"
+g:alternateExtensions_yacc' = "lex,l,lpp"
+g:alternateExtensions_ypp' = "lpp,l,lex"
+
+b) Search Paths: In many projects the location of the source files and the
+corresponding header files is not always the same directory. This plugin allows
+the search path it uses to locate source and header files to be configured.
+The search path is specified by setting the g:alternateSearchPath variable. The
+default setting is as follows,
+
+  g:alternateSearchPath = 'sfr:../source,sfr:../src,sfr:../include,sfr:../inc'
+
+This indicates that the corresponding file will be searched for in ../source,
+../src. ../include and ../inc all relative to the current file being switched
+from. The value of the g:alternateSearchPath variable is simply a comma
+separated list of prefixes and directories. The "sfr:" prefix indicates that 
+the path is relative to the file. Other prefixes are "wdr:" which indicates
+that the directory is relative to the current working directory and "abs:"
+which indicates the path is absolute. If no prefix is specified "sfr:" is
+assumed.
+
+c) Regex Paths: Another type of prefix which can appear in the
+g:alternateSearchPath variable is that of "reg:". It is used to apply a regex
+to the path of the file in the buffer being switched from to locate the
+alternate file. E.g. 'reg:/inc/src/g/' will replace every instance  of 'inc' 
+with 'src' in the source file path. It is possible to use match variables so 
+you could do something like: 'reg:|src/\([^/]*\)|inc/\1||' (see |substitute|, 
+|help pattern| and |sub-replace-special| for more details. The exact syntax of
+a "reg:" specification is
+          reg:<sep><pattern><sep><subst><sep><flag><sep>
+        
+          <sep> seperator character, we often use one of [/|%#] 
+          <pattern> is what you are looking for
+          <subst> is the output pattern
+          <flag> can be g for global replace or empty
+
+d) No Alternate Behaviour: When attempting to alternate/switch from a
+source/header to its corresponding file it is possible that the corresponding
+file does not exist. In this case this plugin will create the missing alternate
+file in the same directory as the current file. Some users find this behaviour
+irritating. This behaviour can be disabled by setting 
+g:alternateNoDefaultAlternate to 1. When this variable is not 0 a message will
+be displayed indicating that no alternate file exists.
+
+==============================================================================
+5. Installation                                       *alternate-installation*
+
+To install this plugin simply drop the a.vim file in to $VIMRUNTIME/plugin
+(global or local) or simply source the file from the vimrc file. Ensure that
+any configuration occurs before the plugin is loaded/sourced.
+
+==============================================================================
+6. Bugs/Enhancements                                       *alternate-support*
+
+Whilst no formal support is provided for this plugin the author is always happy
+to receive bug reports and enhancement requests. Please email all such
+reports/requests to feline at irendi.com.
+
+==============================================================================
+7. Acknowledgments                               *alternate-acknowledgments*
+
+The author would like to thank everyone who has submitted bug reports and
+feature enhancement requests in the past. In particular Bindu Wavell provided
+much of the original code implementing the search path and regex functionality.
+vim:tw=78:ts=8:ft=help

Modified: trunk/packages/vim-scripts/doc/bufexplorer.txt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/doc/bufexplorer.txt?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/doc/bufexplorer.txt (original)
+++ trunk/packages/vim-scripts/doc/bufexplorer.txt Wed Jan 17 19:52:49 2007
@@ -1,7 +1,7 @@
-*bufexplorer.txt*              Buffer Explorer       Last Change: 10 Mar 2006
+*bufexplorer.txt*              Buffer Explorer       Last Change: 30 Nov 2006
 
 Buffer Explorer                                *buffer-explorer* *bufexplorer*
-                                Version 7.0.11
+                                Version 7.0.12
 
 Plugin for easily exploring (or browsing) open buffers
 
@@ -12,6 +12,7 @@
 |bufexplorer-todo|           Todo
 |bufexplorer-credits|        Credits
 
+For Vim version 7.0 and above.
 This plugin is only available if 'compatible' is not set.
 
 {Vi does not have any of this}
@@ -31,6 +32,7 @@
 
 Command to use once exploring:
 
+ <F1>          Toggle help information.
  <cr> or       Opens the buffer that is under the cursor into the current
  <leftmouse>   window.
  S             Opens the buffer that is under the cursor into a newly split
@@ -39,11 +41,12 @@
  o             Toggles open mode. Only available in 'split mode'.
  p             Toggles the showing of a split filename/pathname.
  q             Quit exploring.
- s             Selects the order the buffers are listed in. Either by their
-               name, by their number or by most recently used (MRU).
+ r             Reverses the order the buffers are listed in.
+ R             Toggles relative path/absolute path.
+ s             Selects the order the buffers are listed in. Either by buffer
+               number, file name, file extension, most recently used (MRU), or
+               full path.
  t             Toggles split type. Only available in 'split mode'.
- r             Reverses the order the buffers are listed in.
- ?             Displays help information.
 
 Typically one would put bufexplorer.vim into the .vim/plugin directory
 (vimfiles\plugin for Windows) where it becomes automatically available
@@ -51,12 +54,12 @@
 like to use something other than '\', you may simply change the leader
 (see |mapleader|).
 
-Once invoked, Buffer Explorer display a sorted list of all the buffers
-that are currently opened. You are then able to move the cursor to the
-line containing the buffer's name you are wanting to act upon. Once you
-have selected the buffer you would like, you can then either open it,
-close it(delete), resort the list, reverse the sort, quit exploring
-and so on...
+Once invoked, Buffer Explorer displays a sorted list (MRU is the default
+sort method) of all the buffers that are currently opened. You are then
+able to move the cursor to the line containing the buffer's name you are
+wanting to act upon. Once you have selected the buffer you would like,
+you can then either open it, close it(delete), resort the list, reverse
+the sort, quit exploring and so on...
 
 You can avoid loading this plugin by setting the "loaded_bufexplorer"
 variable: >
@@ -72,10 +75,11 @@
 
                                                           *g:bufExplorerSortBy*
 To control what field the buffers are sorted by, use: >
+  let g:bufExplorerSortBy='extension'  " Sort by file extension.
+  let g:bufExplorerSortBy='fullpath'   " Sort by full file path name.
+  let g:bufExplorerSortBy='mru'        " Sort by most recently used.
+  let g:bufExplorerSortBy='name'       " Sort by the buffer's name.
   let g:bufExplorerSortBy='number'     " Sort by the buffer's number.
-  let g:bufExplorerSortBy='name'       " Sort by the buffer's name.
-  let g:bufExplorerSortBy='mru'        " Sort by most recently used.
-  let g:bufExplorerSortBy='fullPath'   " Sort by full file path name.
 The default is to sort by mru.
 
                                                       *g:bufExplorerSplitBelow*
@@ -86,13 +90,26 @@
 The default is to use what ever is set by the global &splitbelow
 variable.
 
+                                                      *g:bufExplorerSplitRight*
+To control when opening a new window, if the new window is split to the
+right or to the left of the current window, use: >
+  let g:bufExplorerSplitRight=0        " Split left.
+  let g:bufExplorerSplitRight=1        " Split right.
+The default is to use the global &splitright.
+
                                                        *g:bufExplorerSplitType*
 To control the type of split when creating a new window, use: >
   let g:bufExplorerSplitType=''        " Split horizontally.
   let g:bufExplorerSplitType='v'       " Split vertically.
 The default is to split horizontally.
 
-                                                   *g:bufexplorersplitvertsize*
+                                                        *g:bufExplorerOpenMode*
+To control how the selected buffer is opened in 'split mode', use: >
+  let g:bufExplorerOpenMode=1          " Open using current window.
+  let g:bufExplorerOpenMode=0          " Open in new window.
+The default is to use a new window.
+
+                                                   *g:bufexplorerSplitVertSize*
 To control the width of the window when opening a new window vertically
 use: >
   let g:bufExplorerSplitVertSize = [width]
@@ -103,12 +120,6 @@
 use: >
   let g:bufExplorerSplitHorzSize = [height]
 The default is 0, which is to use half the existing height.
-
-                                                        *g:bufExplorerOpenMode*
-To control how the selected buffer is opened in 'split mode', use: >
-  let g:bufExplorerOpenMode=1          " Open using current window.
-  let g:bufExplorerOpenMode=0          " Open in new window.
-The default is to use a new window.
 
                                                    *g:bufExplorerSortDirection*
 To control whether to sort the buffers in forward or reverse order, use: >
@@ -130,9 +141,33 @@
   let g:bufExplorerShowDirectories=0   " Don't show directories.
 Note: This is only available when using vim 7.0 and above.
 
+                                                *g:bufExplorerShowRelativePath*
+To control whether to show absolute paths or relative to the current
+directory, use: >
+  let g:bufExplorerShowRelativePath=0  " Show absolute paths.
+  let g:bufExplorerShowRelativePath=1  " Show relative paths.
+The default is to show absolute paths.
+
 ===============================================================================
 CHANGE LOG                                              *bufexplorer-changelog*
 
+7.0.12 - MAJOR Update.
+         This version will ONLY run with Vim version 7.0 or greater.
+         Dave Eggum has made some 'significant' updates to this latest
+         version:
+           - Added BufExplorerGetAltBuf() global function to be used in the
+             user’s rulerformat.
+           - Added g:bufExplorerSplitRight option.
+           - Added g:bufExplorerShowRelativePath option with mapping.
+           - Added current line highlighting.
+           - The split type can now be changed whether bufexplorer is opened
+             in split mode or not.
+           - Various major and minor bug fixes and speed improvements.
+           - Sort by extension.
+         Other improvements/changes:
+           - Changed the help key from '?' to <F1> to be more 'standard'.
+           - Fixed splitting of vertical bufexplorer window.
+         Hopefully I have not forgot something :)
 7.0.11 - Fixed a couple of highlighting bugs, reported by David Eggum. He also
          changed passive voice to active on a couple of warning messages.
 7.0.10 - Fixed bug report by Xiangjiang Ma. If the 'ssl' option is set,
@@ -172,7 +207,7 @@
          E493 would be displayed.
 7.0.1  - Thanks to Erwin Waterlander for finding a couple problems.
          The first problem allowed a modified buffer to be deleted.  Opps! The
-         second problem occured when several files were opened, BufExplorer
+         second problem occurred when several files were opened, BufExplorer
          was started, the current buffer was deleted using the 'd' option, and
          then BufExplorer was exited. The deleted buffer was still visible
          while it is not in the buffers list. Opps again!
@@ -182,9 +217,9 @@
          (g:bufExplorerSplitHorzSize) of a new window when opening
          bufexplorer horizontally. By default, the windows are normally
          split to use half the existing width or height.
-6.3.0  - Added keepjumps so that the jumps list would not get clutered with
+6.3.0  - Added keepjumps so that the jumps list would not get cluttered with
          bufexplorer related stuff.
-6.2.3  - Thanks to Jay Logan for finding a bug in the vertical split postion
+6.2.3  - Thanks to Jay Logan for finding a bug in the vertical split position
          of the code. When selecting that the window was to be split
          vertically by doing a '\bv', from then on, all splits, i.e. '\bs',
          were split vertically, even though g:bufExplorerSplitType was not set
@@ -194,8 +229,8 @@
          'setlocal nofoldenable' and it was fixed.
 6.2.1  - Thanks goes out to Takashi Matsuo for added the 'fullPath' sorting
          logic and option.
-6.2.0  - Thanks goes out to Simon Johann-Günter for spotting and fixing a
-         problem in that the last search pattern is overriden by the search
+6.2.0  - Thanks goes out to Simon Johann-Ganter for spotting and fixing a
+         problem in that the last search pattern is overridden by the search
          pattern for blank lines.
 6.1.6  - Thanks to Artem Chuprina for finding a pesky bug that has been around
          for sometime now. The <esc> key mapping was causing the buffer
@@ -261,7 +296,10 @@
 ===============================================================================
 TODO                                                         *bufexplorer-todo*
 
-Sort by extension.
+- Erwin Waterlander suggestion of being able to open the explorer with one
+  buffer.
+- Once the ability to save and restore a jumplist is added to Vim, we need
+  prevent the jumplist from updating when the user searches in bufexplorer.
 
 ===============================================================================
 CREDITS                                                   *bufexplorer-credits*

Modified: trunk/packages/vim-scripts/doc/project.txt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/doc/project.txt?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/doc/project.txt (original)
+++ trunk/packages/vim-scripts/doc/project.txt Wed Jan 17 19:52:49 2007
@@ -1,16 +1,16 @@
 *project.txt*	Plugin for managing multiple projects with multiple sources
-		For Vim version 6.0.
-		Last Change: Mon 24 Apr 2006 12:48:40 PM EDT
+		For Vim version 6.x and Vim version 7.x.
+		Last Change: Fri 13 Oct 2006 10:20:13 AM EDT
 	
 
 				By Aric Blumer
-			   Aric.Blumer at marconi.com
+		      aricvim email-at-sign charter.net
 
 						    *project* *project-plugin*
 	Contents:
 
 		Commands...................|project-invoking|
-		Inheritiance............|project-inheritance|
+		Inheritance.............|project-inheritance|
 		Mappings...................|project-mappings|
 		Adding Mappings.....|project-adding-mappings|
 		Settings...................|project-settings|
@@ -486,6 +486,22 @@
 
        flag	Description ~
 
+	b	When present, use the |browse()| when selecting directories
+		for \c and \C.  This is off by default for Windows, because
+		the windows browser does not allow you to select directories.
+
+	c	When present, the Project Window will automatically close when
+		you select a file.
+
+	F	Float the Project Window.  That is, turn off automatic
+		resizing and placement.  This allows placement between other
+		windows that wish to share similar placement at the side of
+		the screen.  It is also particularly helpful for external
+		window managers.
+
+	g	When present, the mapping for <F12> will be created to toggle
+		the Project Window open and closed.
+
 	i	When present, display the filename and the current working
 		directory in the command line when a file is selected for
 		opening.
@@ -505,6 +521,9 @@
 	        mode commands to make the current buffer the only visible
 		buffer, but keep the Project Window visible, too.
 
+	n	When present, numbers will be turned on for the project
+	        window.
+
 	s	When present, the Project Plugin will use syntax highlighting
 		in the Project Window.
 
@@ -517,15 +536,7 @@
 	T	When present, put Subproject folds at the top of the fold when
 		refreshing.
 
-	b	When present, use the |browse()| when selecting directories
-		for \c and \C.  This is off by default for Windows, because
-		the windows browser does not allow you to select directories.
-
-	c	When present, the Project Window will automatically close when
-		you select a file.
-
-	g	When present, the mapping for <F12> will be created to toggle
-		the Project Window open and closed.
+	v	When present, use :vimgrep rather than :grep when using \G.
 
 g:proj_run1 ...  g:proj_run9
 		Contains a Vim command to execute on the file.  See the
@@ -689,6 +700,11 @@
 		Lawrence Kesteloot
 		Dave Eggum
 		A Harrison
+		Thomas Link
+		Richard Bair
+		Eric Arnold
+		Peter Jones
+		Eric Van Dewoestine
 
 
  vim:ts=8 sw=8 noexpandtab tw=78 ft=help:

Modified: trunk/packages/vim-scripts/doc/vcscommand.txt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/doc/vcscommand.txt?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/doc/vcscommand.txt (original)
+++ trunk/packages/vim-scripts/doc/vcscommand.txt Wed Jan 17 19:52:49 2007
@@ -158,6 +158,9 @@
 For CVS, this command uses the |VCSCommandCVSDiffOpt| variable to specify diff
 options.  If that variable does not exist, a plugin-specific default is used.
 If you wish to have no options, then set it to the empty string.
+
+For SVN, this command uses the |VCSCommandSVNDiffOpt| variable to specify diff
+options.  If that variable does not exist, the SVN default is used.
 
 :VCSGotoOriginal					*:VCSGotoOriginal*
 
@@ -349,10 +352,10 @@
 5. Configuration and customization			*vcscommand-customize*
 							*vcscommand-config*
 
-The vcscommand plugin can be configured in two ways:  by setting configuration
-variables (see |vcscommand-options|) or by defining vcscommand event handlers
-(see |vcscommand-events|).  Additionally, the vcscommand plugin supports a
-customized status line (see |vcscommand-statusline| and
+The vcscommand plugin can be configured in several ways:  by setting
+configuration variables (see |vcscommand-options|) or by defining vcscommand
+event handlers (see |vcscommand-events|).  Additionally, the vcscommand plugin
+supports a customized status line (see |vcscommand-statusline| and
 |vcscommand-buffer-management|).
 
 5.1 vcscommand configuration variables			*vcscommand-options*
@@ -371,7 +374,10 @@
 |VCSCommandDiffSplit|
 |VCSCommandEdit|
 |VCSCommandEnableBufferSetup|
+|VCSCommandResultBufferNameExtension|
+|VCSCommandResultBufferNameFunction|
 |VCSCommandSplit|
+|VCSCommandSVNDiffOpt|
 |VCSCommandSVNExec|
 
 VCSCommandCommitOnWrite				*VCSCommandCommitOnWrite*
@@ -391,7 +397,7 @@
 This variable, if set to a non-zero value, causes the temporary result buffers
 to automatically delete themselves when hidden.
 
-VCSCommandCVSDiffOpt				*VCSCommandDiffOpt*
+VCSCommandCVSDiffOpt				*VCSCommandCVSDiffOpt*
 
 This variable, if set, determines the options passed to the diff command of
 CVS.  If not set, it defaults to 'u'.
@@ -414,6 +420,28 @@
 is VCS-controlled.  This is useful for displaying version information in the
 status bar.
 
+VCSCommandResultBufferNameExtension	*VCSCommandResultBufferNameExtension*
+
+This variable, if set to a non-blank value, is appended to the name of the VCS
+command output buffers.  For example, '.vcs'.  Using this option may help
+avoid problems caused by autocommands dependent on file extension.
+
+VCSCommandResultBufferNameFunction	*VCSCommandResultBufferNameFunction*
+
+This variable, if set, specifies a custom function for naming VCS command
+output buffers.  This function is expected to return the new buffer name, and
+will be passed the following arguments:
+
+  command - name of the VCS command being executed (such as 'Log' or
+  'Diff').
+  
+  originalBuffer - buffer number of the source file.
+  
+  vcsType - type of VCS controlling this file (such as 'CVS' or 'SVN').
+  
+  statusText - extra text associated with the VCS action (such as version
+  numbers).
+
 VCSCommandSplit					*VCSCommandSplit*
 
 This variable controls the orientation of the various window splits that
@@ -423,6 +451,11 @@
 one another.  If set to 'vertical', the resulting windows will be
 side-by-side.  If not set, it defaults to 'horizontal' for all but
 VCSVimDiff windows.
+
+VCSCommandSVNDiffOpt				*VCSCommandSVNDiffOpt*
+
+This variable, if set, determines the options passed with the '-x' parameter
+to the SVN diff command.  If not set, no options are passed.
 
 VCSCommandSVNExec				*VCSCommandSVNExec*
 

Modified: trunk/packages/vim-scripts/plugin/AlignMaps.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/AlignMaps.vim?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/plugin/AlignMaps.vim (original)
+++ trunk/packages/vim-scripts/plugin/AlignMaps.vim Wed Jan 17 19:52:49 2007
@@ -1,7 +1,7 @@
 " AlignMaps:   Alignment maps based upon <Align.vim>
 " Maintainer:  Dr. Charles E. Campbell, Jr. <Charles.Campbell at gsfc.nasa.gov>
-" Date:        Feb 23, 2006
-" Version:     34c	ASTRO-ONLY
+" Date:        Sep 08, 2006
+" Version:     35
 "
 " NOTE: the code herein needs vim 6.0 or later
 "                       needs <Align.vim> v6 or later
@@ -38,7 +38,7 @@
 if exists("g:loaded_alignmaps") || &cp
  finish
 endif
-let g:loaded_alignmaps = "v34c"
+let g:loaded_alignmaps = "v35"
 let s:keepcpo          = &cpo
 set cpo&vim
 
@@ -148,7 +148,7 @@
 map <silent> <Leader>a<    <SID>WS:AlignCtrl mIp1P1=l << >><CR>:'a,.Align<CR><SID>WE
 map <silent> <Leader>a=    <SID>WS:AlignCtrl mIp1P1=l<CR>:AlignCtrl g :=<CR>:'a,'zAlign :\==<CR><SID>WE
 map <silent> <Leader>abox  <SID>WS:let g:alignmaps_iws=substitute(getline("'a"),'^\(\s*\).*$','\1','e')<CR>:'a,'z-1s/^\s\+//e<CR>:'a,'z-1s/^.*$/@&@/<CR>:AlignCtrl m=p01P0w @<CR>:'a,.Align<CR>:'a,'z-1s/@/ * /<CR>:'a,'z-1s/@$/*/<CR>'aYP:s/./*/g<CR>0r/'zkYp:s/./*/g<CR>0r A/<Esc>:exe "'a-1,'z-1s/^/".g:alignmaps_iws."/e"<CR><SID>WE
-map <silent> <Leader>acom  <SID>WS:'a,.s/\/[*/]\*\=/@&@/e<CR>:'a,.s/\*\//@&/e<CR>:'y,'zs/^\( *\) @/\1@/e<CR>'zk<Leader>tW@:'y,'zs/^\(\s*\) @/\1/e<CR>:'y,'zs/ @//eg<CR><SID>WE
+map <silent> <Leader>acom  <SID>WS:'a,.s/\/[*/]\/\=/@&@/e<CR>:'a,.s/\*\//@&/e<CR>:'y,'zs/^\( *\) @/\1@/e<CR>'zk<Leader>tW@:'y,'zs/^\(\s*\) @/\1/e<CR>:'y,'zs/ @//eg<CR><SID>WE
 map <silent> <Leader>adcom <SID>WS:'a,.v/^\s*\/[/*]/s/\/[*/]\*\=/@&@/e<CR>:'a,.v/^\s*\/[/*]/s/\*\//@&/e<CR>:'y,'zv/^\s*\/[/*]/s/^\( *\) @/\1@/e<CR>'zk<Leader>tdW@:'y,'zv/^\s*\/[/*]/s/^\(\s*\) @/\1/e<CR>:'y,'zs/ @//eg<CR><SID>WE
 map <silent> <Leader>aocom :AlignPush<CR>:AlignCtrl g /[*/]<CR><Leader>acom:AlignPop<CR>
 map <silent> <Leader>ascom <SID>WS:'a,.s/\/[*/]/@&@/e<CR>:'a,.s/\*\//@&/e<CR>:silent! 'a,.g/^\s*@\/[*/]/s/@//ge<CR>:AlignCtrl v ^\s*\/[*/]<CR>:AlignCtrl g \/[*/]<CR>'zk<Leader>tW@:'y,'zs/^\(\s*\) @/\1/e<CR>:'y,'zs/ @//eg<CR><SID>WE
@@ -178,7 +178,7 @@
 map <silent> <Leader>T:   <SID>WS:AlignCtrl mIp1P1=r :<CR>:'a,.Align<CR><SID>WE
 map <silent> <Leader>T;   <SID>WS:AlignCtrl mIp0P0=r ;<CR>:'a,.Align<CR><SID>WE
 map <silent> <Leader>T<   <SID>WS:AlignCtrl mIp0P0=r <<CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>T=   <SID>WS:'a,'z-1s/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'z-1s@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'z-1s/; */;@/e<CR>:'a,'z-1s/==/``/ge<CR>:'a,'z-1s/!=/!`/ge<CR>:AlignCtrl mIp1P1=r = @<CR>:AlignCtrl g =<CR>:'a,'z-1Align<CR>:'a,'z-1s/; *@/;/e<CR>:'a,'z-1s/; *$/;/e<CR>:'a,'z-1s@\([*/+\-%<Bar>&\~^]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1s/\( \+\);/;\1/ge<CR>:'a,'z-1s/`/=/ge<CR><SID>WE<Leader>acom
+map <silent> <Leader>T=   <SID>WS:'a,'z-1s/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'z-1s@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'z-1s/; */;@/e<CR>:'a,'z-1s/==/\="\<Char-0xff>\<Char-0xff>"/ge<CR>:'a,'z-1s/!=/\x="!\<Char-0xff>"/ge<CR>:AlignCtrl mIp1P1=r = @<CR>:AlignCtrl g =<CR>:'a,'z-1Align<CR>:'a,'z-1s/; *@/;/e<CR>:'a,'z-1s/; *$/;/e<CR>:'a,'z-1s@\([*/+\-%<Bar>&\~^]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1s/\( \+\);/;\1/ge<CR>:'a,'z-1s/\xff/=/ge<CR><SID>WE<Leader>acom
 map <silent> <Leader>T?   <SID>WS:AlignCtrl mIp0P0=r ?<CR>:'a,.Align<CR>:'y,'zs/ \( *\);/;\1/ge<CR><SID>WE
 map <silent> <Leader>T@   <SID>WS:AlignCtrl mIp0P0=r @<CR>:'a,.Align<CR><SID>WE
 map <silent> <Leader>Tab  <SID>WS:'a,.s/^\(\t*\)\(.*\)/\=submatch(1).escape(substitute(submatch(2),'\t','@','g'),'\')/<CR>:AlignCtrl mI=r @<CR>:'a,.Align<CR>:'y+1,'z-1s/@/ /g<CR><SID>WE
@@ -194,11 +194,11 @@
 map <silent> <Leader>t:   <SID>WS:AlignCtrl mIp1P1=l :<CR>:'a,.Align<CR><SID>WE
 map <silent> <Leader>t;   <SID>WS:AlignCtrl mIp0P0=l ;<CR>:'a,.Align<CR>:.,'zs/ \( *\);/;\1/ge<CR><SID>WE
 map <silent> <Leader>t<   <SID>WS:AlignCtrl mIp0P0=l <<CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>t=   <SID>WS:'a,'zs/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'zs@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'zs/==/``/ge<CR>:'a,'zs/!=/!`/ge<CR>'zk:AlignCtrl mIp1P1=l =<CR>:AlignCtrl g =<CR>:'a,'z-1Align<CR>:'a,'z-1s@\([*/+\-%<Bar>&\~^!=]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1s/\( \+\);/;\1/ge<CR>:'a,'z-1v/^\s*\/[*/]/s/\/[*/]/@&@/e<CR>:'a,'z-1v/^\s*\/[*/]/s/\*\//@&/e<CR>'zk<Leader>t@:'y,'zs/^\(\s*\) @/\1/e<CR>:'a,'z-1s/`/=/ge<CR>:'y,'zs/ @//eg<CR><SID>WE
-map <silent> <Leader>w=   <SID>WS:'a,'zg/=/s/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'zg/=/s@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'zg/=/s/==/``/ge<CR>:'a,'zg/=/s/!=/!`/ge<CR>'zk:AlignCtrl mWp1P1=l =<CR>:AlignCtrl g =<CR>:'a,'z-1g/=/Align<CR>:'a,'z-1g/=/s@\([*/+\-%<Bar>&\~^!=]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1g/=/s/\( \+\);/;\1/ge<CR>:'a,'z-1v/^\s*\/[*/]/s/\/[*/]/@&@/e<CR>:'a,'z-1v/^\s*\/[*/]/s/\*\//@&/e<CR>'zk<Leader>t@:'y,'zs/^\(\s*\) @/\1/e<CR>:'a,'z-1g/=/s/`/=/ge<CR>:'y,'zg/=/s/ @//eg<CR><SID>WE
+map <silent> <Leader>t=   <SID>WS:'a,'zs/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'zs@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'zs/==/\="\<Char-0xff>\<Char-0xff>"/ge<CR>:'a,'zs/!=/\="!\<Char-0xff>"/ge<CR>'zk:AlignCtrl mIp1P1=l =<CR>:AlignCtrl g =<CR>:'a,'z-1Align<CR>:'a,'z-1s@\([*/+\-%<Bar>&\~^!=]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1s/\( \+\);/;\1/ge<CR>:'a,'z-1v/^\s*\/[*/]/s/\/[*/]/@&@/e<CR>:'a,'z-1v/^\s*\/[*/]/s/\*\//@&/e<CR>'zk<Leader>t@:'y,'zs/^\(\s*\) @/\1/e<CR>:'a,'z-1s/\xff/=/ge<CR>:'y,'zs/ @//eg<CR><SID>WE
+map <silent> <Leader>w=   <SID>WS:'a,'zg/=/s/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'zg/=/s@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'zg/=/s/==/\="\<Char-0xff>\<Char-0xff>"/ge<CR>:'a,'zg/=/s/!=/\="!\<Char-0xff>"/ge<CR>'zk:AlignCtrl mWp1P1=l =<CR>:AlignCtrl g =<CR>:'a,'z-1g/=/Align<CR>:'a,'z-1g/=/s@\([*/+\-%<Bar>&\~^!=]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1g/=/s/\( \+\);/;\1/ge<CR>:'a,'z-1v/^\s*\/[*/]/s/\/[*/]/@&@/e<CR>:'a,'z-1v/^\s*\/[*/]/s/\*\//@&/e<CR>'zk<Leader>t@:'y,'zs/^\(\s*\) @/\1/e<CR>:'a,'z-1g/=/s/\xff/=/ge<CR>:'y,'zg/=/s/ @//eg<CR><SID>WE
 map <silent> <Leader>t?   <SID>WS:AlignCtrl mIp0P0=l ?<CR>:'a,.Align<CR>:.,'zs/ \( *\);/;\1/ge<CR><SID>WE
 map <silent> <Leader>t~   <SID>WS:AlignCtrl mIp0P0=l ~<CR>:'a,.Align<CR>:'y,'zs/ \( *\);/;\1/ge<CR><SID>WE
-map <silent> <Leader>m=   <SID>WS:'a,'zs/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'zs@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'zs/==/``/ge<CR>:'a,'zs/!=/!`/ge<CR>'zk:AlignCtrl mIp1P1=l =<CR>:AlignCtrl g =<CR>:'a,'z-1Align<CR>:'a,'z-1s@\([*/+\-%<Bar>&\~^!=]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1s/\( \+\);/;\1/ge<CR>:'a,'z-s/%\ze[^=]/ @%@ /e<CR>'zk<Leader>t@:'y,'zs/^\(\s*\) @/\1/e<CR>:'a,'z-1s/`/=/ge<CR>:'y,'zs/ @//eg<CR><SID>WE
+map <silent> <Leader>m=   <SID>WS:'a,'zs/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'zs@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'zs/==/\="\<Char-0xff>\<Char-0xff>"/ge<CR>:'a,'zs/!=/\="!\<Char-0xff>"/ge<CR>'zk:AlignCtrl mIp1P1=l =<CR>:AlignCtrl g =<CR>:'a,'z-1Align<CR>:'a,'z-1s@\([*/+\-%<Bar>&\~^!=]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1s/\( \+\);/;\1/ge<CR>:'a,'z-s/%\ze[^=]/ @%@ /e<CR>'zk<Leader>t@:'y,'zs/^\(\s*\) @/\1/e<CR>:'a,'z-1s/\xff/=/ge<CR>:'y,'zs/ @//eg<CR><SID>WE
 map <silent> <Leader>tab  <SID>WS:'a,.s/^\(\t*\)\(.*\)/\=submatch(1).escape(substitute(submatch(2),'\t','@','g'),'\')/<CR>:AlignCtrl mI=l @<CR>:'a,.Align<CR>:'y+1,'z-1s/@/ /g<CR><SID>WE
 map <silent> <Leader>tml  <SID>WS:AlignCtrl mWp1P0=l \\\@<!\\\s*$<CR>:'a,.Align<CR><SID>WE
 map <silent> <Leader>tsp  <SID>WS:'a,.s/^\(\s*\)\(.*\)/\=submatch(1).escape(substitute(submatch(2),'\s\+','@','g'),'\')/<CR>:AlignCtrl mI=lp0P0 @<CR>:'a,.Align<CR>:'y+1,'z-1s/@/ /g<CR><SID>WE

Modified: trunk/packages/vim-scripts/plugin/AlignPlugin.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/AlignPlugin.vim?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/plugin/AlignPlugin.vim (original)
+++ trunk/packages/vim-scripts/plugin/AlignPlugin.vim Wed Jan 17 19:52:49 2007
@@ -1,7 +1,6 @@
 " AlignPlugin: tool to align multiple fields based on one or more separators
-"   Author:		Charles E. Campbell, Jr.
-"   Date:		Feb 23, 2006
-"   Version:	29e	ASTRO-ONLY
+"   Author:	 Charles E. Campbell, Jr.
+"   Date:    Jul 18, 2006
 " GetLatestVimScripts: 294 1 :AutoInstall: Align.vim
 " GetLatestVimScripts: 1066 1 cecutil.vim
 " Copyright:    Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@@ -91,13 +90,13 @@
 " the power of God for salvation for everyone who believes; for the Jew first,
 " and also for the Greek.  For in it is revealed God's righteousness from
 " faith to faith.
-
 " ---------------------------------------------------------------------
 " Load Once: {{{1
-if exists("g:loaded_align") || &cp
+if &cp || exists("g:loaded_alignPlugin")
  finish
 endif
-let s:keepcpo= &cpo
+let g:loaded_alignPlugin = 1
+let s:keepcpo            = &cpo
 set cpo&vim
 
 " ---------------------------------------------------------------------

Modified: trunk/packages/vim-scripts/plugin/NERD_comments.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/NERD_comments.vim?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/plugin/NERD_comments.vim (original)
+++ trunk/packages/vim-scripts/plugin/NERD_comments.vim Wed Jan 17 19:52:49 2007
@@ -1,7 +1,7 @@
 " vim global plugin that provides easy code commenting for various file types
-" Last Change:  13 Aug 2006
-" Maintainer:   Martin Grenfell <mrg39 at student.canterbury.ac.nz>
-let s:NERD_comments_version = 1.68
+" Last Change:  9 september 2006
+" Maintainer:   Martin Grenfell <martin_grenfell at msn.com>
+let s:NERD_comments_version = 1.69
 
 
 " For help documentation type :help NERD_comments. If this fails, Restart vim
@@ -180,7 +180,9 @@
 
     "check the filetype against all known filetypes to see if we have
     "hardcoded the comment delimiters to use 
-    if a:filetype == "abaqus" 
+    if a:filetype == "" 
+        call s:MapDelimiters('', '')
+    elseif a:filetype == "abaqus" 
         call s:MapDelimiters('**', '')
     elseif a:filetype == "abc" 
         call s:MapDelimiters('%', '')
@@ -278,6 +280,8 @@
         call s:MapDelimiters('CVS:','')
     elseif a:filetype == "dcl" 
         call s:MapDelimiters('$!', '')
+    elseif a:filetype == "debsources" 
+        call s:MapDelimiters('#', '')
     elseif a:filetype == "def" 
         call s:MapDelimiters(';', '')
     elseif a:filetype == "diff" 
@@ -310,6 +314,8 @@
         call s:MapDelimiters('#', '')
     elseif a:filetype == "erlang" 
         call s:MapDelimiters('%', '')
+    elseif a:filetype == "eruby" 
+        call s:MapDelimitersWithAlternative('#', '', '<!--', '-->', 0)
     elseif a:filetype == "eterm" 
         call s:MapDelimiters('#', '')
     elseif a:filetype == "expect" 
@@ -470,6 +476,8 @@
         call s:MapDelimiters('/*', '')
     elseif a:filetype == "ncf" 
         call s:MapDelimiters(';', '')
+    elseif a:filetype == "netrw" 
+        call s:MapDelimiters('', '')
     elseif a:filetype == "nqc" 
         call s:MapDelimiters('/*','*/')
     elseif a:filetype == "nsis" 
@@ -642,8 +650,12 @@
         call s:MapDelimiters('--', '')
     elseif a:filetype == "strace" 
         call s:MapDelimiters('/*','*/')
+    elseif a:filetype == "svn" 
+        call s:MapDelimiters('','')
     elseif a:filetype == "tads" 
         call s:MapDelimitersWithAlternative('//','', '/*','*/', g:NERD_use_c_style_tads_comments )
+    elseif a:filetype == "taglist" 
+        call s:MapDelimiters('', '')
     elseif a:filetype == "tags" 
         call s:MapDelimiters(';', '')
     elseif a:filetype == "tak" 
@@ -681,7 +693,7 @@
     elseif a:filetype == "uil" 
         call s:MapDelimiters('!', '')
     elseif a:filetype == "vb" 
-        call s:MapDelimiters(''','') 
+        call s:MapDelimiters("'","") 
     elseif a:filetype == "verilog" 
         call s:MapDelimitersWithAlternative('//','', '/*','*/', g:NERD_use_c_style_verilog_comments)
     elseif a:filetype == "vgrindefs" 
@@ -712,6 +724,8 @@
         call s:MapDelimiters('!', '')
     elseif a:filetype == "xf86conf" 
         call s:MapDelimiters('#', '')
+    elseif a:filetype == "xhtml" 
+        call s:MapDelimiters('<!--', '-->')
     elseif a:filetype == "xkb" 
         call s:MapDelimiters('//', '')
     elseif a:filetype == "xmath" 
@@ -728,6 +742,8 @@
         call s:MapDelimiters('<!--','-->') 
     elseif a:filetype == "yacc" 
         call s:MapDelimiters('/*','*/')
+    elseif a:filetype == "yaml" 
+        call s:MapDelimiters('#','')
     elseif a:filetype == "z8a" 
         call s:MapDelimiters(';', '')
 
@@ -738,7 +754,7 @@
     "get them from &commentstring.
     else
 	"print a disclaimer to the user :) 
-        call s:NerdEcho("NERD_comments:Unknown filetype, setting delimiters by &commentstring", 0)
+        call s:NerdEcho("NERD_comments:Unknown filetype '".a:filetype."', setting delimiters by &commentstring.\nPleeeeease email the author of the NERD_commenter with this filetype\nand its delimiters!", 0)
         
         "extract the delims from &commentstring 
 	let left= substitute(&commentstring, '\(.*\)%s.*', '\1', '')
@@ -1524,7 +1540,6 @@
 
     " move the cursor back to where it was 
     call s:RestoreCursorPostion() 
-
 endfunction
 
 " Function: s:InvertComment(firstLine, lastLine) function {{{2
@@ -3227,6 +3242,21 @@
     return line
 endfunction
 
+" Function: s:RestoreCursorPosition() {{{2
+" Restores where the cursor is using the s and t registers. See also
+" RestoreCursorPostion(). Sets the s and t registers back to their original
+" values before SaveCursorPosition was called
+function s:RestoreCursorPostion()
+    " see :h restore-position for details of how this works
+    let @s=b:old_s_reg
+    let @t=b:old_t_reg
+    normal! `t
+    normal! zt
+    normal! `s
+
+    "not sure how to save/restore the marks, so just del them 
+    delmarks s t
+endfunction
 " Function: s:SaveCursorPosition() {{{2
 " Saves where the cursor is using the s and t registers. See also
 " RestoreCursorPostion()
@@ -3288,19 +3318,6 @@
 
     let line = s:ReplaceDelims(g:NERD_lPlace, g:NERD_rPlace, left, right, a:line)
     return line
-endfunction
-
-" Function: s:RestoreCursorPosition() {{{2
-" Restores where the cursor is using the s and t registers. See also
-" RestoreCursorPostion(). Sets the s and t registers back to their original
-" values before SaveCursorPosition was called
-function s:RestoreCursorPostion()
-    " see :h restore-position for details of how this works
-    let @s=b:old_s_reg
-    let @t=b:old_t_reg
-    normal! `t
-    normal! zt
-    normal! `s
 endfunction
 " Function: s:UnEsc(str, escChar) {{{2
 " This function removes all the escape chars from a string
@@ -3474,7 +3491,7 @@
             2.2.7 Yank comment map............|NERD_com-yank-comment|
             2.2.8 Comment to EOL map..........|NERD_com-EOL-comment|
             2.2.9 Append com to line map......|NERD_com-append-comment|
-            2.2.10 Prepend com to line map.....|NERD_com-prepend-comment|
+            2.2.10 Prepend com to line map....|NERD_com-prepend-comment|
             2.2.11 Insert comment map.........|NERD_com-insert-comment|
             2.2.12 Use alternate delims map...|NERD_com-alt-delim|
             2.2.13 Comment aligned maps.......|NERD_com-aligned-comment|
@@ -3490,6 +3507,8 @@
     4.Issues with the script..................|NERD_com-issues|
         4.1 Delimiter detection heuristics....|NERD_com-heuristics|
         4.2 Nesting issues....................|NERD_com-nesting|
+        4.3 Nesting issues....................|NERD_com-nesting|
+        4.3 Mark clobbering...................|NERD_com-mark-clobbering|
     5.TODO list...............................|NERD_com-todo|
     6.Credits.................................|NERD_com-credits|
 
@@ -3833,22 +3852,23 @@
 asn aspvbs atlas automake ave awk basic b bc bdf bib bindzone btm caos catalog
 c cfg cg ch cl clean clipper conf config cpp crontab cs csc csp css cterm cupl
 cvs dcl def diff dns dosbatch dosini dot dracula dsl dtd dtml dylan ecd eiffel
-elf elmfilt erlang eterm expect exports fgl focexec form fortran foxpro fvwm
-fx gdb gdmo gnuplot gtkrc haskell hb h help hercules hog html htmlos ia64 icon
-idlang idl indent inform inittab ishd iss ist jam java javascript jess jgraph
-jproperties jproperties jsp kix kscript lace lex lftp lifelines lilo lisp lite
-lotos lout lprolog lscript lss lua lynx m4 make maple masm master matlab mel
-mf mib mma model moduala.  modula2 modula3 monk mush muttrc named nasm nastran
-natural ncf nqc nsis ocaml omnimark openroad opl ora ox pascal pcap pccts perl
-pfmain php phtml pic pike pilrc pine plm plsql po postscr pov povini ppd ppwiz
-procmail progress prolog psf ptcap python python radiance ratpoison r rc
-readline rebol registry remind rexx robots rpl ruby sa samba sas sather scheme
-scilab screen scsh sdl sed sgml sgmldecl sgmllnx sicad simula sinda skill
-slang sl slrnrc sm smil smith sml snnsnet snnspat snnsres snobol4 spec specman
-spice sql sqlforms sqlj sqr squid st stp strace tads tags tak tasm tcl
-terminfo tex texinfo texmf tf tidy tli trasys tsalt tsscl tssgm uc uil vb
-verilog vgrindefs vhdl vim virata vrml vsejcl webmacro wget winbatch wml sh
-wvdial xdefaults xf86conf xkb xmath xml xmodmap xpm2 xpm xslt yacc z8a
+elf elmfilt erlang eruby eterm expect exports fgl focexec form fortran foxpro
+fvwm fx gdb gdmo gnuplot gtkrc haskell hb h help hercules hog html htmlos ia64
+icon idlang idl indent inform inittab ishd iss ist jam java javascript jess
+jgraph jproperties jproperties jsp kix kscript lace lex lftp lifelines lilo
+lisp lite lotos lout lprolog lscript lss lua lynx m4 make maple masm master
+matlab mel mf mib mma model moduala.  modula2 modula3 monk mush muttrc named
+nasm nastran natural ncf netrw nqc nsis ocaml omnimark openroad opl ora ox
+pascal pcap pccts perl pfmain php phtml pic pike pilrc pine plm plsql po
+postscr pov povini ppd ppwiz procmail progress prolog psf ptcap python python
+radiance ratpoison r rc readline rebol registry remind rexx robots rpl ruby sa
+samba sas sather scheme scilab screen scsh sdl sed sgml sgmldecl sgmllnx sicad
+simula sinda skill slang sl slrnrc sm smil smith sml snnsnet snnspat snnsres
+snobol4 spec specman spice sql sqlforms sqlj sqr squid st stp strace svn tads
+taglist tags tak tasm tcl terminfo tex texinfo texmf tf tidy tli trasys tsalt
+tsscl tssgm uc uil vb verilog vgrindefs vhdl vim virata vrml vsejcl webmacro
+wget winbatch wml sh wvdial xdefaults xf86conf xhtml xkb xmath xml xmodmap
+xpm2 xpm xslt yacc yaml z8a
 
 If a language is not in the list of hardcoded supported filetypes then the
 &commentstring vim option is used.
@@ -4487,6 +4507,14 @@
 (Note that in the above examples I have deliberately not used place holders
 for simplicity)
 
+------------------------------------------------------------------------------
+4.3 Mark clobbering                                 *NERD_com-mark-clobbering*
+
+The script clobbers the s and t marks when doing most comments. Im not sure
+how to save and restore the marks yet.
+
+
+
 ==============================================================================
 5. TODO list {{{2                                              *NERD_com-todo*
 
@@ -4571,7 +4599,7 @@
 
 Thanks to Alexander "boesi" Bosecke for pointing out a bug that was stopping
 the NERD_space_delim_filetype_regexp option from working with left aligned
-toggle comments.
+toggle comments. And for pointing out a bug when initialising VB comments. 
 
 Thanks to Stefano Zacchiroli for suggesting the idea of "Minimal comments".
 And for suggested improvements to minimal comments.

Modified: trunk/packages/vim-scripts/plugin/a.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/a.vim?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/plugin/a.vim (original)
+++ trunk/packages/vim-scripts/plugin/a.vim Wed Jan 17 19:52:49 2007
@@ -15,6 +15,9 @@
 " Do not load a.vim if is has already been loaded.
 if exists("loaded_alternateFile")
     finish
+endif
+if (v:progname == "ex")
+   finish
 endif
 let loaded_alternateFile = 1
 
@@ -47,6 +50,7 @@
    " This code handles extensions which contains a dot. exists() fails with
    " such names.
    let v:errmsg = ""
+   " FIXME this line causes ex to return 1 instead of 0 for some reason??
    silent! echo g:alternateExtensions_{a:extension}
    if (v:errmsg != "")
       let g:alternateExtensions_{a:extension} = a:alternates
@@ -57,6 +61,7 @@
      let s:maxDotsInExtension = dotsNumber
    endif
 endfunction
+
 
 " Add all the default extensions
 " Mappings for C and C++
@@ -233,6 +238,47 @@
    return filepath
 endfunction
 
+" Function : FindFileInSearchPathEx (PRIVATE)
+" Purpose  : Searches for a file in the search path list
+" Args     : filename -- name of the file to search for
+"            pathList -- the path list to search
+"            relPathBase -- the path which relative paths are expanded from
+"            count -- find the count'th occurence of the file on the path
+" Returns  : An expanded filename if found, the empty string otherwise
+" Author   : Michael Sharpe (feline at irendi.com)
+" History  : Based on <SID>FindFileInSearchPath() but with extensions
+function! <SID>FindFileInSearchPathEx(fileName, pathList, relPathBase, count)
+   let filepath = ""
+   let m = 1
+   let spath = ""
+   let pathListLen = strlen(a:pathList)
+   if (pathListLen > 0)
+      while (1)
+         let pathSpec = <SID>GetNthItemFromList(a:pathList, m) 
+         if (pathSpec != "")
+            let path = <SID>ExpandAlternatePath(pathSpec, a:relPathBase)
+            if (spath != "")
+               let spath = spath . ','
+            endif
+            let spath = spath . path
+         else
+            break
+         endif
+         let m = m + 1
+      endwhile
+   endif
+
+   if (&path != "")
+      if (spath != "")
+         let spath = spath . ','
+      endif
+      let spath = spath . &path
+   endif
+
+   let filepath = findfile(a:fileName, spath, a:count)
+   return filepath
+endfunction
+
 " Function : EnumerateFilesByExtension (PRIVATE)
 " Purpose  : enumerates all files by a particular list of alternate extensions.
 " Args     : path -- path of a file (not including the file)
@@ -412,11 +458,87 @@
    endif
 endfunction
 
+" Function : AlternateOpenFileUnderCursor (PUBLIC)
+" Purpose  : Opens file under the cursor
+" Args     : splitWindow -- indicates how to open the file
+" Returns  : Nothing
+" Author   : Michael Sharpe (feline at irendi.com) www.irendi.com
+function! AlternateOpenFileUnderCursor(splitWindow,...)
+   let cursorFile = (a:0 > 0) ? a:1 : expand("<cfile>") 
+   let currentPath = expand("%:p:h")
+   let openCount = 1
+
+   let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, openCount)
+   if (fileName != "")
+      call <SID>FindOrCreateBuffer(fileName, a:splitWindow, 1)
+      let b:openCount = openCount
+      let b:cursorFile = cursorFile
+      let b:currentPath = currentPath
+   else
+      echo "Can't find file"
+   endif
+endfunction
+
+" Function : AlternateOpenNextFile (PUBLIC)
+" Purpose  : Opens the next file corresponding to the search which found the 
+"            current file
+" Args     : bang -- indicates what to do if the current file has not been 
+"                    saved
+" Returns  : nothing
+" Author   : Michael Sharpe (feline at irendi.com) www.irendi.com
+function! AlternateOpenNextFile(bang)
+   let cursorFile = ""
+   if (exists("b:cursorFile"))
+      let cursorFile = b:cursorFile
+   endif
+
+   let currentPath = ""
+   if (exists("b:currentPath"))
+      let currentPath = b:currentPath
+   endif
+
+   let openCount = 0
+   if (exists("b:openCount"))
+      let openCount = b:openCount + 1
+   endif
+
+   if (cursorFile != ""  && currentPath != ""  && openCount != 0)
+      let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, openCount)
+      if (fileName != "")
+         call <SID>FindOrCreateBuffer(fileName, "n".a:bang, 0)
+         let b:openCount = openCount
+         let b:cursorFile = cursorFile
+         let b:currentPath = currentPath
+      else 
+         let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, 1)
+         if (fileName != "")
+            call <SID>FindOrCreateBuffer(fileName, "n".a:bang, 0)
+            let b:openCount = 1
+            let b:cursorFile = cursorFile
+            let b:currentPath = currentPath
+         else
+            echo "Can't find next file"
+         endif
+      endif
+   endif
+endfunction
+
+comm! -nargs=? -bang IH call AlternateOpenFileUnderCursor("n<bang>", <f-args>)
+comm! -nargs=? -bang IHS call AlternateOpenFileUnderCursor("h<bang>", <f-args>)
+comm! -nargs=? -bang IHV call AlternateOpenFileUnderCursor("v<bang>", <f-args>)
+comm! -nargs=? -bang IHT call AlternateOpenFileUnderCursor("t<bang>", <f-args>)
+comm! -nargs=? -bang IHN call AlternateOpenNextFile("<bang>")
+imap <Leader>ih <ESC>:IHS<CR>
+nmap <Leader>ih :IHS<CR>
+imap <Leader>is <ESC>:IHS<CR>:A<CR>
+nmap <Leader>is :IHS<CR>:A<CR>
+imap <Leader>ihn <ESC>:IHN<CR>
+nmap <Leader>ihn :IHN<CR>
+
 "function! <SID>PrintList(theList) 
 "   let n = 1
 "   let oneFile = <SID>GetNthItemFromList(a:theList, n)
 "   while (oneFile != "")
-"      Decho "list[".n."]=".oneFile
 "      let n = n + 1
 "      let oneFile = <SID>GetNthItemFromList(a:theList, n)
 "   endwhile
@@ -669,7 +791,7 @@
 " Function : EqualFilePaths (PRIVATE)
 " Purpose  : Compares two paths. Do simple string comparison anywhere but on
 "            Windows. On Windows take into account that file paths could differ
-"            in usage of separators and the fact that case does not metter.
+"            in usage of separators and the fact that case does not matter.
 "            "c:\WINDOWS" is the same path as "c:/windows". has("win32unix") Vim
 "            version does not count as one having Windows path rules.
 " Args     : path1 (IN) -- first path

Modified: trunk/packages/vim-scripts/plugin/bufexplorer.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/bufexplorer.vim?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/plugin/bufexplorer.vim (original)
+++ trunk/packages/vim-scripts/plugin/bufexplorer.vim Wed Jan 17 19:52:49 2007
@@ -10,7 +10,7 @@
 " Name Of File: bufexplorer.vim
 "  Description: Buffer Explorer Vim Plugin
 "   Maintainer: Jeff Lanzarotta (delux256-vim at yahoo dot com)
-" Last Changed: Monday, 10 March 2006
+" Last Changed: Thursday, 30 November 2006
 "      Version: See g:loaded_bufexplorer for version number.
 "        Usage: Normally, this file should reside in the plugins
 "               directory and be automatically sourced. If not, you must
@@ -39,41 +39,10 @@
 endif
 
 " Version number.
-let g:loaded_bufexplorer = "7.0.11"
-
-" Setup the global MRUList.
-let g:MRUList = ","
-
-" Setup the autocommands that handle the MRUList and other stuff.
-augroup bufexplorer
-  autocmd!
-  autocmd BufEnter * silent call <SID>MRUPush()
-  autocmd BufDelete * silent call <SID>MRUPop()
-  autocmd BufEnter \[BufExplorer\] silent call <SID>Initialize()
-  autocmd BufLeave \[BufExplorer\] silent call <SID>Cleanup()
-  autocmd VimEnter * silent call <SID>BuildInitialMRU()
-augroup End
-
-" Create commands
-if !exists(":BufExplorer")
-  command BufExplorer keepjumps :call <SID>StartBufExplorer(0)
-endif
-
-if !exists(":SBufExplorer")
-  command SBufExplorer keepjumps :call <SID>StartBufExplorer(1)
-endif
-
-if !exists(":VSBufExplorer")
-  command VSBufExplorer keepjumps :call <SID>StartBufExplorer(2)
-endif
-
-" Public Interfaces
-map <silent> <unique> <Leader>be :BufExplorer<CR>
-map <silent> <unique> <Leader>bs :SBufExplorer<CR>
-map <silent> <unique> <Leader>bv :VSBufExplorer<CR>
+let g:loaded_bufexplorer = "7.0.12"
 
 " Show default help? If you set this to 0, you're on your own remembering that
-" '?' brings up the help and what the sort order is.
+" '<F1>' brings up the help and what the sort order is.
 " 0 = Don't show, 1 = Do show.
 if !exists("g:bufExplorerDefaultHelp")
   let g:bufExplorerDefaultHelp = 1
@@ -86,7 +55,7 @@
 endif
 
 " Sort method.
-" Can be either 'number', 'name', 'mru', or 'fullpath'.
+" Can be either 'number', 'name', 'mru', 'fullpath', or 'extension'.
 if !exists("g:bufExplorerSortBy")
   let g:bufExplorerSortBy = "mru"
 endif
@@ -97,7 +66,13 @@
   let g:bufExplorerSplitBelow = &splitbelow
 endif
 
-" When opening a new window, split the new window horzontally or vertically?
+" When opening a new window, split the new windows to the right or to the left
+" of the current window?  1 = right, 0 = left.
+if !exists("g:bufExplorerSplitRight")
+  let g:bufExplorerSplitRight = &splitright
+endif
+
+" When opening a new window, split the new window horizontally or vertically?
 " '' = Horizontal, 'v' = Vertical.
 if !exists("g:bufExplorerSplitType")
   let g:bufExplorerSplitType = ""
@@ -123,8 +98,11 @@
 " 1 = forward, -1 = reverse.
 if !exists("g:bufExplorerSortDirection")
   let g:bufExplorerSortDirection = 1
+endif
+
+if g:bufExplorerSortDirection == 1
   let s:sortDirLabel = ""
-else
+elseif g:bufExplorerSortDirection = -1
   let s:sortDirLabel = "reverse "
 endif
 
@@ -141,14 +119,54 @@
   let g:bufExplorerShowDirectories = 1
 endif
 
+" Whether to show absolute paths or relative to the current directory.
+" 0 = Show absolute paths, 1 = Show relative paths
+if !exists("g:bufExplorerShowRelativePath")
+  let g:bufExplorerShowRelativePath = 0
+endif
+
 " Used to make sure that only one BufExplorer is open at a time.
 if !exists("g:bufExplorerRunning")
   let g:bufExplorerRunning = 0
 endif
 
-" Characters that must be escaped for a regular expression.
-let s:escregexp = "/*^$.~\[]"
-let s:hideNames = "\\[[^\\]]*\\]"
+" Check to make sure the Vim version 700 or greater.
+if v:version < 700
+  echo "Sorry, bufexplorer ".g:loaded_bufexplorer." ONLY runs with Vim 7.0 and greater"
+  finish
+endif
+
+let s:MRUList = []
+let s:sort_by = ["number", "name", "fullpath", "mru", "extension"]
+
+" Setup the autocommands that handle the MRUList and other stuff.
+augroup bufexplorer
+  autocmd!
+  autocmd BufEnter * call <SID>MRUPush()
+  autocmd BufEnter * call <SID>SetAltBufName()
+  autocmd BufDelete * call <SID>MRUPop()
+  autocmd BufWinEnter \[BufExplorer\] call <SID>Initialize()
+  autocmd BufWinLeave \[BufExplorer\] call <SID>Cleanup()
+  autocmd VimEnter * call <SID>BuildInitialMRU()
+augroup End
+
+" Create commands
+if !exists(":BufExplorer")
+  command BufExplorer :call <SID>StartBufExplorer("drop")
+endif
+
+if !exists(":SBufExplorer")
+  command SBufExplorer :call <SID>StartBufExplorer("sp")
+endif
+
+if !exists(":VSBufExplorer")
+  command VSBufExplorer :call <SID>StartBufExplorer("vsp")
+endif
+
+" Public Interfaces
+map <silent> <unique> <Leader>be :BufExplorer<CR>
+map <silent> <unique> <Leader>bs :SBufExplorer<CR>
+map <silent> <unique> <Leader>bv :VSBufExplorer<CR>
 
 " Winmanager Integration {{{
 let g:BufExplorer_title = "\[Buf\ List\]"
@@ -162,8 +180,8 @@
 " plugin was called. in a standalone fashion or by winmanager.
 function! BufExplorer_Start()
   let b:displayMode = "winmanager"
-  let s:bufExplorerSplitWindow = 0
-  call s:StartBufExplorer(0)
+
+  call s:StartBufExplorer("e")
 endfunction
 
 " Returns whether the display is okay or not.
@@ -174,7 +192,8 @@
 " Handles dynamic refreshing of the window.
 function! BufExplorer_Refresh()
   let b:displayMode = "winmanager"
-  call s:StartBufExplorer(0)
+
+  call s:StartBufExplorer("e")
 endfunction
 
 " Handles dynamic resizing of the window.
@@ -188,32 +207,33 @@
     return
   end
 
-  let nlines = line("$")
-
-  if nlines > g:bufExplorerMaxHeight
-    let nlines = g:bufExplorerMaxHeight
-  endif
+  let nlines = min([line("$"), g:bufExplorerMaxHeight])
 
   exe nlines." wincmd _"
 
   " The following lines restore the layout so that the last file line is also
-  " the last window line. sometimes, when a line is deleted, although the
+  " the last window line. Sometimes, when a line is deleted, although the
   " window size is exactly equal to the number of lines in the file, some of
   " the lines are pushed up and we see some lagging '~'s.
   let presRow = line(".")
   let presCol = virtcol(".")
+
   exe $
+
   let _scr = &scrolloff
   let &scrolloff = 0
+
   normal! z-
+
   let &scrolloff = _scr
+
   exe presRow
-  exe "normal! ".presCol."|"
+  exe "keepjumps normal! ".presCol."|"
 endfunction
 " --- End Winmanager Integration
 
 " Initialize {{{1
-function! <SID>Initialize()
+function! s:Initialize()
   let s:_insertmode = &insertmode
   set noinsertmode
 
@@ -225,81 +245,88 @@
 
   let s:_report = &report
   let &report = 10000
+
+  let s:_list = &list
+  set nolist
 
   setlocal nonumber
   setlocal foldcolumn=0
   setlocal nofoldenable
-
-  let s:_splitType = g:bufExplorerSplitType
+  setlocal cursorline
+  setlocal nospell
 
   let g:bufExplorerRunning = 1
 endfunction
 
 " Cleanup {{{1
-function! <SID>Cleanup()
+function! s:Cleanup()
   let &insertmode = s:_insertmode
   let &showcmd = s:_showcmd
   let &cpo = s:_cpo
   let &report = s:_report
-  let g:bufExplorerSplitType = s:_splitType
-
+  let &list = s:_list
   let g:bufExplorerRunning = 0
 endfunction
 
 " StartBufExplorer {{{1
-function! <SID>StartBufExplorer(split)
+function! s:StartBufExplorer(split)
+  let name = '[BufExplorer]'
+
+  if !has("win32")
+    " On non-Windows boxes, escape the name so that is shows up correctly.
+    let name = escape(name, "[]")
+  endif
+
   " Make sure there is only one explorer open at a time.
   if g:bufExplorerRunning == 1
-    return
-  endif
-
-  if <SID>DoAnyMoreBuffersExist() == 0
+    " Go to the open buffer.
+    exec "drop" name
+    return
+  endif
+
+  silent let s:raw_buffer_listing = s:GetBufferList()
+
+  if s:DoAnyMoreBuffersExist() == 0
+    echo "\r"
     echohl WarningMsg | echo "Sorry, there are no more buffers to explore"
     echohl none
-    return
-  endif
-
-  let _splitbelow = &splitbelow
-
-  if a:split == 2
-    let g:bufExplorerSplitType = "v"
-  endif
-
-  " Get the current and alternate buffer numbers for later.
-  let s:curBufNbr = <SID>MRUGet(1)
-  let s:altBufNbr = <SID>MRUGet(2)
-
-  let &splitbelow = g:bufExplorerSplitBelow
+
+    return
+  endif
+
+  " Get the alternate buffer number for later, just in case
+  let nr = bufnr("#")
+  if buflisted(nr)
+    let s:altBufNbr = nr
+  endif
+
+  let s:numberOfOpenWindows = winnr("$")
+  let s:MRUListSaved = copy(s:MRUList)
 
   if !exists("b:displayMode") || b:displayMode != "winmanager"
-    if a:split || (&modified && &hidden == 0)
-      if has("win32")
-        exe "silent! ".g:bufExplorerSplitType."sp [BufExplorer]"
-      else
-        exe "silent! ".g:bufExplorerSplitType."sp \[BufExplorer\]"
+    " Do not use keepalt when opening bufexplorer to allow the buffer that we
+    " are leaving to become the new alternate buffer
+    let [_splitbelow, _splitright] = [&splitbelow, &splitright]
+    let [&splitbelow, &splitright] = [g:bufExplorerSplitBelow, g:bufExplorerSplitRight]
+    exe "silent!" a:split name
+    let [&splitbelow, &splitright] = [_splitbelow, _splitright]
+
+    let s:splitWindow = winnr("$") > s:numberOfOpenWindows
+
+    if s:splitWindow
+      " Resize
+      let [s, c] = (a:split =~ "v") ? [g:bufExplorerSplitVertSize, "|"] : [g:bufExplorerSplitHorzSize, "_"]
+      if (s > 0)
+        exe s "wincmd" c
       endif
-
-      let s:bufExplorerSplitWindow = 1
-
-      call <SID>Resize()
-    else
-      if has("win32")
-        exe "silent! e [BufExplorer]"
-      else
-        exe "silent! e \[BufExplorer\]"
-      endif
-
-      let s:bufExplorerSplitWindow = 0
-    endif
-  endif
-
-  call <SID>DisplayBufferList()
-
-  let &splitbelow = _splitbelow
+    endif
+  endif
+
+  call s:DisplayBufferList()
 endfunction
 
 " DisplayBufferList {{{1
-function! <SID>DisplayBufferList()
+function! s:DisplayBufferList()
   setlocal bufhidden=delete
   setlocal buftype=nofile
   setlocal modifiable
@@ -307,11 +334,13 @@
   setlocal nowrap
 
   if has("syntax")
-    call <SID>SetupSyntax()
-  endif
-
-  call <SID>MapKeys()
-  call <SID>BuildBufferList()
+    call s:SetupSyntax()
+  endif
+
+  call s:MapKeys()
+  call s:AddHeader()
+  call s:BuildBufferList()
+  call cursor(s:firstBufferLine, 1)
 
   if !g:bufExplorerResize
     normal! zz
@@ -321,51 +350,49 @@
 endfunction
 
 " MapKeys {{{1
-function! <SID>MapKeys()
+function! s:MapKeys()
   if exists("b:displayMode") && b:displayMode == "winmanager"
     nnoremap <buffer> <silent> <tab> :call <SID>SelectBuffer(1)<cr>
   endif
 
-  nnoremap <buffer> <silent> ? :call <SID>ToggleHelp()<cr>
+  nnoremap <buffer> <silent> <F1> :call <SID>ToggleHelp()<cr>
   nnoremap <buffer> <silent> <2-leftmouse> :call <SID>SelectBuffer(0)<cr>
   nnoremap <buffer> <silent> <cr> :call <SID>SelectBuffer(0)<cr>
+  nnoremap <buffer> <silent> d :call <SID>DeleteBuffer()<cr>
+  nnoremap <buffer> <silent> m :call <SID>MRUListShow()<cr>
+
+  if s:splitWindow == 1
+    nnoremap <buffer> <silent> o :call <SID>ToggleOpenMode()<cr>
+  endif
+
+  nnoremap <buffer> <silent> p :call <SID>ToggleSplitOutPathName()<cr>
+  nnoremap <buffer> <silent> q :call <SID>Close()<cr>
+  nnoremap <buffer> <silent> r :call <SID>SortReverse()<cr>
+  nnoremap <buffer> <silent> R :call <SID>ToggleShowRelativePath()<cr>
+  nnoremap <buffer> <silent> s :call <SID>SortSelect()<cr>
   nnoremap <buffer> <silent> S :call <SID>SelectBuffer(1)<cr>
-  nnoremap <buffer> <silent> d :call <SID>DeleteBuffer()<cr>
-
-  if s:bufExplorerSplitWindow == 1
-    nnoremap <buffer> <silent> o :call <SID>ToggleOpenMode()<cr>
-    nnoremap <buffer> <silent> t :call <SID>ToggleSplitType()<cr>
-  endif
-
-  nnoremap <buffer> <silent> m :call <SID>MRUListShow()<cr>
-  nnoremap <buffer> <silent> p :call <SID>ToggleSplitOutPathName()<cr>
-  nnoremap <buffer> <silent> q :call <SID>BackToPreviousBuffer()<cr>
-  nnoremap <buffer> <silent> r :call <SID>SortReverse()<cr>
-  nnoremap <buffer> <silent> s :call <SID>SortSelect()<cr>
+  nnoremap <buffer> <silent> t :call <SID>ToggleSplitType()<cr>
+
+  for k in ["G", "n", "N", "L", "M", "H"]
+    exec "nnoremap <buffer> <silent>" k ":keepjumps normal!" k."<cr>"
+  endfor
 endfunction
 
 " SetupSyntax {{{1
 if has("syntax")
-  function! <SID>SetupSyntax()
+  function! s:SetupSyntax()
     syn match bufExplorerHelp     "^\"[ -].*"
     syn match bufExplorerHelpEnd  "^\"=.*$"
     syn match bufExplorerSortBy   "^\" Sorted by .*$"
     syn match bufExplorerOpenIn   "^\" Open in .*$"
     syn match bufExplorerBufNbr   /^\s*\d\+/
 
-    syn cluster bufExpFlags contains=bufExplorerBufNbr,bufExpFlagCurBuf,bufExpFlagAltBuf,bufExpFlagActBuf,bufExpFlagModBuf,bufExpFlagLockedBuf,bufExpFlagTagged
-    syn match bufExpFlagCurBuf contained /%/
-    syn match bufExpFlagAltBuf contained /#/
-    syn match bufExpFlagHidBuf contained /h/
-    syn match bufExpFlagActBuf contained /a/
-    syn match bufExpFlagModBuf contained /+/
-    syn match bufExpFlagLockedBuf contained /[\-=]/
-    syn match bufExplorerHidBuf contains=bufExplorerBufFlg /^\s*\d\+[u ][%# ]h.*$/
-    syn match bufExplorerActBuf contains=bufExplorerBufFlg /^\s*\d\+[u ][%# ]a.*$/
-    syn match bufExplorerCurBuf contains=bufExplorerBufFlg /^\s*\d\+[u ]%.*$/
-    syn match bufExplorerAltBuf contains=bufExplorerBufFlg /^\s*\d\+[u ]#.*$/
-    syn match bufExplorerModBuf contains=bufExplorerBufFlg /^\s*\d\+[u ][%# ][ha ][\-= ]+.*$/
-    syn match bufExplorerLockedBuf contains=bufExplorerBufFlg /^\s*\d\+[u ][%# ][ha ][\-=].*$/
+    syn match bufExplorerModBuf    /^\s*\d\+.\{4}+.*$/
+    syn match bufExplorerLockedBuf /^\s*\d\+.\{3}[\-=].*$/
+    syn match bufExplorerHidBuf    /^\s*\d\+.\{2}h.*$/
+    syn match bufExplorerActBuf    /^\s*\d\+.\{2}a.*$/
+    syn match bufExplorerCurBuf    /^\s*\d\+.%.*$/
+    syn match bufExplorerAltBuf    /^\s*\d\+.#.*$/
 
     if !exists("g:did_bufexplorer_syntax_inits")
       let g:did_bufexplorer_syntax_inits = 1
@@ -376,284 +403,226 @@
       hi def link bufExplorerOpenIn String
       hi def link bufExplorerSortBy String
 
-      hi def link bufExpFlagUnlisted Comment
-      hi def link bufExpFlagHidBuf Constant
-      hi def link bufExpFlagActBuf Identifier
-      hi def link bufExpFlagCurBuf Type
-      hi def link bufExpFlagAltBuf String
-      hi def link bufExpFlagModBuf Exception
-      hi def link bufExpFlagLockedBuf Special
       hi def link bufExpFlagTagged Statement
-      hi def link bufExplorerUnlisted bufExpFlagUnlisted
-      hi def link bufExplorerHidBuf bufExpFlagHidBuf
-      hi def link bufExplorerActBuf bufExpFlagActBuf
-      hi def link bufExplorerCurBuf bufExpFlagCurBuf
-      hi def link bufExplorerAltBuf bufExpFlagAltBuf
-      hi def link bufExplorerModBuf bufExpFlagModBuf
-      hi def link bufExplorerLockedBuf bufExpFlagLockedBuf
+      hi def link bufExplorerUnlisted Comment
+      hi def link bufExplorerHidBuf Constant
+      hi def link bufExplorerActBuf Identifier
+      hi def link bufExplorerCurBuf Type
+      hi def link bufExplorerAltBuf String
+      hi def link bufExplorerModBuf Exception
+      hi def link bufExplorerLockedBuf Special
     endif
   endfunction
 endif
 
+" GetHelpStatus {{{1
+function! s:GetHelpStatus()
+  let h = '" Sorted by '.s:sortDirLabel.g:bufExplorerSortBy
+
+  if s:splitWindow == 1
+    if g:bufExplorerOpenMode == 1
+      let h .= ' | Open in Same window'
+    else
+      let h .= ' | Open in New window'
+    endif
+  endif
+
+  if empty(g:bufExplorerSplitType)
+    let h .= ' | Horizontal split'
+  else
+    let h .= ' | Vertical split'
+  endif
+
+  return h
+endfunction
+
 " AddHeader {{{1
-function! <SID>AddHeader()
+function! s:AddHeader()
   if g:bufExplorerDefaultHelp == 0 && g:bufExplorerDetailedHelp == 0
-    return
-  endif
-
-  1
+    let s:firstBufferLine = 1
+    return
+  endif
+
+  let header = []
 
   if g:bufExplorerDetailedHelp == 1
-    let header = "\" Buffer Explorer (".g:loaded_bufexplorer.")\n"
-    let header = header."\" --------------------------\n"
-    let header = header."\" <enter> or Mouse-Double-Click : open buffer under cursor\n"
-    let header = header."\" S : open buffer under cursor in new split window\n"
-    let header = header."\" d : delete buffer\n"
-
-    if s:bufExplorerSplitWindow == 1
-      let header = header."\" o : toggle open mode\n"
-    endif
-
-    let header = header."\" p : toggle spliting of file and path name\n"
-    let header = header."\" q : quit the Buffer Explorer\n"
-    let header = header."\" s : select sort field\n"
-
-    if s:bufExplorerSplitWindow == 1
-      let header = header."\" t : toggle split type\n"
-    endif
-
-    let header = header."\" r : reverse sort\n"
-    let header = header."\" ? : toggle this help\n"
+    call add(header, '" Buffer Explorer ('.g:loaded_bufexplorer.')')
+    call add(header, '" --------------------------')
+    call add(header, '" <F1> : toggle this help')
+    call add(header, '" <enter> or Mouse-Double-Click : open buffer under cursor')
+    call add(header, '" S : open buffer under cursor in new split window')
+    call add(header, '" d : delete buffer')
+
+    if s:splitWindow == 1
+      call add(header, '" o : toggle open mode')
+    endif
+
+    call add(header, '" p : toggle spliting of file and path name')
+    call add(header, '" R : toggle showing relative or short paths')
+    call add(header, '" q : quit the Buffer Explorer')
+    call add(header, '" s : select sort field '.string(s:sort_by).'')
+
+    if s:splitWindow == 1
+      call add(header, '" t : toggle split type')
+    endif
+
+    call add(header, '" r : reverse sort')
   else
-    let header = "\" Press ? for Help\n"
-  endif
-
-  let header = header."\" Sorted by ".s:sortDirLabel.g:bufExplorerSortBy
-
-  if s:bufExplorerSplitWindow == 1
-    if g:bufExplorerOpenMode == 1
-      let header = header." | Open in Same window"
+    call add(header, '" Press <F1> for Help')
+  endif
+
+  let h = s:GetHelpStatus()
+
+  call add(header, h)
+  call add(header, '"=')
+  let s:firstBufferLine = len(header) + 1
+  call setline(1, header)
+endfunction
+
+" GetBufferList {{{1
+function! s:GetBufferList()
+  redir => bufoutput
+  buffers
+  redir END
+
+  let bufs = split(bufoutput, '\n')
+  let all = []
+  let bufferNameWidths = []
+
+  for buf in bufs
+    let b = {}
+    let bufName = matchstr(buf, '"\zs.\+\ze"')
+    let nameOnly = fnamemodify(bufName, ":t")
+
+    if (nameOnly =~ '^\[.\+\]')
+      let b["fullname"] = nameOnly
+      let b["shortname"] = nameOnly
+      let b["relativename"] = nameOnly
+      let b["path"] = ""
+      let b["relativepath"] = ""
     else
-      let header = header." | Open in New window"
-    endif
-
-    if g:bufExplorerSplitType == ""
-      let header = header." | Horizontal split\n"
-    else
-      let header = header." | Vertical split\n"
-    endif
-  else
-    let header = header."\n"
-  endif
-
-  let header = header."\"=\n"
-
-  silent! put! = header
+      let b["relativename"] = fnamemodify(bufName, ':~:.')
+      let b["fullname"] = fnamemodify(bufName, ":p")
+
+      if getftype(b["fullname"]) == "dir" && g:bufExplorerShowDirectories == 1
+        let b["shortname"] = "<DIRECTORY>"
+      else
+        let b["shortname"] = fnamemodify(bufName, ":t")
+      end
+
+      let b["relativepath"] = fnamemodify(b["relativename"], ':h')
+      let b["path"] = fnamemodify(b["fullname"], ":h")
+    endif
+
+    let b["attributes"] = matchstr(buf, '^\zs.\{-1,}\ze"')
+    call add(all, b)
+
+    call add(bufferNameWidths, strlen(b["shortname"]))
+  endfor
+
+  let s:maxBufferNameWidth = max(bufferNameWidths)
+
+  return all
 endfunction
 
 " BuildBufferList {{{1
-function! <SID>BuildBufferList()
-  " Delete all lines in buffer.
-  silent! 1,$d _
-
-  call <SID>AddHeader()
-
-  $d _
-
-  " Prevent odd huge indent when first invoked.
-  normal! 0
-
-  let nBuffers = bufnr('$')     " Get the number of the last buffer.
-  let i = 0
-  let fileNames = ''
-  let maxBufferNameWidth = 0
-  let maxBufferNbrWidth = 0
-
-  " Preprocess the list of buffers.
-  " Find the max buffer name and buffer number.
-  while (i <= nBuffers)
-    let i = i + 1
-
-    if (getbufvar(i, '&buflisted') == 1)
-      let bufName = bufname(i)
-
-      if (bufName != '[BufExplorer]')
-        let length = strlen(i)
-
-        if (maxBufferNbrWidth < length)
-          let maxBufferNbrWidth = length
-        endif
-
-        let shortBufName = fnamemodify(bufName, ":t")
-        let length = strlen(shortBufName)
-
-        if (maxBufferNameWidth < length)
-          let maxBufferNameWidth = length
-        endif
-      endif
-    endif
-  endwhile
-
-  " Loop through every buffer less than the total number of buffers.
-  let i = 0
-  while (i <= nBuffers)
-    let i = i + 1
-
-    " Make sure the buffer in question is listed.
-    if (getbufvar(i, '&buflisted') == 1)
-      " Get the name of the buffer.
-      let bufName = bufname(i)
-
-      " Only show modifiable buffers (The idea is that we don't 
-      " want to show Explorers)
-      if (bufName != '[BufExplorer]')
-        " Get filename & Remove []'s & ()'s
-        let shortBufName = fnamemodify(bufName, ":t")
-        let pathName = fnamemodify(bufName, ":p:h")
-
-        if v:version >= 700
-          let _ftype = getftype(bufName)
-
-          if _ftype == "dir" && g:bufExplorerShowDirectories == 1
-            let shortBufName = "<DIRECTORY>"
-          end
-        end
-
-        " If the buffer is modified then mark it.
-        if (getbufvar(i, '&modified') == 1)
-          let modified = "+"
-        else
-          let modified = " "
-        endif
-
-        " Create the pad for the buffer number.
-        let diffWidth = maxBufferNbrWidth - strlen(i)
-        let nbrPad = "  "
-
-        while (diffWidth)
-          let nbrPad = nbrPad." "
-          let diffWidth = diffWidth - 1
-        endwhile
-
-        " Format the final line and add it to the buffer.
-        if g:bufExplorerSplitOutPathName
-          " Create the pad for the buffer name if needed.
-          let diffWidth = maxBufferNameWidth - strlen(shortBufName)
-          let namePad = " "
-
-          while (diffWidth)
-            let namePad = namePad." "
-            let diffWidth = diffWidth - 1
-          endwhile
-
-          let fileNames = fileNames.nbrPad.i."    ".modified." ".shortBufName.namePad.pathName."\n"
-        else
-          let separator = ""
-
-          if pathName !~ '[/\\]$'
-            " Check if we are using shellslash or not?
-            if (&ssl == 0) && (has("msdos") || has("os2") || has("win16") || has("win32"))
-              let separator = "\\"
-            else
-              let separator = "/"
-            end
-          end
-
-          let fileNames = fileNames.nbrPad.i."    ".modified." ".pathName.separator.shortBufName."\n"
-        end
-      endif
-    endif
-  endwhile
-
-  if fileNames != ""
-    " Mark the current and alternate buffers.
-    if match(fileNames, "\\%(^\\|\n\\)\\s*" . s:curBufNbr . "[u ]") != -1
-      let fileNames = substitute(fileNames, "\\(\\%(^\\|\n\\)\\s*\\d\\+\\%( \\|u\\)\\)%", "\\1 ", "")
-      let fileNames = substitute(fileNames, "\\(\\%(^\\|\n\\)\\s*" . s:curBufNbr . "\\%( \\|u\\)\\).", "\\1%", "")
-    endif
-
-    if match(fileNames, "\\%(^\\|\n\\)\\s*" . s:altBufNbr . "[u ]") != -1
-      let fileNames = substitute(fileNames, "\\(\\%(^\\|\n\\)\\s*\\d\\+\\%( \\|u\\)\\)#", "\\1 ", "")
-      let fileNames = substitute(fileNames, "\\(\\%(^\\|\n\\)\\s*" . s:altBufNbr . "\\%( \\|u\\)\\).", "\\1#", "")
-    endif
-  endif
-
-  " Get the line number of the last line of the header + 1 if there is
-  " actually a header.
-  if g:bufExplorerDefaultHelp == 0
-    let _lineNbr = 0
-  else
-    let _lineNbr = line(".") + 1
-  endif
-
-  silent! put = fileNames
-
-  call <SID>SortListing()
+function! s:BuildBufferList()
+  let lines = []
+
+  let pathPad = repeat(' ', s:maxBufferNameWidth)
+
+  " Loop through every buffer.
+  for buf in s:raw_buffer_listing
+     let line = buf["attributes"]." "
+
+     if g:bufExplorerSplitOutPathName
+       let path = (g:bufExplorerShowRelativePath) ? buf["relativepath"] : buf["path"]
+       let line .= buf["shortname"].strpart(pathPad.path, strlen(buf["shortname"]) - 1)
+     else
+       let line .= (g:bufExplorerShowRelativePath) ? buf["relativename"] : buf["fullname"]
+     endif
+
+     call add(lines, line)
+  endfor
+
+  call setline(s:firstBufferLine, lines)
+
+  call s:SortListing()
 endfunction
 
 " SelectBuffer {{{1
-function! <SID>SelectBuffer(...)
+function! s:SelectBuffer(split)
+  " Sometimes messages are not cleared when we get here so it looks like an
+  " error has occurred when it really has not.
+  echo ""
+
   " Are we on a line with a file name?
   if getline('.') =~ '^"'
     return
   endif
 
-  let _bufNbr = <SID>ExtractBufferNbr(getline('.'))
+  let _bufNbr = s:ExtractBufferNbr(getline('.'))
 
   if exists("b:displayMode") && b:displayMode == "winmanager"
     let bufname = expand("#"._bufNbr.":p")
-    call WinManagerFileEdit(bufname, a:1)
+
+    call WinManagerFileEdit(bufname, a:split)
+
     return
   end
 
-  if bufexists(_bufNbr) != 0
-    if g:bufExplorerOpenMode == 1 && s:bufExplorerSplitWindow == 1
-      silent! bd!
-    endif
-
-    " Switch to the previously open buffer. This sets the alternate file
-    " to the correct one, so that when we switch to the new buffer, the
-    " alternate buffer is correct. But if switching to current buffer again,
-    " restore the alternate one.
-    if s:curBufNbr == _bufNbr
-      exe "silent! b! " . s:altBufNbr
-    else
-      exe "silent! b! " . s:curBufNbr
-    endif
-
-    " If we are doing a 'normal' SelectBuffer, 0 was passed in. If '1'
-    " is passed in, the user has choosen to do a 'Split Select'.
-    if a:1 != 1
-      exe "b! " . _bufNbr
-    else
-      exe "silent! ".g:bufExplorerSplitType."sb "._bufNbr
-    endif
-
-    call <SID>MRUPush()
+  if bufexists(_bufNbr)
+    let ka = "keepalt"
+
+    " bufExplorerOpenMode: 1 == use current, 0 == use new
+    if (g:bufExplorerOpenMode && s:splitWindow) || (!s:splitWindow && a:split)
+      " we will return to the previous buffer before opening the new one, so
+      " be sure to not use the keepalt modifier
+      silent bd!
+      let ka = ""
+    endif
+
+    if bufnr("#") == _bufNbr
+      " we are about to set the % # buffers to the same thing, so open the
+      " original alt buffer first to restore it. This only happens when
+      " selecting the current (%) buffer.
+      try
+        exe "keepjumps silent! b!" s:altBufNbr
+      catch
+      endtry
+
+      let ka = ""
+    endif
+
+    let cmd = (a:split) ? (g:bufExplorerSplitType == "v") ? "vert sb" : "sb" : "b!"
+    let [_splitbelow, _splitright] = [&splitbelow, &splitright]
+    let [&splitbelow, &splitright] = [g:bufExplorerSplitBelow, g:bufExplorerSplitRight]
+    exe ka "keepjumps silent" cmd _bufNbr
+    let [&splitbelow, &splitright] = [_splitbelow, _splitright]
   else
     setlocal modifiable
-    d _
+    keepjumps d _
     setlocal nomodifiable
+
     echoerr "Sorry, that buffer no longer exists, please select another"
   endif
 endfunction
 
 " DeleteBuffer {{{1
-function! <SID>DeleteBuffer()
+function! s:DeleteBuffer()
   if getline('.') =~ '^"'
     return
   endif
 
-  let _bufNbr = <SID>ExtractBufferNbr(getline('.'))
-
-  " If there are 2 or less ',' in the MRUList, then this is the last buffer,
-  " do not allow this buffer to be deleted.
-  if strlen(substitute(g:MRUList, "[^,]", "","g")) <= 2
+  let _bufNbr = s:ExtractBufferNbr(getline('.'))
+
+  " Do not allow this buffer to be deleted if it is the last one.
+  if len(s:MRUList) == 1
     echohl ErrorMsg | echo "Sorry, you are not allowed to delete the last buffer"
-    return
-  endif
-
-  setlocal modifiable
+    echohl none
+
+    return
+  endif
 
   " These commands are to temporarily suspend the activity of winmanager.
   if exists("b:displayMode") && b:displayMode == "winmanager"
@@ -662,9 +631,19 @@
 
   if getbufvar(_bufNbr, '&modified') == 1
     echohl ErrorMsg | echo "Sorry, no write since last change for buffer "._bufNbr.", unable to delete"
+    echohl none
   else
     exe "silent! bw "._bufNbr
-    d _
+
+    setlocal modifiable
+    " Does not move cursor (d _ does)
+    keepjumps normal! "_dd
+    setlocal nomodifiable
+
+    call s:MRUPop(_bufNbr)
+
+    " Delete the buffer from the raw buffer list
+    call filter(s:raw_buffer_listing, 'v:val["attributes"] !~ " '._bufNbr.' "')
   endif
 
   " Reactivate winmanager autocommand activity.
@@ -672,48 +651,70 @@
     call WinManagerForceReSize("BufExplorer")
     call WinManagerResumeAUs()
   end
+endfunction
+
+" Close {{{1
+function! s:Close()
+  let alt = bufnr("#")
+
+  if (s:numberOfOpenWindows > 1 && !s:splitWindow)
+    " if we "bw" in this case, then the previously existing split will be
+    " lost, so open the most recent item in the MRU list instead.
+    for b in s:MRUListSaved
+      try
+        exec "silent b" b
+        break
+      catch
+      endtry
+    endfor
+  else
+    " If this is the only window, then let Vim choose the buffer to go to.
+    bw!
+  endif
+
+  if (alt == bufnr("%"))
+    " This condition is true most of the time. The alternate buffer is the one
+    " that we just left when we opened the bufexplorer window. Vim will select
+    " another buffer for us if we've deleted the current buffer. In that case,
+    " we will not need to restore the alternate buffer because it was
+    " clobbered anyway.
+    try
+      " Wrap this into a try/catch block because we do not want "b #" to execute
+      " if "b s:altBufNbr" fails
+      exec "silent b" s:altBufNbr
+      silent b #
+    catch
+    endtry
+  endif
+endfunction
+
+" ToggleHelp {{{1
+function! s:ToggleHelp()
+  let g:bufExplorerDetailedHelp = !g:bufExplorerDetailedHelp
+
+  " Save position
+  let orig_size = line("$")
+  let [line, col] = [line("."), col('.')]
+
+  " get list of buffers
+  let buffs = getline(1, "$")
+  call filter(buffs, 'v:val !~ "^\""')
+
+  setlocal modifiable
+
+  " Remove old info
+  keepjumps silent! % d _
+
+  call <SID>AddHeader()
+
+  call setline(s:firstBufferLine, buffs)
 
   setlocal nomodifiable
-endfunction
-
-" BackToPreviousBuffer {{{1
-function! <SID>BackToPreviousBuffer()
-  if s:bufExplorerSplitWindow == 1
-    exe "silent! close!"
-  endif
-
-  let _switched = 0
-
-  if s:altBufNbr > 0
-    exe "silent! b! ".s:altBufNbr
-    let _switched = 1
-  endif
-
-  if s:curBufNbr > 0
-    let _switched = 1
-
-    try
-      exe "silent b! ".s:curBufNbr
-    catch /^Vim(\a\+):E86:/
-      echohl WarningMsg | echo "Current buffer was deleted, please select a buffer to switch to"
-      echohl none
-    endtry
-  endif
-
-  if _switched == 0
-    if s:bufExplorerSplitWindow == 1 && bufwinnr("$") > 1
-      new
-    else
-      enew
-    endif
-  endif
-endfunction
-
-" ToggleHelp {{{1
-function! <SID>ToggleHelp()
-  let g:bufExplorerDetailedHelp = !g:bufExplorerDetailedHelp
-
-  call <SID>UpdateHeader()
+
+  let new_size = line("$")
+  let line = line + new_size - orig_size
+
+  call cursor(line, col)
 
   if exists("b:displayMode") && b:displayMode == "winmanager"
     call WinManagerForceReSize("BufExplorer")
@@ -721,177 +722,74 @@
 endfunction
 
 " ToggleSplitOutPathName {{{1
-function! <SID>ToggleSplitOutPathName()
+function! s:ToggleSplitOutPathName()
   let g:bufExplorerSplitOutPathName = !g:bufExplorerSplitOutPathName
   setlocal modifiable
 
-  call <SID>SaveCursorPosition()
+  let curPos = getpos('.')
+
   call <SID>BuildBufferList()
-  call <SID>RestoreCursorPosition()
+  call setpos('.', curPos)
 
   setlocal nomodifiable
 endfunction
 
+" ToggleShowRelativePath {{{1
+function! s:ToggleShowRelativePath()
+  let g:bufExplorerShowRelativePath = !g:bufExplorerShowRelativePath
+  setlocal modifiable
+
+  let curPos = getpos('.')
+
+  call <SID>BuildBufferList()
+  call setpos('.', curPos)
+
+  setlocal nomodifiable
+endfunction
+
 " ToggleOpenMode {{{1
-function! <SID>ToggleOpenMode()
+function! s:ToggleOpenMode()
   let g:bufExplorerOpenMode = !g:bufExplorerOpenMode
-  call <SID>UpdateHeader()
+  if s:firstBufferLine > 1
+    setlocal modifiable
+
+    let text = s:GetHelpStatus()
+    call setline(s:firstBufferLine - 2, text)
+
+    setlocal nomodifiable
+  endif
 endfunction
 
 " ToggleSplitType {{{1
-function! <SID>ToggleSplitType()
-  if g:bufExplorerSplitType == ""
+function! s:ToggleSplitType()
+  if empty(g:bufExplorerSplitType)
     let g:bufExplorerSplitType = "v"
   else
     let g:bufExplorerSplitType = ""
   endif
 
-  call <SID>UpdateHeader()
-endfunction
-
-" UpdateHeader {{{1
-function! <SID>UpdateHeader()
-  setlocal modifiable
-
-  " Save position
-  normal! mZ
-
-  " Remove old header
-  0
-  silent! 1,/^"=/ d _
-
-  call <SID>CleanUpHistory()
-  call <SID>AddHeader()
-
-  " Jump back where we came from if possible.
-  0
-  if line("'Z") != 0
-    normal! `Z
-  endif
-
-  setlocal nomodifiable
-endfunction
-
-" ExtractFileName {{{1
-function! <SID>ExtractFileName(line)
-  return strpart(a:line, strlen(matchstr(a:line, "^\\s*\\d\\+")) + 6)
+  if s:firstBufferLine > 1
+    setlocal modifiable
+
+    let text = s:GetHelpStatus()
+    call setline(s:firstBufferLine - 2, text)
+
+    setlocal nomodifiable
+  endif
 endfunction
 
 " ExtractBufferNbr {{{1
-function! <SID>ExtractBufferNbr(line)
-  return matchstr(a:line, "\\d\\+") + 0
-endfunction
-
-" FileNameCmp {{{1
-function! <SID>FileNameCmp(line1, line2, direction)
-  let f1 = <SID>ExtractFileName(a:line1)
-  let f2 = <SID>ExtractFileName(a:line2)
-  return <SID>StrCmp(toupper(f1), toupper(f2), a:direction)
-endfunction
-
-" BufferNumberCmp {{{1
-function! <SID>BufferNumberCmp(line1, line2, direction)
-  let f1 = <SID>ExtractBufferNbr(a:line1)
-  let f2 = <SID>ExtractBufferNbr(a:line2)
-  return <SID>StrCmp(f1, f2, a:direction)
-endfunction
-
-" StrCmp {{{1
-function! <SID>StrCmp(line1, line2, direction)
-  if a:line1 < a:line2
-    return -a:direction
-  elseif a:line1 > a:line2
-    return a:direction
-  else
-    return 0
-  endif
+function! s:ExtractBufferNbr(line)
+  return matchstr(a:line, '\d\+') + 0
 endfunction
 
 " MRUCmp {{{1
-function! <SID>MRUCmp(line1, line2, direction)
-  let n1 = <SID>ExtractBufferNbr(a:line1)
-  let n2 = <SID>ExtractBufferNbr(a:line2)
-  let i1 = stridx(g:MRUList, ','.n1.',')
-  let i2 = stridx(g:MRUList, ','.n2.',')
-
-  " Compare the indices only if they are both in the MRU. Otherwise, if
-  " one of the buffer numbers is not in the mru list, define the other as the
-  " 'smaller'. If both buffers are not in the mru list, then compare their
-  " buffer numbers.
-  let val = a:direction*(i1 - i2)*(i1 != -1 && i2 != -1)
-        \ - a:direction*( (i1 != -1 && i2 == -1) - (i1 == -1 && i2 != -1) )
-        \ + a:direction*(i1 == -1 && i2 == -1)*(n1 - n2)
-  return val
-endfunction
-
-" FullPathCmp {{{1
-function! <SID>FullPathCmp(line1, line2, direction)
-  let d1 = expand("#".<SID>ExtractBufferNbr(a:line1).":p:h")
-  let d2 = expand("#".<SID>ExtractBufferNbr(a:line2).":p:h")
-  if d1 == d2
-    return <SID>FileNameCmp(a:line1, a:line2, a:direction)
-  else
-    return <SID>StrCmp(d1, d2, a:direction)
-  endif
-endfunction
-
-" SortR *called recursively* {{{1
-function! <SID>SortR(start, end, cmp, direction)
-  " Bottom of the recursion if start reaches end
-  if a:start >= a:end
-    return
-  endif
-
-  let partition = a:start - 1
-  let middle = partition
-  let partStr = getline((a:start + a:end) / 2)
-
-  let i = a:start
-
-  while i <= a:end
-    let str = getline(i)
-
-    exe "let result = ".a:cmp."(str, partStr, ".a:direction.")"
-
-    if result <= 0
-      " Need to put it before the partition.  Swap lines i and partition.
-      let partition = partition + 1
-
-      if result == 0
-        let middle = partition
-      endif
-
-      if i != partition
-        let str2 = getline(partition)
-        call setline(i, str2)
-        call setline(partition, str)
-      endif
-    endif
-
-    let i = i + 1
-  endwhile
-
-  " Now we have a pointer to the 'middle' element, as far as partitioning
-  " goes, which could be anywhere before the partition.  Make sure it is at
-  " the end of the partition.
-  if middle != partition
-    let str = getline(middle)
-    let str2 = getline(partition)
-    call setline(middle, str2)
-    call setline(partition, str)
-  endif
-
-  call <SID>SortR(a:start, partition - 1, a:cmp, a:direction)
-  call <SID>SortR(partition + 1, a:end, a:cmp, a:direction)
-endfunction
-
-" Sort {{{1
-function! <SID>Sort(cmp, direction) range
-  call <SID>SortR(a:firstline, a:lastline, a:cmp, a:direction)
+function! s:MRUCmp(line1, line2)
+  return index(s:MRUList, s:ExtractBufferNbr(a:line1)) - index(s:MRUList, s:ExtractBufferNbr(a:line2))
 endfunction
 
 " SortReverse {{{1
-function! <SID>SortReverse()
+function! s:SortReverse()
   if g:bufExplorerSortDirection == -1
     let g:bufExplorerSortDirection = 1
     let s:sortDirLabel = ""
@@ -900,174 +798,144 @@
     let s:sortDirLabel = "reverse "
   endif
 
-  call <SID>SaveCursorPosition()
+  setlocal modifiable
+
+  let curPos = getpos('.')
+
   call <SID>SortListing()
-  call <SID>RestoreCursorPosition()
+
+  if s:firstBufferLine > 1
+    let text = s:GetHelpStatus()
+    call setline(s:firstBufferLine - 2, text)
+  endif
+
+  call setpos('.', curPos)
+
+  setlocal nomodifiable
 endfunction
 
 " SortSelect {{{1
-function! <SID>SortSelect()
-  if !exists("g:bufExplorerSortBy")
-    let g:bufExplorerSortBy = "number"
-  elseif g:bufExplorerSortBy == "number"
-    let g:bufExplorerSortBy = "name"
+function! s:SortSelect()
+  let i = index(s:sort_by, g:bufExplorerSortBy)
+  let i += 1
+  let g:bufExplorerSortBy = get(s:sort_by, i, s:sort_by[0])
+
+  setlocal modifiable
+
+  let curPos = getpos('.')
+
+  call <SID>SortListing()
+
+  if s:firstBufferLine > 1
+    let text = s:GetHelpStatus()
+    call setline(s:firstBufferLine - 2, text)
+  endif
+
+  call setpos('.', curPos)
+
+  setlocal nomodifiable
+endfunction
+
+" SortListing {{{1
+function! s:SortListing()
+  let start = s:firstBufferLine
+
+  let reverse = (g:bufExplorerSortDirection == 1) ? "": "!"
+
+  if g:bufExplorerSortBy == "number"
+    " Easiest case.
+    exec start.",$sort".reverse 'n'
   elseif g:bufExplorerSortBy == "name"
-    let g:bufExplorerSortBy = "mru"
+    if g:bufExplorerSplitOutPathName
+      exec start.",$sort".reverse 'i /^\s*\d\+.\{7}/'
+    else
+      " Ignore everything in the line until the last path separator.
+      exec start.",$sort".reverse 'i /.*[\/\\]/'
+    endif
+  elseif g:bufExplorerSortBy == "fullpath"
+    if g:bufExplorerSplitOutPathName
+      " Sort twice ~ first on the file name then on the path.
+      exec start.",$sort".reverse 'i /^\s*\d\+.\{7}/'
+      exec start.",$sort".reverse 'i /^\s*\d\+.\{8}\S\+\s\+/'
+    else
+      " No-brainer, just like sort by name.
+      exec start.",$sort".reverse 'i /^\s*\d\+.\{7}/'
+    endif
+  elseif g:bufExplorerSortBy == "extension"
+    exec start.",$sort".reverse 'i /^\s*\d\+.\{7}\S*\./'
   elseif g:bufExplorerSortBy == "mru"
-    let g:bufExplorerSortBy = "fullpath"
-  elseif g:bufExplorerSortBy == "fullpath"
-    let g:bufExplorerSortBy = "number"
-  endif
-
-  call <SID>SaveCursorPosition()
-  call <SID>SortListing()
-  call <SID>RestoreCursorPosition()
-endfunction
-
-" SortListing {{{1
-function! <SID>SortListing()
-  let startline = getline(".")
-
-  setlocal modifiable
-
-  0
-
-  if g:bufExplorerSortBy == "number"
-    let cmpFunction = "<SID>BufferNumberCmp"
-  elseif g:bufExplorerSortBy == "name"
-    let cmpFunction = "<SID>FileNameCmp"
-  elseif g:bufExplorerSortBy == "mru"
-    let cmpFunction = "<SID>MRUCmp"
+    let l = getline(start, "$")
+
+    call sort(l, "<SID>MRUCmp")
+
+    if (!empty(reverse))
+      call reverse(l)
+    endif
+
+    call setline(start, l)
+  endif
+endfunction
+
+" SetAltBufName {{{1
+function! s:SetAltBufName()
+  let b:altFileName = '# '.expand("#:t")
+endfunction
+
+" MRUPush {{{1
+function! s:MRUPush()
+  let bufNbr = bufnr("%")
+
+  " Skip temporary buffer with buftype set.
+  if !empty(getbufvar(bufNbr, "&buftype"))
+    return
+  endif
+
+  if !buflisted(bufNbr)
+    return
+  end
+
+  " Don't add the BufExplorer window to the list.
+  if fnamemodify(bufname(bufNbr), ":t") == "[BufExplorer]"
+    return
+  end
+
+  call s:MRUPop(bufNbr)
+  call insert(s:MRUList,bufNbr)
+endfunction
+
+" MRUPop {{{1
+function! s:MRUPop(...)
+  let _bufNbr = (a:0) ? a:1 : bufnr("%")
+
+  let idx = index(s:MRUList, _bufNbr)
+
+  if (idx != -1)
+    call remove(s:MRUList, idx)
+  endif
+endfunction
+
+" BuildInitialMRU {{{1
+function! s:BuildInitialMRU()
+  let s:MRUList = range(1, bufnr('$'))
+  call filter(s:MRUList, 'buflisted(v:val)')
+endfunction
+
+" MRUListShow {{{1
+function! s:MRUListShow()
+  echomsg "MRUList=".string(s:MRUList)
+endfunction
+
+" DoAnyMoreBuffersExist {{{1
+function! s:DoAnyMoreBuffersExist()
+  return len(s:raw_buffer_listing) > 1
+endfunction
+
+" BufExplorerGetAltBuf {{{1
+function! BufExplorerGetAltBuf()
+  if exists("b:altFileName")
+    return b:altFileName
   else
-    let cmpFunction = "<SID>FullPathCmp"
-  endif
-
-  if g:bufExplorerDefaultHelp == 0 && g:bufExplorerDetailedHelp == 0
-    1,$call <SID>Sort(cmpFunction, g:bufExplorerSortDirection)
-  else
-    /^"=/+1,$call <SID>Sort(cmpFunction, g:bufExplorerSortDirection)
-  endif
-
-  call <SID>CleanUpHistory()
-  call <SID>UpdateHeader()
-
-  setlocal nomodified
-  setlocal nomodifiable
-endfunction
-
-" SaveCursorPosition {{{1
-function! <SID>SaveCursorPosition()
-  let s:curLine = winline()
-  let s:curColumn = wincol()
-endfunction
-
-" RestoreCursorPosition {{{1
-function! <SID>RestoreCursorPosition()
-  exe s:curLine
-  exe "normal! ".s:curColumn."|"
-endfunction
-
-" MRUPushReversed {{{1
-function! <SID>MRUPushReversed(bufNbr)
-  " Don't add the BufExplorer window to the list.
-  if bufname(a:bufNbr) == "[BufExplorer]"
-    return
-  end
-
-  let _list = substitute(g:MRUList, ','.a:bufNbr.',', ',', '')
-  let g:MRUList = _list.a:bufNbr.","
-endfunction
-
-" MRUPush {{{1
-function! <SID>MRUPush()
-  if !buflisted(bufnr("%"))
-    return
-  end
-
-  " Don't add the BufExplorer window to the list.
-  if bufname("%") == "[BufExplorer]"
-    return
-  end
-
-  let _bufNbr = bufnr("%")
-  let _list = substitute(g:MRUList, ','._bufNbr.',', ',', '')
-  let g:MRUList = ","._bufNbr._list
-endfunction
-
-" MRUPop {{{1
-function! <SID>MRUPop()
-  let _bufNbr = expand("<abuf>")
-  let g:MRUList = substitute(g:MRUList, ''._bufNbr.',', '', '')
-endfunction
-
-" MRUGet {{{1
-function! <SID>MRUGet(slot)
-  let _bufNbr = (matchstr(g:MRUList, '\(\([^,]*,\)\{'.a:slot.'}\)\@<=[^,]*'))
-
-  if _bufNbr == ""
-    return -1
-  end
-
-  return _bufNbr
-endfunction
-
-function! <SID>BuildInitialMRU()
-  let nBuffers = bufnr('$')
-  let i = 0
-
-  " Preprocess the list of buffers.
-  while (i <= nBuffers)
-    let i = i + 1
-
-    if (getbufvar(i, '&buflisted') == 1)
-      call <SID>MRUPushReversed(i)
-    end
-  endwhile
-endfunction
-
-" MRUListShow {{{1
-function! <SID>MRUListShow()
-  echomsg "MRUList=[".g:MRUList."]"
-endfunction
-
-" DoAnyMoreBuffersExist {{{1
-function! <SID>DoAnyMoreBuffersExist()
-  let nBuffers = bufnr("$")
-  let i = 0
-  let x = 0
-
-  while i <= nBuffers
-    let i = i + 1
-
-    if getbufvar(i, "&buflisted") == 1
-      let x = x + 1
-
-      if x > 1
-        return 1
-      endif
-    endif
-  endwhile
-
-  return 0
-endfunction
-
-" CleanUpHistory {{{1
-function! <SID>CleanUpHistory()
-  call histdel("/", -1)
-  let @/ = histget("/", -1)
-endfunction
-
-" Resize {{{1
-function! <SID>Resize()
-  if g:bufExplorerSplitType == "v"
-    if g:bufExplorerSplitVertSize > 0
-      exe g:bufExplorerSplitVertSize." wincmd |"
-    end
-  else
-    if g:bufExplorerSplitHorzSize > 0
-      exe g:bufExplorerSplitHorzSize." wincmd _"
-    end
-  endif
-endfunction
-
-" vim:ft=vim foldmethod=marker
+    return ""
+endfunction
+
+" vim:ft=vim foldmethod=marker sw=2

Modified: trunk/packages/vim-scripts/plugin/cecutil.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/cecutil.vim?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/plugin/cecutil.vim (original)
+++ trunk/packages/vim-scripts/plugin/cecutil.vim Wed Jan 17 19:52:49 2007
@@ -2,7 +2,7 @@
 "               save/restore mark position
 "               save/restore selected user maps
 "  Author:	Charles E. Campbell, Jr.
-"  Version:	15e	ASTRO-ONLY
+"  Version:	15
 "  Date:	Apr 10, 2006
 "
 "  Saving Restoring Destroying Marks: {{{1
@@ -28,7 +28,7 @@
 if &cp || exists("g:loaded_cecutil")
  finish
 endif
-let g:loaded_cecutil = "v15e"
+let g:loaded_cecutil = "v15"
 let s:keepcpo        = &cpo
 set cpo&vim
 "DechoVarOn
@@ -447,7 +447,7 @@
    let s:restoremap_{a:suffix}= substitute(s:restoremap_{a:suffix},'|\s*$','','e')
    if s:restoremap_{a:suffix} != ""
 "   	call Decho("exe ".s:restoremap_{a:suffix})
-    exe "silent! s:restoremap_{a:suffix}"
+    exe "silent! ".s:restoremap_{a:suffix}
    endif
    unlet s:restoremap_{a:suffix}
   endif

Modified: trunk/packages/vim-scripts/plugin/cvsmenu.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/cvsmenu.vim?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/plugin/cvsmenu.vim (original)
+++ trunk/packages/vim-scripts/plugin/cvsmenu.vim Wed Jan 17 19:52:49 2007
@@ -1,8 +1,8 @@
 " CVSmenu.vim : Vim menu for using CVS			vim:tw=0:sw=2:ts=8
 " Author : Thorsten Maerz <info at netztorte.de>		vim600:fdm=marker
 " Maintainer : Wu Yongwei <wuyongwei at gmail.com>
-" $Revision: 1.124 $
-" $Date: 2006/08/20 08:51:37 $
+" $Revision: 1.140 $
+" $Date: 2006/10/22 09:39:38 $
 " License : LGPL
 "
 " Tested with Vim 6.0
@@ -52,6 +52,9 @@
 endif
 if !exists("g:CVSautocheck")
   let g:CVSautocheck = 1		" do local status on every read/write
+endif
+if !exists("g:CVSeasylogmessage")
+  let g:CVSeasylogmessage = 1		" make editing log message easier
 endif
 if !exists("g:CVSofferrevision")
   let g:CVSofferrevision = 1		" offer current revision on queries
@@ -300,7 +303,7 @@
 "-----------------------------------------------------------------------------
 function! CVSEscapeMessage(msg)
   if has('unix')
-    let result = escape(a:msg,'"`\\')
+    let result = escape(a:msg,'"`\')
   else
     let result = escape(a:msg,'"')
     if &shell =~? 'cmd\.exe'
@@ -320,7 +323,6 @@
   else
     let tobuf = a:1
   endif
-  "exec 'cd '.expand('%:p:h')
   call CVSChDir(expand('%:p:h'))
   " show CVS info from directory
   let cvsroot='CVS'.s:sep.'Root'
@@ -336,7 +338,7 @@
   new
   let zbak=@z
   let @z = ''
-    \."\n\"CVSmenu $Revision: 1.124 $"
+    \."\n\"CVSmenu $Revision: 1.140 $"
     \."\n\"Current directory : ".expand('%:p:h')
     \."\n\"Current Root : ".root
     \."\n\"Current Repository : ".repository
@@ -353,6 +355,7 @@
     \."\nlet g:CVStitlebar\t= "			.g:CVStitlebar			."\t\" Notification on titlebar"
     \."\nlet g:CVSstatusline\t= "		.g:CVSstatusline		."\t\" Notification on statusline"
     \."\nlet g:CVSautocheck\t= "		.g:CVSautocheck			."\t\" Get local status when file is read/written"
+    \."\nlet g:CVSeasylogmessage\t= "		.g:CVSeasylogmessage		."\t\" Ease editing the CVS log message in Vim"
     \."\nlet g:CVSofferrevision\t= "		.g:CVSofferrevision		."\t\" Offer current revision on queries"
     \."\nlet g:CVSsavediff\t= "			.g:CVSsavediff			."\t\" Save settings when using :diff"
     \."\nlet g:CVSdontswitch\t= "		.g:CVSdontswitch		."\t\" Don't switch to diffed file"
@@ -745,7 +748,6 @@
   " needs to be called from orgbuffer
   let isfile = CVSUsesFile()
   " change to buffers directory
-  "exec 'cd '.expand('%:p:h')
   call CVSChDir(expand('%:p:h'))
   " get file/directory to work on (if not given)
   if a:0 < 1
@@ -769,6 +771,9 @@
     unlet tmp dummy
   else
     let regbak=@z
+    if has('iconv') && g:CVScvsoutputencoding != ''
+      let filename=iconv(filename, &encoding, g:CVScvsoutputencoding)
+    endif
     if &shell =~? 'cmd\.exe'
       let shellxquotebak=&shellxquote
       let &shellxquote='"'
@@ -815,7 +820,7 @@
   endif
   " move to top
   normal gg
-  set nowrap
+  setlocal nowrap
   " reset single shot flag
   if g:CVSforcedirectory == 1
     let g:CVSforcedirectory = 0
@@ -836,7 +841,7 @@
 function! CVSUsesFile()
   let filename=expand("%:p:t")
   if    ((g:CVSforcedirectory == 0) && (filename != ''))
-   \ || ((g:CVSforcedirectory > 0) && (filename == ''))
+"   \ || ((g:CVSforcedirectory > 0) && (filename == ''))
     return 1
   else
     return 0
@@ -879,10 +884,31 @@
 "-----------------------------------------------------------------------------
 
 function! CVSlogin(...)
-  let pwpipe = ''
-  if a:0 != 0 && has("unix")
-    let pwpipe = 'echo '
-    let pwpipe = pwpipe . a:1 . '|'
+  if a:0 == 0
+    let pwpipe = ''
+  else
+    let pwpipe = 'echo'
+    if !has("unix")
+      if a:1 == ''
+        let pwpipe = pwpipe . '.'
+      endif
+    endif
+    if a:1 != ''
+      if has("unix")
+	" Piping works well because the clean escaping scenario, but I
+	" have not found an environment where CVS actually accepts the
+	" password from the pipe.  I am keeping this just in case it
+	" works somewhere.
+        let pwpipe = pwpipe . ' "' . escape(a:1,'!#%"`\') . '"'
+      else
+	" I failed to find a way to escape strings here for Windows
+	" command lines without requiring a special external program.
+	" So your password may not contain some special symbols like
+	" `&', `|', and `"'.
+        let pwpipe = pwpipe . ' '  . escape(a:1,'!#%')
+      endif
+    endif
+    let pwpipe = pwpipe . '|'
   endif
   if has("unix")
     " show password prompt
@@ -909,7 +935,6 @@
     let localtoo=''
   endif
   let releasedir=expand('%:p:h')
-  "exec ':cd ..'
   call CVSChDir(releasedir.s:sep.'..')
   " confirmation prompt -> dont use CVSDoCommand
   if has("unix")
@@ -949,6 +974,21 @@
     let rev=CVSInputRev('Revision (optional): ')
   else
     let rev=''
+  endif
+  if rev == ''
+    let filename = expand("%:p:t")
+    if filename != ''
+      let entry = CVSGetEntry(filename)
+      if entry != ''
+	let rev = CVSSubstr(entry,'/',2)
+      endif
+      unlet entry
+    endif
+    if rev == '0'
+      echo 'CVS diff: ' . filename . ' is a new entry!'
+      return
+    endif
+    unlet filename
   endif
   " tempname() would be deleted before diff (linux)!
   " it is also better to show selected revision
@@ -1073,6 +1113,7 @@
   let s:CVSdontupdatemapping = 1
   call CVSDoCommand('history')
   call CVSRestoreOpts()
+  silent! nmap <unique> <buffer> q :bwipeout<cr>
 endfunction
 
 function! CVSlog()
@@ -1625,7 +1666,9 @@
   if rev!=''
     let rev='-r '.rev.' '
   endif
+  call CVSChDir(destdir)
   call CVSDoCommand('checkout '.rev.module)
+  call CVSRestoreDir()
   unlet destdir module rev
 endfunction
 
@@ -1724,7 +1767,7 @@
   if g:CVStitlebar
     let cleantitle = substitute(@z,'\t\|\r\|\s\{2,\}',' ','g')
     let cleantitle = substitute(cleantitle,"\n",' ',"g")
-    let &titlestring = '%t%( %M%) (%{expand("%:p:h")}) - '.cleantitle
+    let &titlestring = '%t%( %M%) (%<%{expand("%:p:h")}) - '.cleantitle
     let b:CVSbuftitle = &titlestring
     unlet cleantitle
   endif
@@ -1924,7 +1967,6 @@
       \ . "call CVSGet('VimTools/cvsmenu.vim',':pserver:anonymous at ezytools.cvs.sourceforge.net:/cvsroot/ezytools','o','')\n\n"
       \ . "\" Get some help on this\n"
       \ . "help CVSFunctions"
-    "exec ':cd '.s:localvim
     call CVSChDir(s:localvim)
     new
     normal "zP
@@ -1959,7 +2001,6 @@
   " needs to be called from orgbuffer
   let isfile = CVSUsesFile()
   " change to buffers directory
-  "exec 'cd '.expand('%:p:h')
   call CVSChDir(expand('%:p:h'))
   if g:CVSforcedirectory>0
     let filename=expand('%:p:h')
@@ -2082,13 +2123,8 @@
   else
     let dirname = a:1
   endif
-  "exec 'cd '.dirname
   call CVSChDir(dirname)
-  if has("unix")
-    let @z = glob("*")
-  else
-    let @z = glob("*.*")
-  endif
+  let @z = glob("*")
   new
   silent! exec 'read '.s:CVSentries
   let entrycount = line("$") - 1
@@ -2386,6 +2422,23 @@
   endif
 endfunction
 
+" edit CVS log message
+function! CVSCheckLogMsg()
+  if &filetype == 'cvs' && g:CVSeasylogmessage > 0
+    let reg_bak=@"
+    normal ggyy
+    " insert an empty line if the first line begins with 'CVS:'
+    if @" =~ '^CVS:'
+      exec "normal i\<CR>\<C-O>k"
+      set nomodified
+    endif
+    let @"=reg_bak
+    " make <CR> save the log message and quit
+    nmap <buffer> <CR> :x<CR>
+    startinsert
+  endif
+endfunction
+
 "-----------------------------------------------------------------------------
 " finalization		{{{1
 "-----------------------------------------------------------------------------
@@ -2405,6 +2458,8 @@
 au BufEnter * call CVSBufEnter()
 " restore prediff settings
 au BufWinLeave *.dif call CVSDiffPrepareLeave()
+" insert an empty line and start in insert mode for the CVS log message
+au BufRead cvs*,\d\+ call CVSCheckLogMsg()
 
 if !exists("loaded_cvsmenu")
   let loaded_cvsmenu=1

Modified: trunk/packages/vim-scripts/plugin/project.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/project.vim?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/plugin/project.vim (original)
+++ trunk/packages/vim-scripts/plugin/project.vim Wed Jan 17 19:52:49 2007
@@ -1,8 +1,8 @@
 "=============================================================================
 " File:        project.vim
 " Author:      Aric Blumer (Aric.Blumer at aricvim at charter.net)
-" Last Change: Mon 24 Apr 2006 01:05:03 PM EDT
-" Version:     1.4
+" Last Change: Fri 13 Oct 2006 09:47:08 AM EDT
+" Version:     1.4.1
 "=============================================================================
 " See documentation in accompanying help file
 " You may use this code in whatever way you see fit.
@@ -41,8 +41,10 @@
     endif
     if !exists("g:proj_running") || (bufwinnr(g:proj_running) == -1) " Open the Project Window
         exec 'silent vertical new '.filename
-        silent! wincmd H
-        exec 'vertical resize '.g:proj_window_width
+        if match(g:proj_flags, '\CF') == -1      " We're floating
+            silent! wincmd H
+            exec 'vertical resize '.g:proj_window_width
+        endif
         setlocal nomodeline
     else
         silent! 99wincmd h
@@ -60,6 +62,13 @@
     let b:proj_cd_cmd='cd'
     if match(g:proj_flags, '\Cl') != -1
         let b:proj_cd_cmd = 'lcd'
+    endif
+
+    let b:proj_locate_command='silent! wincmd H'
+    let b:proj_resize_command='exec ''vertical resize ''.g:proj_window_width'
+    if match(g:proj_flags, '\CF') != -1         " Set the resize commands to nothing
+        let b:proj_locate_command=''
+        let b:proj_resize_command=''
     endif
 
     let g:proj_last_buffer = -1
@@ -77,6 +86,9 @@
         setlocal foldenable foldmethod=marker foldmarker={,} commentstring=%s foldcolumn=0 nonumber noswapfile shiftwidth=1
         setlocal foldtext=ProjFoldText() nobuflisted nowrap
         setlocal winwidth=1
+        if match(g:proj_flags, '\Cn') != -1
+            setlocal number
+        endif
     endfunction ">>>
     call s:DoSetup()
     " Syntax Stuff <<<
@@ -192,8 +204,8 @@
                 exec 'silent vertical split | silent! bnext'
             endif
             wincmd p " Go back to the Project Window and ensure it is the right width
-            silent! wincmd H
-            exec 'vertical resize '.g:proj_window_width
+            exec b:proj_locate_command
+            exec b:proj_resize_command
             wincmd p
         endif
     endfunction ">>>
@@ -212,10 +224,11 @@
             endif
             if bufnr('%') == g:proj_last_buffer | bnext | bprev | bnext | endif
             wincmd p " Go back to the Project Window and ensure it is the right width
-        endif
-        if(winnr() != 1)
-            silent! wincmd H
-            exec 'vertical resize '.g:proj_window_width
+            exec b:proj_locate_command
+            exec b:proj_resize_command
+        elseif(winnr() != 1)
+            exec b:proj_locate_command
+            exec b:proj_resize_command
         endif
     endfunction
     function! s:RecordPrevBuffer_au()
@@ -323,7 +336,7 @@
     " s:OpenEntry2(line, infoline, precmd, editcmd) <<<
     "   Get the filename under the cursor, and open a window with it.
     function! s:OpenEntry2(line, infoline, fname, editcmd)
-        let fname=escape(a:fname, ' ')
+        let fname=escape(a:fname, ' %#')        " Thanks to Thomas Link for cluing me in on % and #
         let home=s:GetHome(a:infoline, '').'/'
         if home=='/'
             echoerr 'Project structure error. Check your syntax.'
@@ -389,13 +402,12 @@
             call s:OpenEntry(line('.'), a:cmd0, a:cmd1, 0)
             if (match(g:proj_flags, '\Cc') != -1)
                 let g:proj_mywinnumber = winbufnr(0)
-                wincmd h
-                if(g:proj_running == winbufnr(0))
-                    hide
-                endif
+                Project
+                hide
                 if(g:proj_mywinnumber != winbufnr(0))
                     wincmd p
                 endif
+                wincmd =
             endif
         endif
     endfunction ">>>
@@ -427,8 +439,8 @@
         let {a:filecount}=0
         let {a:dircount}=0
         while strlen(fnames) > 0
-            let fname = substitute(fnames,  '\(\(\f\|[ :]\)*\).*', '\1', '')
-            let fnames = substitute(fnames, '\(\f\|[ :]\)*.\(.*\)', '\2', '')
+            let fname = substitute(fnames,  '\(\(\f\|[ :\[\]]\)*\).*', '\1', '')
+            let fnames = substitute(fnames, '\(\f\|[ :\[\]]\)*.\(.*\)', '\2', '')
             if isdirectory(glob(fname))
                 let {a:dirvariable}={a:dirvariable}.a:padding.fname.a:separator
                 let {a:dircount}={a:dircount} + 1
@@ -671,7 +683,9 @@
                 endif
                 call s:VimDirListing(filter, spaces, "\n", 'b:files', 'b:filecount', 'b:dirs', 'b:dircount')
                 if b:filecount > 0
+                    normal! mk
                     silent! put =b:files
+                    normal! `kj
                     if sort
                         call s:SortR(line('.'), line('.') + b:filecount - 1)
                     endif
@@ -758,9 +772,9 @@
                 unlet g:proj_doinghelp
                 return
             endif
-            silent! wincmd H
-        endif
-        exec 'vertical resize ' . g:proj_window_width
+            exec b:proj_locate_command
+        endif
+        exec b:proj_resize_command
     endfunction ">>>
     " s:Spawn(number) <<<
     "   Spawn an external command on the file
@@ -937,16 +951,22 @@
         unlet b:escape_spaces
         cclose " Make sure grep window is closed
         call s:DoSetupAndSplit()
-        silent! exec 'silent! grep '.pattern.' '.fnames
-        if v:shell_error != 0
-            echo 'GREP error. Perhaps there are too many filenames.'
+        if match(g:proj_flags, '\Cv') == -1
+            silent! exec 'silent! grep '.pattern.' '.fnames
+            if v:shell_error != 0
+                echo 'GREP error. Perhaps there are too many filenames.'
+            else
+                copen
+            endif
         else
+            silent! exec 'silent! vimgrep '.pattern.' '.fnames
             copen
         endif
     endfunction ">>>
     " GetXXX Functions <<<
     function! s:GetHome(info, parent_home)
-        let home=substitute(a:info, '^[^=]*=\(\(\\ \|\f\|:\)\+\).*', '\1', '')
+        " Thanks to Adam Montague for pointing out the need for @ in urls.
+        let home=substitute(a:info, '^[^=]*=\(\(\\ \|\f\|:\|@\)\+\).*', '\1', '')
         if strlen(home) == strlen(a:info)
             let home=substitute(a:info, '.\{-}"\(.\{-}\)".*', '\1', '')
             if strlen(home) != strlen(a:info) | let home=escape(home, ' ') | endif
@@ -1155,6 +1175,7 @@
         nnoremap <buffer> <silent> <Return>   \|:call <SID>DoFoldOrOpenEntry('', 'e')<CR>
         nnoremap <buffer> <silent> <S-Return> \|:call <SID>DoFoldOrOpenEntry('', 'sp')<CR>
         nnoremap <buffer> <silent> <C-Return> \|:call <SID>DoFoldOrOpenEntry('silent! only', 'e')<CR>
+        nnoremap <buffer> <silent> <LocalLeader>T \|:call <SID>DoFoldOrOpenEntry('', 'tabe')<CR>
         nmap     <buffer> <silent> <LocalLeader>s <S-Return>
         nnoremap <buffer> <silent> <LocalLeader>S \|:call <SID>LoadAllSplit(0, line('.'))<CR>
         nmap     <buffer> <silent> <LocalLeader>o <C-Return>
@@ -1213,8 +1234,8 @@
         nnoremap <script> <Plug>ProjectOnly :call <SID>DoProjectOnly()<CR>
         if match(g:proj_flags, '\Cm') != -1
             if !hasmapto('<Plug>ProjectOnly')
-                nmap <silent> <C-W>o <Plug>ProjectOnly
-                nmap <silent> <C-W><C-O> <C-W>o
+                nmap <silent> <unique> <C-W>o <Plug>ProjectOnly
+                nmap <silent> <unique> <C-W><C-O> <C-W>o
             endif
         endif " >>>
         if filereadable(glob('~/.vimproject_mappings')) | source ~/.vimproject_mappings | endif
@@ -1241,7 +1262,7 @@
     endif
 endfunction " >>>
 
-if !exists(':Project')
+if exists(':Project') != 2
     command -nargs=? -complete=file Project call <SID>Project('<args>')
 endif
 " Toggle Mapping

Modified: trunk/packages/vim-scripts/plugin/vcscommand.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/vcscommand.vim?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/plugin/vcscommand.vim (original)
+++ trunk/packages/vim-scripts/plugin/vcscommand.vim Wed Jan 17 19:52:49 2007
@@ -3,7 +3,7 @@
 " Vim plugin to assist in working with files under control of CVS or SVN.
 "
 " Last Change:
-" Version:       VCS development
+" Version:       Beta 10
 " Maintainer:    Bob Hiestand <bob.hiestand at gmail.com>
 " License:       This file is placed in the public domain.
 "
@@ -170,6 +170,25 @@
 "   information in the status bar.  Additional options may be set by
 "   individual VCS plugins.
 "
+" VCSCommandResultBufferNameExtension
+"   This variable, if set to a non-blank value, is appended to the name of the
+"   VCS command output buffers.  For example, '.vcs'.  Using this option may
+"   help avoid problems caused by autocommands dependent on file extension.
+"
+" VCSCommandResultBufferNameFunction
+"   This variable, if set, specifies a custom function for naming VCS command
+"   output buffers.  This function will be passed the following arguments:
+"
+"   command - name of the VCS command being executed (such as 'Log' or
+"   'Diff').
+"
+"   originalBuffer - buffer number of the source file.
+"
+"   vcsType - type of VCS controlling this file (such as 'CVS' or 'SVN').
+"
+"   statusText - extra text associated with the VCS action (such as version
+"   numbers).
+"
 " VCSCommandSplit
 "   This variable controls the orientation of the various window splits that
 "   may occur (such as with VCSVimDiff, when using a VCS command on a VCS
@@ -348,14 +367,13 @@
   return bufnr('%')
 endfunction
 
-" Function: s:EditFile(command, originalBuffer, statusText) {{{2
-" Creates a new buffer of the given name and associates it with the given
-" original buffer.
-
-function! s:EditFile(command, originalBuffer, statusText)
+" Function: s:GenerateResultBufferName(command, originalBuffer, vcsType, statusText) {{{2
+" Default method of generating the name for VCS result buffers.  This can be
+" overridden with the VCSResultBufferNameFunction variable.
+
+function! s:GenerateResultBufferName(command, originalBuffer, vcsType, statusText)
   let fileName=bufname(a:originalBuffer)
-  let vcsType = getbufvar(a:originalBuffer, 'VCSCommandVCSType')
-  let bufferName = vcsType . ' ' . a:command
+  let bufferName = a:vcsType . ' ' . a:command
   if strlen(a:statusText) > 0
     let bufferName .= ' ' . a:statusText
   endif
@@ -366,6 +384,44 @@
     let counter += 1
     let versionedBufferName = bufferName . ' (' . counter . ')'
   endwhile
+  return versionedBufferName
+endfunction
+
+" Function: s:GenerateResultBufferNameWithExtension(command, originalBuffer, vcsType, statusText) {{{2
+" Method of generating the name for VCS result buffers that uses the original
+" file name with the VCS type and command appended as extensions.
+
+function! s:GenerateResultBufferNameWithExtension(command, originalBuffer, vcsType, statusText)
+  let fileName=bufname(a:originalBuffer)
+  let bufferName = a:vcsType . ' ' . a:command
+  if strlen(a:statusText) > 0
+    let bufferName .= ' ' . a:statusText
+  endif
+  let bufferName .= ' ' . fileName . VCSCommandGetOption('VCSCommandResultBufferNameExtension', '.vcs')
+  let counter = 0
+  let versionedBufferName = bufferName
+  while buflisted(versionedBufferName)
+    let counter += 1
+    let versionedBufferName = '(' . counter . ') ' . bufferName
+  endwhile
+  return versionedBufferName
+endfunction
+
+" Function: s:EditFile(command, originalBuffer, statusText) {{{2
+" Creates a new buffer of the given name and associates it with the given
+" original buffer.
+
+function! s:EditFile(command, originalBuffer, statusText)
+  let vcsType = getbufvar(a:originalBuffer, 'VCSCommandVCSType')
+
+  let nameExtension = VCSCommandGetOption('VCSCommandResultBufferNameExtension', '')
+  if nameExtension == ''
+    let nameFunction = VCSCommandGetOption('VCSCommandResultBufferNameFunction', 's:GenerateResultBufferName')
+  else
+    let nameFunction = VCSCommandGetOption('VCSCommandResultBufferNameFunction', 's:GenerateResultBufferNameWithExtension')
+  endif
+
+  let resultBufferName = call(nameFunction, [a:command, a:originalBuffer, vcsType, a:statusText])
 
   " Protect against useless buffer set-up
   let s:isEditFileRunning += 1
@@ -378,14 +434,15 @@
         vert rightbelow split
       endif
     endif
-    edit `=versionedBufferName`
+    edit `=resultBufferName`
     let b:VCSCommandCommand = a:command
     let b:VCSCommandOriginalBuffer = a:originalBuffer
-    let b:VCSCommandSourceFile = fileName
+    let b:VCSCommandSourceFile = bufname(a:originalBuffer)
     let b:VCSCommandVCSType = vcsType
+
     set buftype=nofile
     set noswapfile
-    set filetype=
+    let &filetype=vcsType . a:command
 
     if a:statusText != ''
       let b:VCSCommandStatusText = a:statusText
@@ -477,6 +534,11 @@
     let buffer = buffer + 1
   endwhile
 endfunction
+
+" Function: s:VimDiffRestore(vimDiffBuff) {{{2
+" Checks whether the given buffer is one whose deletion should trigger
+" restoration of an original buffer after it was diffed.  If so, it executes
+" the appropriate setting command stored with that original buffer.
 
 function! s:VimDiffRestore(vimDiffBuff)
   let s:isEditFileRunning += 1
@@ -555,7 +617,7 @@
     return s:VCSFinishCommit([a:message], originalBuffer)
   endif
 
-  call s:EditFile('commit log', originalBuffer, '')
+  call s:EditFile('commitlog', originalBuffer, '')
   set ft=vcscommit
 
   " Create a commit mapping.

Modified: trunk/packages/vim-scripts/plugin/vcscvs.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/vcscvs.vim?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/plugin/vcscvs.vim (original)
+++ trunk/packages/vim-scripts/plugin/vcscvs.vim Wed Jan 17 19:52:49 2007
@@ -170,12 +170,12 @@
     let caption = ''
   endif
 
-  let cvsdiffopt=VCSCommandGetOption('VCSCommandCVSDiffOpt', 'u')
+  let cvsdiffopt = VCSCommandGetOption('VCSCommandCVSDiffOpt', 'u')
 
   if cvsdiffopt == ''
-    let diffoptionstring=''
-  else
-    let diffoptionstring=' -' . cvsdiffopt . ' '
+    let diffoptionstring = ''
+  else
+    let diffoptionstring = ' -' . cvsdiffopt . ' '
   endif
 
   let resultBuffer = s:DoCommand('diff ' . diffoptionstring . revOptions , 'diff', caption)

Modified: trunk/packages/vim-scripts/plugin/vcssvn.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/vcssvn.vim?rev=849&op=diff
==============================================================================
--- trunk/packages/vim-scripts/plugin/vcssvn.vim (original)
+++ trunk/packages/vim-scripts/plugin/vcssvn.vim Wed Jan 17 19:52:49 2007
@@ -31,6 +31,10 @@
 " VCSCommandSVNExec
 "   This variable specifies the SVN executable.  If not set, it defaults to
 "   'svn' executed from the user's executable path.
+"
+" VCSCommandSVNDiffOpt
+"   This variable, if set, determines the options passed to the svn diff
+"   command (such as 'u', 'w', or 'b').
 
 if v:version < 700
   finish
@@ -133,7 +137,15 @@
     let caption = ''
   endif
 
-  let resultBuffer = s:DoCommand('diff' . revOptions , 'diff', caption)
+  let svndiffopt = VCSCommandGetOption('VCSCommandSVNDiffOpt', '')
+
+  if svndiffopt == ''
+    let diffoptionstring = ''
+  else
+    let diffoptionstring = ' -x -' . svndiffopt . ' '
+  endif
+
+  let resultBuffer = s:DoCommand('diff' . diffoptionstring . revOptions , 'diff', caption)
   if resultBuffer > 0
     set filetype=diff
   else




More information about the pkg-vim-maintainers mailing list