pi_vimball.txt For Vim version 7.4. Last change: 2012 Jan 17LINK

----------------

Vimball Archiver

----------------

Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>

(remove NOSPAM from Campbell's email first)

Copyright: (c) 2004-2012 by Charles E. Campbell, Jr. Vimball-copyrightLINK

The VIM LICENSE (see copyright) applies to the files in this

package, including vimballPlugin.vim, vimball.vim, and pi_vimball.txt.

except use "vimball" instead of "VIM". Like anything else that's free,

vimball.vim and its associated files are provided *as is* and comes with

no warranty of any kind, either expressed or implied. No guarantees

of merchantability. No guarantees of suitability for any purpose. By

using this plugin, you agree that in no event will the copyright

holder be liable for any damages resulting from the use of this

software. Use at your own risk!

==============================================================================

1. Contents vba vimball vimball-contentsLINK

1. Contents......................................: vimball-contents

2. Vimball Introduction..........................: vimball-intro

3. Vimball Manual................................: vimball-manual

MkVimball.....................................: :MkVimball

UseVimball....................................: :UseVimball

RmVimball.....................................: :RmVimball

4. Vimball History...............................: vimball-history

==============================================================================

2. Vimball Introduction vimball-introLINK

Vimball is intended to make life simpler for users of plugins. All

a user needs to do with a vimball is:

vim someplugin.vba

:so %

:q

and the plugin and all its components will be installed into their

appropriate directories. Note that one doesn't need to be in any

particular directory when one does this. Plus, any help for the

plugin will also be automatically installed.

If a user has decided to use the AsNeeded plugin, vimball is smart

enough to put scripts nominally intended for .vim/plugin/ into

.vim/AsNeeded/ instead.

Removing a plugin that was installed with vimball is really easy:

vim

:RmVimball someplugin

This operation is not at all easy for zips and tarballs, for example.

Vimball examines the user's 'runtimepath' to determine where to put

the scripts. The first directory mentioned on the runtimepath is

usually used if possible. Use

:echo &rtp

to see that directory.

==============================================================================

3. Vimball Manual vimball-manualLINK

MAKING A VIMBALL :MkVimballLINK

:[range]MkVimball[!] filename [path]

The range is composed of lines holding paths to files to be included

in your new vimball, omitting the portion of the paths that is

normally specified by the runtimepath ('rtp'). As an example:

plugin/something.vim

doc/something.txt

using

:[range]MkVimball filename

on this range of lines will create a file called "filename.vba" which

can be used by Vimball.vim to re-create these files. If the

"filename.vba" file already exists, then MkVimball will issue a

warning and not create the file. Note that these paths are relative

to your .vim (vimfiles) directory, and the files should be in that

directory. The vimball plugin normally uses the first 'runtimepath'

directory that exists as a prefix; don't use absolute paths, unless

the user has specified such a path.

If you use the exclamation point (!), then MkVimball will create the

"filename.vba" file, overwriting it if it already exists. This

behavior resembles that for :w.

If you wish to force slashes into the filename, that can also be done

by using the exclamation mark (ie. :MkVimball! path/filename).

The tip at http://vim.wikia.com/wiki/Using_VimBall_with_%27Make%27

has a good idea on how to automate the production of vimballs using

make.

MAKING DIRECTORIES VIA VIMBALLS g:vimball_mkdirLINK

First, the mkdir() command is tried (not all systems support it).

If it doesn't exist, then if g:vimball_mkdir doesn't exist, it is set

as follows:

|g:netrw_local_mkdir|, if it exists

"mkdir" , if it is executable

"makedir" , if it is executable

Otherwise , it is undefined.

One may explicitly specify the directory making command using

g:vimball_mkdir. This command is used to make directories that

are needed as indicated by the vimball.

CONTROLLING THE VIMBALL EXTRACTION DIRECTORY g:vimball_homeLINK

You may override the use of the 'runtimepath' by specifying a

variable, g:vimball_home.

vimball-extractLINK

vim filename.vba

Simply editing a Vimball will cause Vimball.vim to tell the user to

source the file to extract its contents.

Extraction will only proceed if the first line of a putative vimball

file holds the "Vimball Archiver by Charles E. Campbell, Jr., Ph.D."

line.

LISTING FILES IN A VIMBALL :VimballListLINK

:VimballList

This command will tell Vimball to list the files in the archive, along

with their lengths in lines.

MANUALLY INVOKING VIMBALL EXTRACTION :UseVimballLINK

:UseVimball [path]

This command is contained within the vimball itself; it invokes the

vimball#Vimball() routine which is responsible for unpacking the

vimball. One may choose to execute it by hand instead of sourcing

the vimball; one may also choose to specify a path for the

installation, thereby overriding the automatic choice of the first

existing directory on the 'runtimepath'.

REMOVING A VIMBALL :RmVimballLINK

:RmVimball vimballfile [path]

This command removes all files generated by the specified vimball

(but not any directories it may have made). One may choose a path

for de-installation, too (see 'runtimepath'); otherwise, the

default is the first existing directory on the 'runtimepath'.

To implement this, a file (.VimballRecord) is made in that directory

containing a record of what files need to be removed for all vimballs

used thus far.

PREVENTING LOADING

If for some reason you don't want to be able to extract plugins

using vimballs: you may prevent the loading of vimball.vim by

putting the following two variables in your <.vimrc>:

let g:loaded_vimballPlugin= 1

let g:loaded_vimball = 1

WINDOWS vimball-windowsLINK

Many vimball files are compressed with gzip. Windows, unfortunately,

does not come provided with a tool to decompress gzip'ped files.

Fortunately, there are a number of tools available for Windows users

to un-gzip files:

Item Tool/Suite Free Website

---- ---------- ---- -------

7zip tool y http://www.7-zip.org/

Winzip tool n http://www.winzip.com/downwz.htm

unxutils suite y http://unxutils.sourceforge.net/

cygwin suite y http://www.cygwin.com/

GnuWin32 suite y http://gnuwin32.sourceforge.net/

MinGW suite y http://www.mingw.org/

==============================================================================

+-- 91 строк: 4. Vimball History *vimball-history* --------------------------