sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

Vimball : vim-based archiver: builds, extracts, and previews

 script karma  Rating 246/134, Downloaded by 30459    Comments, bugs, improvements  Vim wiki

created by
Charles Campbell
script type
                                            [VIM VERSION 7.1 or 7.2 REQUIRED]

The vimball plugin facilitates creating, extracting , and listing the contents of "vimball" archives (*.vba).  Vimball also records the files extracted with it and can remove them.


Vimball can create a "vimball" archive (*.vba) with the following command:

   :[range]MkVimball[!] filename

As an example:

    :%MkVimball something

will create a "vimball.vba" archive.  Each line in the range processed by the MkVimball command simply describes where in the usual vim directory tree various files are.  I am now also providing a C source program that creates vimballs; see http://www.drchip.org/astronaut/src/index.html#MKVIMBALL .


Users of a vimball archive simply need to

    $vim something.vba
    :so %

and the contents of the vimball will be extracted and placed into the proper directories, no matter where the user opened up the vimball.  Furthermore, the helptags command will be automatically and transparently used to make any doc/*.txt files' contents available by the Vim help system.


Instead of immediately sourcing a vimball to extract its contents, one may use


to preview the contents of the vimball archive.

(alpha/beta version available at http://www.drchip.org/astronaut/vim/index.html#VIMBALL)
install details
For vim 7.0, otherwise skip to step 2:
1. Remove all vestiges of any older version of vimball.  Typically, that means:
    cd /usr/local/share/vim/vim70
    rm plugin/vimball*.vim
    rm autoload/vimball*.vim

   Under Windows, the vim70 install point may vary.

2. I've decided that the vimball plugin itself should not expect that vimball is available to extract it.
    Hence, it is now being distributed as vimball.tar.gz.  To unravel that:
   * change directory to the directory holding the plugin/ and autoload/ directories where you want to install vimball.
      It is probably best to install the new vimball in the distribution directory.
   * gunzip vimball.tar.gz
   * tar -oxvf vimball.tar
   * (unix) chmod a+r autoload/vimball.vim doc/pi_vimball.txt plugin/vimballPlugin.vim

Version 26 and later use fnameescape() for security reasons -- which in turn requires vim 7.1 with patch 299.

Rating scripts is only available on the HTTPS page

script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vimball.tar.gz 33 2011-04-02 7.3 Charles Campbell Added support for xz compression.  Supports *.vmb as well as *.vba for extraction; creates *.vmb files.  Bugfixes: zero-length file handling, a problem with fenc.
vimball.tar.gz 30 2009-12-29 7.0 Charles Campbell RmVimball supports filenames that would otherwise be considered to have "magic" characters (ie. Abc[1].vba)
MkVimball allows slashes in the filename
vimball.tar.gz 26 2008-05-30 7.0 Charles Campbell For those users who don't yet have any plugins, vimball will now create a .vim (vimfiles) directory as necessary.
Bugfix: (tnx Bill McCarthy) vimball wasn't updating files plugin/ to AsNeeded/ properly
vimball.tar.gz 25 2008-04-01 7.0 Charles Campbell * changed vimball#Vimball() to recognize doc/*.??x as help files, too.
* g:vimball_path_escape used by s:Path() to prevent certain characters from causing trouble
vimball.tar.gz 22 2007-05-08 7.0 Charles Campbell uses setlocal instead of set during BufEnter
vimball.tar.gz 21 2007-01-03 7.0 Charles Campbell bugfix release
vimball.tar.gz 18 2006-08-31 7.0 Charles Campbell Vimballs now use folding to more easily display their contents when opened.
Windows: \s are changed to /s (bugfix)
vimball.vba.gz 16 2006-06-27 7.0 Charles Campbell * RmVimball implemented - allows one to remove files installed via a vimball
* A. Mechylynk's idea to allow users to specify installation root paths implemented for UseVimball, MkVimball, and RmVimball (optional path argument)
* (sssh -- bugfixes, too)
vimball.tar.gz 15 2006-06-13 7.0 Charles Campbell bugfixes!
vimball.vba.gz 14 2006-05-26 7.0 Charles Campbell Bugfix release:
* exists("&acd") used to determine if the acd option exists
* the |'acd'| option is not always defined
* VimballList would create missing subdirectories that the vimball specified were needed.  Fixed.
* moved all setting saving/restoration to a pair of functions.  Included some more settings in them which frequently cause trouble.
* various changes to support the Windows prediliction for backslashes and spaces in file and directory names.
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo