Browse files

updated for version 7.0117

  • Loading branch information...
1 parent 6990095 commit da0581fa739b192d14c3228d94869d230048e711 vimboss committed Jul 27, 2005
View
3 Filelist
@@ -511,6 +511,8 @@ RT_SCRIPTS = \
runtime/delmenu.vim \
runtime/synmenu.vim \
runtime/makemenu.vim \
+ runtime/autoload/*.vim \
+ runtime/autoload/README.txt \
runtime/colors/*.vim \
runtime/colors/README.txt \
runtime/compiler/*.vim \
@@ -690,6 +692,7 @@ LANG_GEN = \
# generic language files, binary
LANG_GEN_BIN = \
+ runtime/spell/README_en.txt \
runtime/spell/en.ascii.spl \
runtime/spell/en.latin1.spl \
runtime/spell/en.utf-8.spl \
View
6 runtime/autoload/README.txt
@@ -0,0 +1,6 @@
+The autoload directory is for standard Vim autoload scripts.
+
+These are functions used by plugins and for general use. They will be loaded
+automatically when the function is invoked. See ":help autoload".
+
+gzip.vim for editing compressed files
View
173 runtime/autoload/gzip.vim
@@ -0,0 +1,173 @@
+" Vim autoload file for editing compressed files.
+" Maintainer: Bram Moolenaar <Bram@vim.org>
+" Last Change: 2005 Jul 26
+
+" These functions are used by the gzip plugin.
+
+" Function to check that executing "cmd [-f]" works.
+" The result is cached in s:have_"cmd" for speed.
+fun s:check(cmd)
+ let name = substitute(a:cmd, '\(\S*\).*', '\1', '')
+ if !exists("s:have_" . name)
+ let e = executable(name)
+ if e < 0
+ let r = system(name . " --version")
+ let e = (r !~ "not found" && r != "")
+ endif
+ exe "let s:have_" . name . "=" . e
+ endif
+ exe "return s:have_" . name
+endfun
+
+" Set b:gzip_comp_arg to the gzip argument to be used for compression, based on
+" the flags in the compressed file.
+" The only compression methods that can be detected are max speed (-1) and max
+" compression (-9).
+fun s:set_compression(line)
+ " get the Compression Method
+ let l:cm = char2nr(a:line[2])
+ " if it's 8 (DEFLATE), we can check for the compression level
+ if l:cm == 8
+ " get the eXtra FLags
+ let l:xfl = char2nr(a:line[8])
+ " max compression
+ if l:xfl == 2
+ let b:gzip_comp_arg = "-9"
+ " min compression
+ elseif l:xfl == 4
+ let b:gzip_comp_arg = "-1"
+ endif
+ endif
+endfun
+
+
+" After reading compressed file: Uncompress text in buffer with "cmd"
+fun gzip#read(cmd)
+ " don't do anything if the cmd is not supported
+ if !s:check(a:cmd)
+ return
+ endif
+
+ " for gzip check current compression level and set b:gzip_comp_arg.
+ silent! unlet b:gzip_comp_arg
+ if a:cmd[0] == 'g'
+ call s:set_compression(getline(1))
+ endif
+
+ " make 'patchmode' empty, we don't want a copy of the written file
+ let pm_save = &pm
+ set pm=
+ " remove 'a' and 'A' from 'cpo' to avoid the alternate file changes
+ let cpo_save = &cpo
+ set cpo-=a cpo-=A
+ " set 'modifiable'
+ let ma_save = &ma
+ setlocal ma
+ " when filtering the whole buffer, it will become empty
+ let empty = line("'[") == 1 && line("']") == line("$")
+ let tmp = tempname()
+ let tmpe = tmp . "." . expand("<afile>:e")
+ " write the just read lines to a temp file "'[,']w tmp.gz"
+ execute "silent '[,']w " . tmpe
+ " uncompress the temp file: call system("gzip -dn tmp.gz")
+ call system(a:cmd . " " . tmpe)
+ if !filereadable(tmp)
+ " uncompress didn't work! Keep the compressed file then.
+ echoerr "Error: Could not read uncompressed file"
+ return
+ endif
+ " delete the compressed lines; remember the line number
+ let l = line("'[") - 1
+ if exists(":lockmarks")
+ lockmarks '[,']d _
+ else
+ '[,']d _
+ endif
+ " read in the uncompressed lines "'[-1r tmp"
+ setlocal nobin
+ if exists(":lockmarks")
+ execute "silent lockmarks " . l . "r " . tmp
+ else
+ execute "silent " . l . "r " . tmp
+ endif
+
+ " if buffer became empty, delete trailing blank line
+ if empty
+ silent $delete _
+ 1
+ endif
+ " delete the temp file and the used buffers
+ call delete(tmp)
+ silent! exe "bwipe " . tmp
+ silent! exe "bwipe " . tmpe
+ let &pm = pm_save
+ let &cpo = cpo_save
+ let &l:ma = ma_save
+ " When uncompressed the whole buffer, do autocommands
+ if empty
+ if &verbose >= 8
+ execute "doau BufReadPost " . expand("%:r")
+ else
+ execute "silent! doau BufReadPost " . expand("%:r")
+ endif
+ endif
+endfun
+
+" After writing compressed file: Compress written file with "cmd"
+fun gzip#write(cmd)
+ " don't do anything if the cmd is not supported
+ if s:check(a:cmd)
+ " Rename the file before compressing it.
+ let nm = resolve(expand("<afile>"))
+ let nmt = s:tempname(nm)
+ if rename(nm, nmt) == 0
+ if exists("b:gzip_comp_arg")
+ call system(a:cmd . " " . b:gzip_comp_arg . " " . nmt)
+ else
+ call system(a:cmd . " " . nmt)
+ endif
+ call rename(nmt . "." . expand("<afile>:e"), nm)
+ endif
+ endif
+endfun
+
+" Before appending to compressed file: Uncompress file with "cmd"
+fun gzip#appre(cmd)
+ " don't do anything if the cmd is not supported
+ if s:check(a:cmd)
+ let nm = expand("<afile>")
+
+ " for gzip check current compression level and set b:gzip_comp_arg.
+ silent! unlet b:gzip_comp_arg
+ if a:cmd[0] == 'g'
+ call s:set_compression(readfile(nm, "b", 1)[0])
+ endif
+
+ " Rename to a weird name to avoid the risk of overwriting another file
+ let nmt = expand("<afile>:p:h") . "/X~=@l9q5"
+ let nmte = nmt . "." . expand("<afile>:e")
+ if rename(nm, nmte) == 0
+ if &patchmode != "" && getfsize(nm . &patchmode) == -1
+ " Create patchmode file by creating the decompressed file new
+ call system(a:cmd . " -c " . nmte . " > " . nmt)
+ call rename(nmte, nm . &patchmode)
+ else
+ call system(a:cmd . " " . nmte)
+ endif
+ call rename(nmt, nm)
+ endif
+ endif
+endfun
+
+" find a file name for the file to be compressed. Use "name" without an
+" extension if possible. Otherwise use a weird name to avoid overwriting an
+" existing file.
+fun s:tempname(name)
+ let fn = fnamemodify(a:name, ":r")
+ if !filereadable(fn) && !isdirectory(fn)
+ return fn
+ endif
+ return fnamemodify(a:name, ":p:h") . "/X~=@l9q5"
+endfun
+
+" vim: set sw=2 :
View
130 runtime/autoload/tar.vim
@@ -0,0 +1,130 @@
+" vim:set ts=8 sts=4 sw=4:
+"
+" tar.vim -- a Vim plugin for browsing tarfiles
+" Copyright (c) 2002, Michael C. Toren <mct@toren.net>
+" Distributed under the GNU General Public License.
+"
+" Version: 1.01
+" Last Change: 2005 Jul 26
+"
+" Updates are available from <http://michael.toren.net/code/>. If you
+" find this script useful, or have suggestions for improvements, please
+" let me know.
+" Also look there for further comments and documentation.
+"
+" This part defines the functions. The autocommands are in plugin/tar.vim.
+
+let s:version = "1.01"
+
+function! tar#Write(argument)
+ echo "ERROR: Sorry, no write support for tarfiles yet"
+endfunction
+
+function! tar#Read(argument, cleanup)
+ let l:argument = a:argument
+ let l:argument = substitute(l:argument, '^tarfile:', '', '')
+ let l:argument = substitute(l:argument, '^\~', $HOME, '')
+
+ let l:tarfile = l:argument
+ while 1
+ if (l:tarfile == "" || l:tarfile == "/")
+ echo "ERROR: Could not find a readable tarfile in path:" l:argument
+ return
+ endif
+
+ if filereadable(l:tarfile) " found it!
+ break
+ endif
+
+ let l:tarfile = fnamemodify(l:tarfile, ":h")
+ endwhile
+
+ let l:toextract = strpart(l:argument, strlen(l:tarfile) + 1)
+
+ if (l:toextract == "")
+ return
+ endif
+
+ let l:cat = s:TarCatCommand(l:tarfile)
+ execute "r !" . l:cat . " < '" . l:tarfile . "'"
+ \ " | tar OPxf - '" . l:toextract . "'"
+
+ if (a:cleanup)
+ 0d "blank line
+ execute "doautocmd BufReadPost " . expand("%")
+ setlocal readonly
+ silent preserve
+ endif
+endfunction
+
+function! tar#Browse(tarfile)
+ setlocal noswapfile
+ setlocal buftype=nofile
+ setlocal bufhidden=hide
+ setlocal filetype=
+ setlocal nobuflisted
+ setlocal buftype=nofile
+ setlocal wrap
+ setlocal syntax=tar
+
+ let l:tarfile = a:tarfile
+ let b:tarfile = l:tarfile
+ let l:cat = s:TarCatCommand(l:tarfile)
+
+ if ! filereadable(l:tarfile)
+ let l:tarfile = substitute(l:tarfile, '^tarfile:', '', '')
+ endif
+
+ if ! filereadable(l:tarfile)
+ echo "ERROR: File not readable:" l:tarfile
+ return
+ endif
+
+ call s:Say("\" tar.vim version " . s:version)
+ call s:Say("\" Browsing tarfile " . l:tarfile)
+ call s:Say("\" Hit ENTER to view a file in a new window")
+ call s:Say("")
+
+ silent execute "r!" . l:cat . "<'" . l:tarfile . "'| tar Ptf - "
+ 0d "blank line
+ /^$/1
+
+ setlocal readonly
+ setlocal nomodifiable
+ noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
+endfunction
+
+function! s:TarBrowseSelect()
+ let l:line = getline(".")
+
+ if (l:line =~ '^" ')
+ return
+ endif
+
+ if (l:line =~ '/$')
+ echo "Please specify a file, not a directory"
+ return
+ endif
+
+ let l:selection = "tarfile:" . b:tarfile . "/" . l:line
+ new
+ wincmd _
+ execute "e " . l:selection
+endfunction
+
+" kludge to deal with compressed archives
+function! s:TarCatCommand(tarfile)
+ if a:tarfile =~# '\.\(gz\|tgz\|Z\)$'
+ let l:cat = "gzip -d -c"
+ elseif a:tarfile =~# '\.bz2$'
+ let l:cat = "bzip2 -d -c"
+ else
+ let l:cat = "cat"
+ endif
+ return l:cat
+endfunction
+
+function! s:Say(string)
+ let @" = a:string
+ $ put
+endfunction
View
4 runtime/doc/index.txt
@@ -1,4 +1,4 @@
-*index.txt* For Vim version 7.0aa. Last change: 2005 Jul 06
+*index.txt* For Vim version 7.0aa. Last change: 2005 Jul 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1059,13 +1059,15 @@ The commands are sorted on the non-optional part of their name.
|:cNfile| :cNf[ile] go to last error in previous file
|:cabbrev| :ca[bbrev] like ":abbreviate" but for Command-line mode
|:cabclear| :cabc[lear] clear all abbreviations for Command-line mode
+|:caddfile| :cad[dfile] add error message to current quickfix list
|:call| :cal[l] call a function
|:catch| :cat[ch] part of a :try command
|:cbuffer| :cb[uffer] parse error messages and jump to first error
|:cc| :cc go to specific error
|:cclose| :ccl[ose] close quickfix window
|:cd| :cd change directory
|:center| :ce[nter] format lines at the center
+|:cexpr| :cex[pr] read errors from expr and jump to first
|:cfile| :cf[ile] read file with error messages and jump to first
|:cfirst| :cfir[st] go to the specified error, default first one
|:cgetfile| :cg[etfile] read file with error messages
View
3 runtime/doc/insert.txt
@@ -1,4 +1,4 @@
-*insert.txt* For Vim version 7.0aa. Last change: 2005 Apr 08
+*insert.txt* For Vim version 7.0aa. Last change: 2005 Jul 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1004,6 +1004,7 @@ NOTE: ":append" and ":insert" don't work properly in between ":if" and
Note that when using this command in a function or
script, the insertion only starts after the function
or script is finished.
+ This command does not work from |:normal|.
{not in Vi}
{not available when compiled without the +ex_extra
feature}
View
35 runtime/doc/message.txt
@@ -1,4 +1,4 @@
-*message.txt* For Vim version 7.0aa. Last change: 2005 Feb 13
+*message.txt* For Vim version 7.0aa. Last change: 2005 Jul 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -714,20 +714,24 @@ a user-defined command.
This is an (incomplete) overview of various messages that Vim gives:
- *hit-enter* *press-enter* *hit-return* *press-return* >
+ *hit-enter* *press-enter* *hit-return*
+ *press-return* *hit-enter-prompt*
- Hit ENTER or type command to continue
+ Press ENTER or type command to continue
This message is given when there is something on the screen for you to read,
and the screen is about to be redrawn:
- After executing an external command (e.g., ":!ls" and "=").
- Something is displayed on the status line that is longer than the width of
the window, or runs into the 'showcmd' or 'ruler' output.
--> Hit <Enter> or <Space> to redraw the screen and continue, without that key
- being used otherwise.
--> Hit ":" or any other Normal mode command character to start that command.
--> Hit <C-Y> to copy (yank) a modeless selection to the clipboard register.
+-> Press <Enter> or <Space> to redraw the screen and continue, without that
+ key being used otherwise.
+-> Press ':' or any other Normal mode command character to start that command.
+-> Press 'k', 'u' or 'b' to scroll back in the messages. This works the same
+ way as at the |more-prompt|. Only works when 'compatible' is off and
+ 'more' is on.
+-> Press <C-Y> to copy (yank) a modeless selection to the clipboard register.
-> Use a menu. The characters defined for Cmdline-mode are used.
-> When 'mouse' contains the 'r' flag, clicking the left mouse button works
like pressing <Space>. This makes it impossible to select text though.
@@ -746,20 +750,21 @@ group.
*more-prompt* *pager* >
-- More --
- -- More -- (RET: line, SPACE: page, d: half page, q: quit)
- -- More -- (RET/BS: line, SPACE/b: page, d/u: half page, q: quit)
+ -- More -- SPACE/d/j: screen/page/line down, b/u/k: up, q: quit
This message is given when the screen is filled with messages. It is only
given when the 'more' option is on. It is highlighted with the |hl-MoreMsg|
group.
Type effect ~
<CR> or <NL> or j or <Down> one more line
+ d down a page (half a screen)
+ <Space> or <PageDown> down a screen
+
<BS> or k or <Up> one line back (*)
- <Space> or <PageDown> next page
- b or <PageUp> previous page (*)
- d down half a page
- u up half a page (*)
+ u up a page (half a screen) (*)
+ b or <PageUp> back a screen (*)
+
q, <Esc> or CTRL-C stop the listing
: stop the listing and enter a
command-line
@@ -771,8 +776,8 @@ Type effect ~
Any other key causes the meaning of the keys to be displayed.
-(*) backwards scrolling is only supported for these commands: >
- :clist
+(*) backwards scrolling is {not in Vi}. Only scrolls back to where messages
+ started to scroll.
(**) Clicking the left mouse button only works:
- For the GUI: in the last line of the screen.
- When 'r' is included in 'mouse' (but then selecting text won't work).
View
6 runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.0aa. Last change: 2005 Jul 22
+*options.txt* For Vim version 7.0aa. Last change: 2005 Jul 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1028,7 +1028,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Vim does not try to send a message to an external debugger (Netbeans
or Sun Workshop).
- To check wether line breaks in the balloon text work use this check: >
+ To check whether line breaks in the balloon text work use this check: >
if has("balloon_multiline")
<
*'binary'* *'bin'* *'nobinary'* *'nobin'*
@@ -1066,7 +1066,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'bioskey' 'biosk' boolean (default on)
global
{not in Vi} {only for MS-DOS}
- When on the bios is called to obtain a keyboard character. This works
+ When on the BIOS is called to obtain a keyboard character. This works
better to detect CTRL-C, but only works for the console. When using a
terminal over a serial port reset this option.
Also see |'conskey'|.
View
20 runtime/doc/quickfix.txt
@@ -1,4 +1,4 @@
-*quickfix.txt* For Vim version 7.0aa. Last change: 2005 Jul 25
+*quickfix.txt* For Vim version 7.0aa. Last change: 2005 Jul 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -110,6 +110,11 @@ The following quickfix commands can be used:
Read the error file. Just like ":cfile" but don't
jump to the first error.
+ *:cad* *:caddfile*
+:cad[dfile] [errorfile] Read the error file and add the errors from the
+ errorfile to the current quickfix list. If a quickfix
+ list is not present, then a new list is created.
+
*:cb* *:cbuffer* *E681*
:cb[uffer] [bufnr] Read the error list from the current buffer.
When [bufnr] is given it must be the number of a
@@ -118,6 +123,19 @@ The following quickfix commands can be used:
A range can be specified for the lines to be used.
Otherwise all lines in the buffer are used.
+ *:cex* *:cexpr*
+:cex[pr][!] {expr} Create a quickfix list using the result of {expr}.
+ If {expr} is a String, then each new-line terminated
+ line in the String is processed using 'errorformat'
+ and the result is added to the quickfix list.
+ If {expr} is a List, then each String item in the list
+ is processed and added to the quickfix list.
+ Non String items in the List are ignored. See |:cc|
+ for [!].
+ Examples: >
+ :cexpr system('grep -n xyz *')
+ :cexpr getline(1, '$')
+<
*:cl* *:clist*
:cl[ist] [from] [, [to]]
List all errors that are valid |quickfix-valid|.
View
7 runtime/doc/quickref.txt
@@ -1,4 +1,4 @@
-*quickref.txt* For Vim version 7.0aa. Last change: 2005 Jul 13
+*quickref.txt* For Vim version 7.0aa. Last change: 2005 Jul 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -933,6 +933,11 @@ Short explanation of each option: *option-list*
|:cprevious| :cp display the previous error
|:clist| :cl list all errors
|:cfile| :cf read errors from the file 'errorfile'
+|:cgetfile| :cg like :cfile but don't jump to the first error
+|:caddfile| :cad add errors from the error file to the current
+ quickfix list
+|:cbuffer| :cb read errors from text in a buffer
+|:cexpr| :cex read errors from an expression
|:cquit| :cq quit without writing and return error code (to
the compiler)
|:make| :make [args] start make, read errors, and jump to first
View
6 runtime/doc/tags
@@ -1753,6 +1753,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:cabbrev map.txt /*:cabbrev*
:cabc map.txt /*:cabc*
:cabclear map.txt /*:cabclear*
+:cad quickfix.txt /*:cad*
+:caddfile quickfix.txt /*:caddfile*
:cal eval.txt /*:cal*
:call eval.txt /*:call*
:cat eval.txt /*:cat*
@@ -1766,6 +1768,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:cd- editing.txt /*:cd-*
:ce change.txt /*:ce*
:center change.txt /*:center*
+:cex quickfix.txt /*:cex*
+:cexpr quickfix.txt /*:cexpr*
:cf quickfix.txt /*:cf*
:cfile quickfix.txt /*:cfile*
:cfir quickfix.txt /*:cfir*
@@ -5188,6 +5192,7 @@ histget() eval.txt /*histget()*
histnr() eval.txt /*histnr()*
history cmdline.txt /*history*
hit-enter message.txt /*hit-enter*
+hit-enter-prompt message.txt /*hit-enter-prompt*
hit-return message.txt /*hit-return*
hitest.vim syntax.txt /*hitest.vim*
hjkl usr_02.txt /*hjkl*
@@ -5828,6 +5833,7 @@ new-printing version6.txt /*new-printing*
new-runtime-dir version5.txt /*new-runtime-dir*
new-script version5.txt /*new-script*
new-script-5.4 version5.txt /*new-script-5.4*
+new-scroll-back version7.txt /*new-scroll-back*
new-search-path version6.txt /*new-search-path*
new-searchpat version6.txt /*new-searchpat*
new-session-files version5.txt /*new-session-files*
View
27 runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2005 Jul 25
+*todo.txt* For Vim version 7.0aa. Last change: 2005 Jul 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -58,13 +58,13 @@ Awaiting response:
PLANNED FOR VERSION 7.0:
-- Store messages to allow SCROLLING BACK for all commands. And other "less"
- like commands.
- "INTELLISENSE". First cleanup the Insert-mode completion.
http://www.vim.org/scripts/script.php?script_id=747
www.vim.org script 1213 (Java Development Environment) (Fuchuan Wang)
http://sourceforge.net/projects/insenvim
of http://insenvim.sourceforge.net
+ IComplete: http://www.vim.org/scripts/script.php?script_id=1265
+ and http://stud4.tuwien.ac.at/~e0125672/icomplete/
http://cedet.sourceforge.net/intellisense.shtml (for Emacs)
Ivan Villanueva has something for Java.
Ideas from Emads:
@@ -104,12 +104,21 @@ PLANNED FOR VERSION 7.0:
keep undo: "3h", "1d", "2w", "1y", etc. For the file use dot and
extension: ".filename.un~" (like swapfile but "un~" instead of "swp").
7 Support WINDOW TABS. Works like several pages, each with their own
- split windows. Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6.
- Don't forget to provide an "X" to close a tab.
- Also for the console!
+ split windows.
In Emacs these are called frames. Could also call them "pages".
- Use "1gt" - "99gt" to switch to a tab?
+ Use the name of the first buffer in the tab (ignoring the help window,
+ unless it's the only one). Add a number for the window count.
+ First make it work on the console. Use a line of text with highlighting.
+ Then add GUI Tabs for some systems.
+ Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6.
Simple patch for GTK by Luis M (nov 7).
+ Don't forget to provide an "X" to close a tab.
+ Implementation: keep the list of windows as-is. When switching to another
+ tab make the buffers in the current windows hidden, save the window
+ layout, buildup the other window layout and fill with buffers.
+ Need to be able to search the windows in inactive tabs, e.g. for the
+ quickfix window.
+ Use "1gt" - "99gt" to switch to a tab?
- EMBEDDING: Make it possible to run Vim inside a window of another program.
For Xwindows this can be done with XReparentWindow().
For GTK Neil Bird has a patch to use Vim like a widget.
@@ -238,10 +247,6 @@ Commands to use the location list:
:lgetfile idem, don't jump to first one
:lbuffer idem, from current buffer.
-7 Add a ":cstring" command. Works like ":cfile" but reads from a string
- variable. Also accept a list variable? Patch from Yegappan Lakshmanan.
- 2005 Feb 17 Now it's ":cexpr".
-
HTML indenting can be slow, find out why. Any way to do some kind of
profiling for Vim script? At least add a function to get the current time in
usec. reltime([start, [end]])
View
28 runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.0aa. Last change: 2005 Jul 25
+*version7.txt* For Vim version 7.0aa. Last change: 2005 Jul 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -25,6 +25,7 @@ MzScheme interface |new-MzScheme|
Printing multi-byte text |new-print-multi-byte|
Translated manual pages |new-manpage-trans|
Internal grep |new-vimgrep|
+Scroll back in messages |new-scroll-back|
POSIX compatibility |new-posix|
Debugger support |new-debug-support|
Various new items |new-items-7|
@@ -227,6 +228,17 @@ expands into an arbitrary depth of directories. "**" can be used in all
places where file names are expanded, thus also with |:next| and |:args|.
+Scroll back in messages *new-scroll-back*
+-----------------------
+
+When displaying messages, at the |more-prompt| and the |hit-enter-prompt|, The
+'k', 'u' and 'b' keys can be used to scroll back to previous messages. This
+is especially useful for commands such as ":syntax", ":autocommand" and
+":highlight". This is implemented in a generic way thus it works for all
+commands and highlighting is kept. Only works when the 'more' option is set.
+Previously it only partly worked for ":clist".
+
+
POSIX compatibility *new-posix*
-------------------
@@ -350,6 +362,12 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|:sort| Sort lines in the buffer without depending on an
external command.
+|:caddfile| Add error messages to an existing quickfix list
+ (Yegappan Lakshmanan).
+
+|:cexpr| Read error messages from a Vim expression (Yegappan
+ Lakshmanan).
+
New functions: ~
@@ -1214,4 +1232,12 @@ When using command line completion for ":e *foo" and the file "+foo" exists
the resulting command ":e +foo" doesn't work. Now insert a backslash: ":e
\+foo".
+When the translation of "-- More --" was not 10 characters long the following
+message would be in the wrong position.
+
+At the more-prompt the last character in the last line wasn't drawn.
+
+When deleting non-existing text while 'virtualedit' is set the '[ and '] marks
+were not set.
+
vim:tw=78:ts=8:ft=help:norl:
View
15 runtime/ftplugin/diff.vim
@@ -0,0 +1,15 @@
+" Vim filetype plugin file
+" Language: Diff
+" Maintainer: Bram Moolenaar <Bram@vim.org>
+" Last Change: 2005 Jul 27
+
+" Only do this when not done yet for this buffer
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+let b:undo_ftplugin = "setl modeline<"
+
+" Don't use modelines in a diff, they apply to the diffed file
+setlocal nomodeline
View
150 runtime/plugin/NetrwFileHandlers.vim
@@ -1,313 +1,253 @@
" NetrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
-" Author: Charles E. Campbell, Jr.
-" Date: Aug 31, 2004
-" Version: 3
+" Author: Charles E. Campbell, Jr.
+" Date: Aug 31, 2004
+" Version: 3
" ---------------------------------------------------------------------
" Prevent Reloading: {{{1
if exists("g:loaded_netrwfilehandlers") || &cp
- finish
+ finish
endif
let g:loaded_netrwfilehandlers= "v3"
" ---------------------------------------------------------------------
" NetrwFileHandler_html: handles html when the user hits "x" when the {{{1
" cursor is atop a *.html file
fun! NetrwFileHandler_html(pagefile)
-" call Dfunc("NetrwFileHandler_html(".a:pagefile.")")
-
- let page= substitute(a:pagefile,'^','file://','')
+ let page = substitute(a:pagefile, '^', 'file://', '')
if executable("mozilla")
-" call Decho("executing !mozilla ".page)
- exe "!mozilla \"".page.'"'
+ exe "!mozilla \"" . page . '"'
elseif executable("netscape")
-" call Decho("executing !netscape ".page)
- exe "!netscape \"".page.'"'
+ exe "!netscape \"" . page . '"'
else
-" call Dret("NetrwFileHandler_html 0")
- return 0
+ return 0
endif
-" call Dret("NetrwFileHandler_html 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_htm: handles html when the user hits "x" when the {{{1
" cursor is atop a *.htm file
fun! NetrwFileHandler_htm(pagefile)
-" call Dfunc("NetrwFileHandler_htm(".a:pagefile.")")
-
- let page= substitute(a:pagefile,'^','file://','')
+ let page = substitute(a:pagefile, '^', 'file://', '')
if executable("mozilla")
-" call Decho("executing !mozilla ".page)
- exe "!mozilla \"".page.'"'
+ exe "!mozilla \"" . page . '"'
elseif executable("netscape")
-" call Decho("executing !netscape ".page)
- exe "!netscape \"".page.'"'
+ exe "!netscape \"" . page . '"'
else
-" call Dret("NetrwFileHandler_htm 0")
- return 0
+ return 0
endif
-" call Dret("NetrwFileHandler_htm 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_jpg: {{{1
fun! NetrwFileHandler_jpg(jpgfile)
-" call Dfunc("NetrwFileHandler_jpg(jpgfile<".a:jpgfile.">)")
-
if executable("gimp")
- exe "silent! !gimp -s ".a:jpgfile
+ exe "silent! !gimp -s " . a:jpgfile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
-" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
- exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:jpgfile.'"'
+ exe "!" . expand("$SystemRoot") . "/SYSTEM32/MSPAINT \"" . a:jpgfile . '"'
else
-" call Dret("NetrwFileHandler_jpg 0")
- return 0
+ return 0
endif
-" call Dret("NetrwFileHandler_jpg 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_gif: {{{1
fun! NetrwFileHandler_gif(giffile)
-" call Dfunc("NetrwFileHandler_gif(giffile<".a:giffile.">)")
-
if executable("gimp")
- exe "silent! !gimp -s ".a:giffile
- elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
- exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:giffile.'"'
+ exe "silent! !gimp -s " . a:giffile
+ elseif executable(expand("$SystemRoot") . "/SYSTEM32/MSPAINT.EXE")
+ exe "silent! !" . expand("$SystemRoot") . "/SYSTEM32/MSPAINT \"" . a:giffile . '"'
else
-" call Dret("NetrwFileHandler_gif 0")
return 0
endif
-" call Dret("NetrwFileHandler_gif 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_png: {{{1
fun! NetrwFileHandler_png(pngfile)
-" call Dfunc("NetrwFileHandler_png(pngfile<".a:pngfile.">)")
-
if executable("gimp")
- exe "silent! !gimp -s ".a:pngfile
- elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
- exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pngfile.'"'
+ exe "silent! !gimp -s " . a:pngfile
+ elseif executable(expand("$SystemRoot") . "/SYSTEM32/MSPAINT.EXE")
+ exe "silent! !" . expand("$SystemRoot") . "/SYSTEM32/MSPAINT \"" . a:pngfile . '"'
else
-" call Dret("NetrwFileHandler_png 0")
return 0
endif
-" call Dret("NetrwFileHandler_png 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_pnm: {{{1
fun! NetrwFileHandler_pnm(pnmfile)
-" call Dfunc("NetrwFileHandler_pnm(pnmfile<".a:pnmfile.">)")
-
if executable("gimp")
- exe "silent! !gimp -s ".a:pnmfile
- elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
- exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pnmfile.'"'
+ exe "silent! !gimp -s " . a:pnmfile
+ elseif executable(expand("$SystemRoot") . "/SYSTEM32/MSPAINT.EXE")
+ exe "silent! !" . expand("$SystemRoot") . "/SYSTEM32/MSPAINT \"" . a:pnmfile . '"'
else
-" call Dret("NetrwFileHandler_pnm 0")
return 0
endif
-" call Dret("NetrwFileHandler_pnm 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_bmp: visualize bmp files {{{1
fun! NetrwFileHandler_bmp(bmpfile)
-" call Dfunc("NetrwFileHandler_bmp(bmpfile<".a:bmpfile.">)")
-
if executable("gimp")
- exe "silent! !gimp -s ".a:bmpfile
+ exe "silent! !gimp -s " . a:bmpfile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
- exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:bmpfile.'"'
+ exe "silent! !" . expand("$SystemRoot") . "/SYSTEM32/MSPAINT \"" . a:bmpfile . '"'
else
-" call Dret("NetrwFileHandler_bmp 0")
return 0
endif
-" call Dret("NetrwFileHandler_bmp 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_pdf: visualize pdf files {{{1
fun! NetrwFileHandler_pdf(pdf)
-" " call Dfunc("NetrwFileHandler_pdf(pdf<".a:pdf.">)")
- if executable("gs")
- exe 'silent! !gs "'.a:pdf.'"'
+ if executable("acroread")
+ exe 'silent! !acroread "' . a:pdf . '"'
+ elseif executable("gs")
+ exe 'silent! !gs "' . a:pdf . '"'
else
-" " call Dret("NetrwFileHandler_pdf 0")
return 0
endif
-" " call Dret("NetrwFileHandler_pdf 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_sxw: visualize sxw files {{{1
fun! NetrwFileHandler_sxw(sxw)
-" " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
if executable("gs")
- exe 'silent! !gs "'.a:sxw.'"'
+ exe 'silent! !gs "' . a:sxw . '"'
else
-" " call Dret("NetrwFileHandler_sxw 0")
return 0
endif
-" " call Dret("NetrwFileHandler_sxw 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_doc: visualize doc files {{{1
fun! NetrwFileHandler_doc(doc)
-" " call Dfunc("NetrwFileHandler_doc(doc<".a:doc.">)")
-
if executable("oowriter")
- exe 'silent! !oowriter "'.a:doc.'"'
+ exe 'silent! !oowriter "' . a:doc . '"'
redraw!
else
-" " call Dret("NetrwFileHandler_doc 0")
return 0
endif
-" " call Dret("NetrwFileHandler_doc 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_sxw: visualize sxw files {{{1
fun! NetrwFileHandler_sxw(sxw)
-" " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
-
if executable("oowriter")
- exe 'silent! !oowriter "'.a:sxw.'"'
+ exe 'silent! !oowriter "' . a:sxw . '"'
redraw!
else
-" " call Dret("NetrwFileHandler_sxw 0")
return 0
endif
-" " call Dret("NetrwFileHandler_sxw 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_xls: visualize xls files {{{1
fun! NetrwFileHandler_xls(xls)
-" " call Dfunc("NetrwFileHandler_xls(xls<".a:xls.">)")
-
if executable("oocalc")
- exe 'silent! !oocalc "'.a:xls.'"'
+ exe 'silent! !oocalc "' . a:xls . '"'
redraw!
else
-" " call Dret("NetrwFileHandler_xls 0")
return 0
endif
-" " call Dret("NetrwFileHandler_xls 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_ps: handles PostScript files {{{1
fun! NetrwFileHandler_ps(ps)
-" call Dfunc("NetrwFileHandler_ps()")
if executable("gs")
- exe "silent! !gs ".a:ps
+ exe "silent! !gs " . a:ps
redraw!
elseif executable("ghostscript")
- exe "silent! !ghostscript ".a:ps
+ exe "silent! !ghostscript " . a:ps
redraw!
elseif executable("ghostscript")
- exe "silent! !ghostscript ".a:ps
+ exe "silent! !ghostscript " . a:ps
redraw!
elseif executable("gswin32")
- exe "silent! !gswin32 \"".a:ps.'"'
+ exe "silent! !gswin32 \"" . a:ps . '"'
redraw!
else
-" call Dret("NetrwFileHandler_ps 0")
return 0
endif
-" call Dret("NetrwFileHandler_ps 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_eps: handles encapsulated PostScript files {{{1
fun! NetrwFileHandler_eps(eps)
-" call Dfunc("NetrwFileHandler_ps()")
if executable("gs")
- exe "silent! !gs ".a:eps
+ exe "silent! !gs " . a:eps
redraw!
elseif executable("ghostscript")
- exe "silent! !ghostscript ".a:eps
+ exe "silent! !ghostscript " . a:eps
redraw!
elseif executable("ghostscript")
- exe "silent! !ghostscript ".a:eps
+ exe "silent! !ghostscript " . a:eps
redraw!
elseif executable("gswin32")
- exe "silent! !gswin32 \"".a:eps.'"'
+ exe "silent! !gswin32 \"" . a:eps . '"'
redraw!
else
-" call Dret("NetrwFileHandler_ps 0")
return 0
endif
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_fig: handles xfig files {{{1
fun! NetrwFileHandler_fig(fig)
-" call Dfunc("NetrwFileHandler_fig()")
if executable("xfig")
- exe "silent! !xfig ".a:fig
+ exe "silent! !xfig " . a:fig
redraw!
else
-" call Dret("NetrwFileHandler_fig 0")
return 0
endif
-" call Dret("NetrwFileHandler_fig 1")
return 1
endfun
" ---------------------------------------------------------------------
" NetrwFileHandler_obj: handles tgif's obj files {{{1
fun! NetrwFileHandler_obj(obj)
-" call Dfunc("NetrwFileHandler_obj()")
if has("unix") && executable("tgif")
- exe "silent! !tgif ".a:obj
+ exe "silent! !tgif " . a:obj
redraw!
else
-" call Dret("NetrwFileHandler_obj 0")
return 0
endif
-" call Dret("NetrwFileHandler_obj 1")
return 1
endfun
" ---------------------------------------------------------------------
-" vim: ts=4 fdm=marker
+" vim: fdm=marker
View
202 runtime/plugin/gzip.vim
@@ -1,6 +1,6 @@
" Vim plugin for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2005 May 18
+" Last Change: 2005 Jul 26
" Exit quickly when:
" - this plugin was already loaded
@@ -15,188 +15,22 @@ augroup gzip
" Remove all gzip autocommands
au!
- " Enable editing of gzipped files
- " set binary mode before reading the file
- " use "gzip -d", gunzip isn't always available
+ " Enable editing of gzipped files.
+ " The functions are defined in autoload/gzip.vim.
+ "
+ " Set binary mode before reading the file.
+ " Use "gzip -d", gunzip isn't always available.
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z setlocal bin
- autocmd BufReadPost,FileReadPost *.gz call s:read("gzip -dn")
- autocmd BufReadPost,FileReadPost *.bz2 call s:read("bzip2 -d")
- autocmd BufReadPost,FileReadPost *.Z call s:read("uncompress")
- autocmd BufWritePost,FileWritePost *.gz call s:write("gzip")
- autocmd BufWritePost,FileWritePost *.bz2 call s:write("bzip2")
- autocmd BufWritePost,FileWritePost *.Z call s:write("compress -f")
- autocmd FileAppendPre *.gz call s:appre("gzip -dn")
- autocmd FileAppendPre *.bz2 call s:appre("bzip2 -d")
- autocmd FileAppendPre *.Z call s:appre("uncompress")
- autocmd FileAppendPost *.gz call s:write("gzip")
- autocmd FileAppendPost *.bz2 call s:write("bzip2")
- autocmd FileAppendPost *.Z call s:write("compress -f")
+ autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn")
+ autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d")
+ autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress")
+ autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip")
+ autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2")
+ autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f")
+ autocmd FileAppendPre *.gz call gzip#appre("gzip -dn")
+ autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d")
+ autocmd FileAppendPre *.Z call gzip#appre("uncompress")
+ autocmd FileAppendPost *.gz call gzip#write("gzip")
+ autocmd FileAppendPost *.bz2 call gzip#write("bzip2")
+ autocmd FileAppendPost *.Z call gzip#write("compress -f")
augroup END
-
-" Function to check that executing "cmd [-f]" works.
-" The result is cached in s:have_"cmd" for speed.
-fun s:check(cmd)
- let name = substitute(a:cmd, '\(\S*\).*', '\1', '')
- if !exists("s:have_" . name)
- let e = executable(name)
- if e < 0
- let r = system(name . " --version")
- let e = (r !~ "not found" && r != "")
- endif
- exe "let s:have_" . name . "=" . e
- endif
- exe "return s:have_" . name
-endfun
-
-" Set b:gzip_comp_arg to the gzip argument to be used for compression, based on
-" the flags in the compressed file.
-" The only compression methods that can be detected are max speed (-1) and max
-" compression (-9).
-fun s:set_compression(line)
- " get the Compression Method
- let l:cm = char2nr(a:line[2])
- " if it's 8 (DEFLATE), we can check for the compression level
- if l:cm == 8
- " get the eXtra FLags
- let l:xfl = char2nr(a:line[8])
- " max compression
- if l:xfl == 2
- let b:gzip_comp_arg = "-9"
- " min compression
- elseif l:xfl == 4
- let b:gzip_comp_arg = "-1"
- endif
- endif
-endfun
-
-
-" After reading compressed file: Uncompress text in buffer with "cmd"
-fun s:read(cmd)
- " don't do anything if the cmd is not supported
- if !s:check(a:cmd)
- return
- endif
-
- " for gzip check current compression level and set b:gzip_comp_arg.
- silent! unlet b:gzip_comp_arg
- if a:cmd[0] == 'g'
- call s:set_compression(getline(1))
- endif
-
- " make 'patchmode' empty, we don't want a copy of the written file
- let pm_save = &pm
- set pm=
- " remove 'a' and 'A' from 'cpo' to avoid the alternate file changes
- let cpo_save = &cpo
- set cpo-=a cpo-=A
- " set 'modifiable'
- let ma_save = &ma
- setlocal ma
- " when filtering the whole buffer, it will become empty
- let empty = line("'[") == 1 && line("']") == line("$")
- let tmp = tempname()
- let tmpe = tmp . "." . expand("<afile>:e")
- " write the just read lines to a temp file "'[,']w tmp.gz"
- execute "silent '[,']w " . tmpe
- " uncompress the temp file: call system("gzip -dn tmp.gz")
- call system(a:cmd . " " . tmpe)
- if !filereadable(tmp)
- " uncompress didn't work! Keep the compressed file then.
- echoerr "Error: Could not read uncompressed file"
- return
- endif
- " delete the compressed lines; remember the line number
- let l = line("'[") - 1
- if exists(":lockmarks")
- lockmarks '[,']d _
- else
- '[,']d _
- endif
- " read in the uncompressed lines "'[-1r tmp"
- setlocal nobin
- if exists(":lockmarks")
- execute "silent lockmarks " . l . "r " . tmp
- else
- execute "silent " . l . "r " . tmp
- endif
-
- " if buffer became empty, delete trailing blank line
- if empty
- silent $delete _
- 1
- endif
- " delete the temp file and the used buffers
- call delete(tmp)
- silent! exe "bwipe " . tmp
- silent! exe "bwipe " . tmpe
- let &pm = pm_save
- let &cpo = cpo_save
- let &l:ma = ma_save
- " When uncompressed the whole buffer, do autocommands
- if empty
- if &verbose >= 8
- execute "doau BufReadPost " . expand("%:r")
- else
- execute "silent! doau BufReadPost " . expand("%:r")
- endif
- endif
-endfun
-
-" After writing compressed file: Compress written file with "cmd"
-fun s:write(cmd)
- " don't do anything if the cmd is not supported
- if s:check(a:cmd)
- " Rename the file before compressing it.
- let nm = resolve(expand("<afile>"))
- let nmt = s:tempname(nm)
- if rename(nm, nmt) == 0
- if exists("b:gzip_comp_arg")
- call system(a:cmd . " " . b:gzip_comp_arg . " " . nmt)
- else
- call system(a:cmd . " " . nmt)
- endif
- call rename(nmt . "." . expand("<afile>:e"), nm)
- endif
- endif
-endfun
-
-" Before appending to compressed file: Uncompress file with "cmd"
-fun s:appre(cmd)
- " don't do anything if the cmd is not supported
- if s:check(a:cmd)
- let nm = expand("<afile>")
-
- " for gzip check current compression level and set b:gzip_comp_arg.
- silent! unlet b:gzip_comp_arg
- if a:cmd[0] == 'g'
- call s:set_compression(readfile(nm, "b", 1)[0])
- endif
-
- " Rename to a weird name to avoid the risk of overwriting another file
- let nmt = expand("<afile>:p:h") . "/X~=@l9q5"
- let nmte = nmt . "." . expand("<afile>:e")
- if rename(nm, nmte) == 0
- if &patchmode != "" && getfsize(nm . &patchmode) == -1
- " Create patchmode file by creating the decompressed file new
- call system(a:cmd . " -c " . nmte . " > " . nmt)
- call rename(nmte, nm . &patchmode)
- else
- call system(a:cmd . " " . nmte)
- endif
- call rename(nmt, nm)
- endif
- endif
-endfun
-
-" find a file name for the file to be compressed. Use "name" without an
-" extension if possible. Otherwise use a weird name to avoid overwriting an
-" existing file.
-fun s:tempname(name)
- let fn = fnamemodify(a:name, ":r")
- if !filereadable(fn) && !isdirectory(fn)
- return fn
- endif
- return fnamemodify(a:name, ":p:h") . "/X~=@l9q5"
-endfun
-
-" vim: set sw=2 :
View
201 runtime/plugin/tar.vim
@@ -1,185 +1,34 @@
-" vim:set ts=4 sw=4 ai nobackup:
-
-" tar.vim -- a vim plugin for browsing tarfiles
+" tar.vim -- a Vim plugin for browsing tarfiles
" Copyright (c) 2002, Michael C. Toren <mct@toren.net>
+" Distributed under the GNU General Public License.
+"
+" Version: 1.01
+" Last Change: 2005 Jul 26
"
" Updates are available from <http://michael.toren.net/code/>. If you
" find this script useful, or have suggestions for improvements, please
" let me know.
+" Also look there for further comments and documentation.
"
-" Usage:
-" Once this script is installed, attempting to edit a tarfile will present
-" the user with a list of files contained in the tar archive. By moving the
-" cursor over a filename and pressing ENTER, the contents of a file can be
-" viewed in read-only mode, in a new window. Unfortunately, write support
-" for tarfile components is not currently possible.
-"
-" Requirements:
-" GNU tar, or a tar implementation that supports the "P" (don't strip
-" out leading /'s from filenames), and "O" (extract files to standard
-" output) options. Additionally, gzip is required for handling *.tar.Z,
-" *.tar.gz, and *.tgz compressed tarfiles, and bzip2 is required for
-" handling *.tar.bz2 compressed tarfiles. A unix-like operating system
-" is probably also required.
-"
-" Installation:
-" Place this file, tar.vim, in your $HOME/.vim/plugin directory, and
-" either restart vim, or execute ":source $HOME/.vim/plugin/tar.vim"
-"
-" Todo:
-" - Handle zipfiles?
-" - Implement write support, somehow.
-"
-" License:
-" This program is free software; you can redistribute it and/or modify it
-" under the terms of the GNU General Public License, version 2, as published
-" by the Free Software Foundation.
-"
-" This program is distributed in the hope that it will be useful, but
-" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-" for more details.
-"
-" A copy of the GNU GPL is available as /usr/doc/copyright/GPL on Debian
-" systems, or on the World Wide Web at http://www.gnu.org/copyleft/gpl.html
-" You can also obtain it by writing to the Free Software Foundation, Inc.,
-" 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-"
-" Changelog:
-" Tue Dec 31 13:38:08 EST 2002 First release to beta testers
-" Sat Jan 4 14:06:19 EST 2003 Version 1.00 released
-
-let s:version = "1.00"
+" This part only sets the autocommands. The functions are in autoload/tar.vim.
if has("autocmd")
-augroup tar
- au!
- au BufReadCmd tarfile:* call s:TarRead(expand("<afile>"), 1)
- au BufReadCmd tarfile:*/* call s:TarRead(expand("<afile>"), 1)
- au FileReadCmd tarfile:* call s:TarRead(expand("<afile>"), 0)
- au FileReadCmd tarfile:*/* call s:TarRead(expand("<afile>"), 0)
-
- au BufWriteCmd tarfile:* call s:TarWrite(expand("<afile>"))
- au BufWriteCmd tarfile:*/* call s:TarWrite(expand("<afile>"))
- au FileWriteCmd tarfile:* call s:TarWrite(expand("<afile>"))
- au FileWriteCmd tarfile:*/* call s:TarWrite(expand("<afile>"))
-
- au BufReadCmd *.tar call s:TarBrowse(expand("<afile>"))
- au BufReadCmd *.tar.gz call s:TarBrowse(expand("<afile>"))
- au BufReadCmd *.tar.bz2 call s:TarBrowse(expand("<afile>"))
- au BufReadCmd *.tar.Z call s:TarBrowse(expand("<afile>"))
- au BufReadCmd *.tgz call s:TarBrowse(expand("<afile>"))
-augroup END
+ augroup tar
+ au!
+ au BufReadCmd tarfile:* call tar#Read(expand("<afile>"), 1)
+ au BufReadCmd tarfile:*/* call tar#Read(expand("<afile>"), 1)
+ au FileReadCmd tarfile:* call tar#Read(expand("<afile>"), 0)
+ au FileReadCmd tarfile:*/* call tar#Read(expand("<afile>"), 0)
+
+ au BufWriteCmd tarfile:* call tar#Write(expand("<afile>"))
+ au BufWriteCmd tarfile:*/* call tar#Write(expand("<afile>"))
+ au FileWriteCmd tarfile:* call tar#Write(expand("<afile>"))
+ au FileWriteCmd tarfile:*/* call tar#Write(expand("<afile>"))
+
+ au BufReadCmd *.tar call tar#Browse(expand("<afile>"))
+ au BufReadCmd *.tar.gz call tar#Browse(expand("<afile>"))
+ au BufReadCmd *.tar.bz2 call tar#Browse(expand("<afile>"))
+ au BufReadCmd *.tar.Z call tar#Browse(expand("<afile>"))
+ au BufReadCmd *.tgz call tar#Browse(expand("<afile>"))
+ augroup END
endif
-
-function! s:TarWrite(argument)
- echo "ERROR: Sorry, no write support for tarfiles yet"
-endfunction
-
-function! s:TarRead(argument, cleanup)
- let l:argument = a:argument
- let l:argument = substitute(l:argument, '^tarfile:', '', '')
- let l:argument = substitute(l:argument, '^\~', $HOME, '')
-
- let l:tarfile = l:argument
- while 1
- if (l:tarfile == "" || l:tarfile == "/")
- echo "ERROR: Could not find a readable tarfile in path:" l:argument
- return
- endif
-
- if filereadable(l:tarfile) " found it!
- break
- endif
-
- let l:tarfile = fnamemodify(l:tarfile, ":h")
- endwhile
-
- let l:toextract = strpart(l:argument, strlen(l:tarfile) + 1)
-
- if (l:toextract == "")
- return
- endif
-
- let l:cat = s:TarCatCommand(l:tarfile)
- execute "r !" . l:cat . " < '" . l:tarfile . "'"
- \ " | tar OPxf - '" . l:toextract . "'"
-
- if (a:cleanup)
- 0d "blank line
- execute "doautocmd BufReadPost " . expand("%")
- setlocal readonly
- silent preserve
- endif
-endfunction
-
-function! s:TarBrowse(tarfile)
- setlocal noswapfile
- setlocal buftype=nofile
- setlocal bufhidden=hide
- setlocal filetype=
- setlocal nobuflisted
- setlocal buftype=nofile
- setlocal wrap
-
- let l:tarfile = a:tarfile
- let b:tarfile = l:tarfile
- let l:cat = s:TarCatCommand(l:tarfile)
-
- if ! filereadable(l:tarfile)
- let l:tarfile = substitute(l:tarfile, '^tarfile:', '', '')
- endif
-
- if ! filereadable(l:tarfile)
- echo "ERROR: File not readable:" l:tarfile
- return
- endif
-
- call s:Say("\" tar.vim version " . s:version)
- call s:Say("\" Browsing tarfile " . l:tarfile)
- call s:Say("\" Hit ENTER to view contents in new window")
- call s:Say("")
-
- silent execute "r!" . l:cat . "<'" . l:tarfile . "'| tar Ptf - "
- 0d "blank line
- /^$/1
-
- setlocal readonly
- setlocal nomodifiable
- noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
-endfunction
-
-function! s:TarBrowseSelect()
- let l:line = getline(".")
-
- if (l:line =~ '^" ')
- return
- endif
-
- if (l:line =~ '/$')
- echo "Please specify a file, not a directory"
- return
- endif
-
- let l:selection = "tarfile:" . b:tarfile . "/" . l:line
- new
- wincmd _
- execute "e " . l:selection
-endfunction
-
-" kludge to deal with compressed archives
-function! s:TarCatCommand(tarfile)
- if a:tarfile =~# '\.\(gz\|tgz\|Z\)$'
- let l:cat = "gzip -d -c"
- elseif a:tarfile =~# '\.bz2$'
- let l:cat = "bzip2 -d -c"
- else
- let l:cat = "cat"
- endif
- return l:cat
-endfunction
-
-function! s:Say(string)
- let @" = a:string
- $ put
-endfunction
View
914 runtime/spell/README_en.txt
@@ -0,0 +1,914 @@
+en_US
+20040623 release.
+--
+This dictionary is based on a subset of the original
+English wordlist created by Kevin Atkinson for Pspell
+and Aspell and thus is covered by his original
+LGPL license. The affix file is a heavily modified
+version of the original english.aff file which was
+released as part of Geoff Kuenning's Ispell and as
+such is covered by his BSD license.
+
+Thanks to both authors for there wonderful work.
+
+
+===================================================
+en_AU:
+This dictionary was based on the en_GB Myspell dictionary
+which in turn was initially based on a subset of the
+original English wordlist created by Kevin Atkinson for
+Pspell and Aspell and thus is covered by his original
+LGPL licence.
+
+The credit for this en_AU dictionary goes to:
+
+Kelvin Eldridge (maintainer)
+Jean Hollis Weber
+David Wilson
+
+- Words incorrect in Australian English removed
+- a list from the previously removed words with corrected spelling was added
+- a list of major rivers was added
+- a list of place names was added
+- a list of Australian mammals was added
+- a list of Aboriginal/Koori words commonly used was added
+
+A total of 119,267 words are now recognized
+by the dictionary.
+
+Of course, special thanks go to the editors of the
+en_GB dictionary (David Bartlett, Brian Kelk and
+Andrew Brown) which provided the starting point
+for this dictionary.
+
+The affix file is currently a duplicate of the en_AU.aff
+created completely from scratch by David Bartlett and
+Andrew Brown, based on the published
+rules for MySpell and is also provided under the LGPL.
+
+If you find omissions or bugs or have new words to
+add to the dictionary, please contact the en_AU
+maintainer at:
+
+ "Kelvin" <audictionary@onlineconnections.com.au>
+
+
+
+===================================================
+en_CA:
+The dictionary file was created using the "final" English and Canadian SCOWL (Spell Checker Oriented Word Lists) wordlists available at Kevin's Word Lists Page (http://wordlist.sourceforge.net). Lists with the suffixes 10, 20, 35, 50, 65 and 65 were used. Lists with the suffixes 70, 80 and 95 were excluded. Copyright information for SCOWL and the wordlists used in creating it is reproduced below.
+
+The affix file is identical to the MySpell English (United States) affix file. It is a heavily modified version of the original english.aff file which was released as part of Geoff Kuenning's Ispell and as such is covered by his BSD license.
+
+---
+
+COPYRIGHT, SOURCES, and CREDITS from SCOWL readme file:
+
+The collective work is Copyright 2000 by Kevin Atkinson as well as any
+of the copyrights mentioned below:
+
+ Copyright 2000 by Kevin Atkinson
+
+ Permission to use, copy, modify, distribute and sell these word
+ lists, the associated scripts, the output created from the scripts,
+ and its documentation for any purpose is hereby granted without fee,
+ provided that the above copyright notice appears in all copies and
+ that both that copyright notice and this permission notice appear in
+ supporting documentation. Kevin Atkinson makes no representations
+ about the suitability of this array for any purpose. It is provided
+ "as is" without express or implied warranty.
+
+Alan Beale <biljir@pobox.com> also deserves special credit as he has,
+in addition to providing the 12Dicts package and being a major
+contributor to the ENABLE word list, given me an incredible amount of
+feedback and created a number of special lists (those found in the
+Supplement) in order to help improve the overall quality of SCOWL.
+
+The 10 level includes the 1000 most common English words (according to
+the Moby (TM) Words II [MWords] package), a subset of the 1000 most
+common words on the Internet (again, according to Moby Words II), and
+frequently class 16 from Brian Kelk's "UK English Wordlist
+with Frequency Classification".
+
+The MWords package was explicitly placed in the public domain:
+
+ The Moby lexicon project is complete and has
+ been place into the public domain. Use, sell,
+ rework, excerpt and use in any way on any platform.
+
+ Placing this material on internal or public servers is
+ also encouraged. The compiler is not aware of any
+ export restrictions so freely distribute world-wide.
+
+ You can verify the public domain status by contacting
+
+ Grady Ward
+ 3449 Martha Ct.
+ Arcata, CA 95521-4884
+
+ grady@netcom.com
+ grady@northcoast.com
+
+The "UK English Wordlist With Frequency Classification" is also in the
+Public Domain:
+
+ Date: Sat, 08 Jul 2000 20:27:21 +0100
+ From: Brian Kelk <Brian.Kelk@cl.cam.ac.uk>
+
+> I was wondering what the copyright status of your "UK English
+ > Wordlist With Frequency Classification" word list as it seems to
+ > be lacking any copyright notice.
+
+ There were many many sources in total, but any text marked
+ "copyright" was avoided. Locally-written documentation was one
+ source. An earlier version of the list resided in a filespace called
+ PUBLIC on the University mainframe, because it was considered public
+ domain.
+
+ Date: Tue, 11 Jul 2000 19:31:34 +0100
+
+ > So are you saying your word list is also in the public domain?
+
+ That is the intention.
+
+The 20 level includes frequency classes 7-15 from Brian's word list.
+
+The 35 level includes frequency classes 2-6 and words appearing in at
+least 11 of 12 dictionaries as indicated in the 12Dicts package. All
+words from the 12Dicts package have had likely inflections added via
+my inflection database.
+
+The 12Dicts package and Supplement is in the Public Domain.
+
+The WordNet database, which was used in the creation of the
+Inflections database, is under the following copyright:
+
+ This software and database is being provided to you, the LICENSEE,
+ by Princeton University under the following license. By obtaining,
+ using and/or copying this software and database, you agree that you
+ have read, understood, and will comply with these terms and
+ conditions.:
+
+ Permission to use, copy, modify and distribute this software and
+ database and its documentation for any purpose and without fee or
+ royalty is hereby granted, provided that you agree to comply with
+ the following copyright notice and statements, including the
+ disclaimer, and that the same appear on ALL copies of the software,
+ database and documentation, including modifications that you make
+ for internal use or for distribution.
+
+ WordNet 1.6 Copyright 1997 by Princeton University. All rights
+ reserved.
+
+ THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON
+ UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON
+ UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT-
+ ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE
+ LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT INFRINGE ANY
+ THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+ The name of Princeton University or Princeton may not be used in
+ advertising or publicity pertaining to distribution of the software
+ and/or database. Title to copyright in this software, database and
+ any associated documentation shall at all times remain with
+ Princeton University and LICENSEE agrees to preserve same.
+
+The 50 level includes Brian's frequency class 1, words words appearing
+in at least 5 of 12 of the dictionaries as indicated in the 12Dicts
+package, and uppercase words in at least 4 of the previous 12
+dictionaries. A decent number of proper names is also included: The
+top 1000 male, female, and Last names from the 1990 Census report; a
+list of names sent to me by Alan Beale; and a few names that I added
+myself. Finally a small list of abbreviations not commonly found in
+other word lists is included.
+
+The name files form the Census report is a government document which I
+don't think can be copyrighted.
+
+The name list from Alan Beale is also derived from the linux words
+list, which is derived from the DEC list. He also added a bunch of
+miscellaneous names to the list, which he released to the Public Domain.
+
+The DEC Word list doesn't have a formal name. It is labeled as "FILE:
+english.words; VERSION: DEC-SRC-92-04-05" and was put together by Jorge
+Stolfi <stolfi@src.dec.com> DEC Systems Research Center. The DEC Word
+list has the following copyright statement:
+
+ (NON-)COPYRIGHT STATUS
+
+ To the best of my knowledge, all the files I used to build these
+ wordlists were available for public distribution and use, at least
+ for non-commercial purposes. I have confirmed this assumption with
+ the authors of the lists, whenever they were known.
+
+ Therefore, it is safe to assume that the wordlists in this package
+ can also be freely copied, distributed, modified, and used for
+ personal, educational, and research purposes. (Use of these files in
+ commercial products may require written permission from DEC and/or
+ the authors of the original lists.)
+
+ Whenever you distribute any of these wordlists, please distribute
+ also the accompanying README file. If you distribute a modified
+ copy of one of these wordlists, please include the original README
+ file with a note explaining your modifications. Your users will
+ surely appreciate that.
+
+ (NO-)WARRANTY DISCLAIMER
+
+ These files, like the original wordlists on which they are based,
+ are still very incomplete, uneven, and inconsitent, and probably
+ contain many errors. They are offered "as is" without any warranty
+ of correctness or fitness for any particular purpose. Neither I nor
+ my employer can be held responsible for any losses or damages that
+ may result from their use.
+
+However since this Word List is used in the linux.words package which
+the author claims is free of any copyright I assume it is OK to use
+for most purposes. If you want to use this in a commercial project
+and this concerns you the information from the DEC word list can
+easily be removed without much sacrifice in quality as only the name
+lists were used.
+
+The file special-jargon.50 uses common.lst and word.lst from the
+"Unofficial Jargon File Word Lists" which is derived from "The Jargon
+File". All of which is in the Public Domain. This file also contain
+a few extra UNIX terms which are found in the file "unix-terms" in the
+special/ directory.
+
+The 60 level includes Brian's frequency class 0 and all words
+appearing in at least 2 of the 12 dictionaries as indicated by the
+12Dicts package. A large number of names are also included: The 4,946
+female names and 3,897 male names from the MWords package and the
+files "computer.names", "misc.names", and "org.names" from the DEC
+package.
+
+The 65 level includes words found in the Ispell "medium" word list.
+The Ispell word lists are under the same copyright of Ispell itself
+which is:
+
+ Copyright 1993, Geoff Kuenning, Granada Hills, CA
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. All modifications to the source code must be clearly marked as
+ such. Binary redistributions based on modified source code
+ must be clearly marked as modified versions in the documentation
+ and/or other materials provided with the distribution.
+ 4. All advertising materials mentioning features or use of this software
+ must display the following acknowledgment:
+ This product includes software developed by Geoff Kuenning and
+ other unpaid contributors.
+ 5. The name of Geoff Kuenning may not be used to endorse or promote
+ products derived from this software without specific prior
+ written permission.
+
+ THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS
+ IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GEOFF
+ KUENNING OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+The 70 level includes the 74,550 common dictionary words and the 21,986 names
+list from the MWords package. The common dictionary words, like those
+from the 12Dicts package, have had all likely inflections added.
+
+The 80 level includes the ENABLE word list, all the lists in the
+ENABLE supplement package (except for ABLE), the "UK Advanced Cryptics
+Dictionary" (UKACD), the list of signature words in from YAWL package,
+and the 10,196 places list from the MWords package.
+
+The ENABLE package, mainted by M\Cooper <thegrendel@theriver.com>,
+is in the Public Domain:
+
+ The ENABLE master word list, WORD.LST, is herewith formally released
+ into the Public Domain. Anyone is free to use it or distribute it in
+ any manner they see fit. No fee or registration is required for its
+ use nor are "contributions" solicited (if you feel you absolutely
+ must contribute something for your own peace of mind, the authors of
+ the ENABLE list ask that you make a donation on their behalf to your
+ favorite charity). This word list is our gift to the Scrabble
+ community, as an alternate to "official" word lists. Game designers
+ may feel free to incorporate the WORD.LST into their games. Please
+ mention the source and credit us as originators of the list. Note
+ that if you, as a game designer, use the WORD.LST in your product,
+ you may still copyright and protect your product, but you may *not*
+ legally copyright or in any way restrict redistribution of the
+ WORD.LST portion of your product. This *may* under law restrict your
+ rights to restrict your users' rights, but that is only fair.
+
+UKACD, by J Ross Beresford <ross@bryson.demon.co.uk>, is under the
+following copyright:
+
+ Copyright (c) J Ross Beresford 1993-1999. All Rights Reserved.
+
+ The following restriction is placed on the use of this publication:
+ if The UK Advanced Cryptics Dictionary is used in a software package
+ or redistributed in any form, the copyright notice must be
+ prominently displayed and the text of this document must be included
+ verbatim.
+
+ There are no other restrictions: I would like to see the list
+ distributed as widely as possible.
+
+The 95 level includes the 354,984 single words and 256,772 compound
+words from the MWords package, ABLE.LST from the ENABLE Supplement,
+and some additional words found in my part-of-speech database that
+were not found anywhere else.
+
+Accent information was taken from UKACD.
+
+My VARCON package was used to create the American, British, and
+Canadian word list.
+
+Since the original word lists used used in the
+VARCON package came from the Ispell distribution they are under the
+Ispell copyright.
+
+The variant word lists were created from a list of variants found in
+the 12dicts supplement package as well as a list of variants I created
+myself.
+
+
+
+
+===================================================
+en_GB:
+This dictionary was initially based on a subset of the
+original English wordlist created by Kevin Atkinson for
+Pspell and Aspell and thus is covered by his original
+LGPL licence.
+
+It has been extensively updated by David Bartlett, Brian Kelk
+and Andrew Brown:
+- numerous Americanism have been removed
+- numerous American spellings have been corrected
+- missing words have been added
+- many errors have been corrected
+- compound hyphenated words have been added where appropriate
+
+Valuable inputs to this process were received from many other
+people - far too numerous to name. Serious thanks to you all
+for your greatly appreciated help.
+
+This word list is intended to be a good representation of
+current modern British English and thus it should be a good
+basis for Commonwealth English in most countries of the world
+outside North America.
+
+The affix file has been created completely from scratch
+by David Bartlett and Andrew Brown, based on the published
+rules for MySpell and is also provided under the LGPL.
+
+In creating the affix rules an attempt has been made to
+reproduce the most general rules for English word
+formation, rather than merely use it as a means to
+compress the size of the dictionary. It is hoped that this
+will facilitate future localisation to other variants of
+English.
+
+Please let David Bartlett <dwb@openoffice.org> know of any
+errors that you find.
+
+The current release is R 1.18, 11/04/05
+===================================================
+en_NZ:
+I. Copyright
+II. Copying (Licence)
+----------------------------
+
+I. Copyright
+
+NZ English Dictionary v0.9 beta - Build 06SEP03
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+NB This is an initial version, please check:
+http://lingucomponent.openoffice.org/download_dictionary.html
+or
+http://www.girlza.com/dictionary/download.html
+for a final version, after a little while (no hurry).
+
+This dictionary is based on the en_GB Myspell dictionary
+which in turn was initially based on a subset of the
+original English wordlist created by Kevin Atkinson for
+Pspell and Aspell and thus is covered by his original
+LGPL licence.
+
+
+Introduction
+~~~~~~~~~~~~
+en_NZ.dic has been altered to include New Zealand places,
+including major cities and towns, and major suburbs. It
+also contains NZ words, organisations and expressions.
+
+en_NZ.aff has had a few REPlace strings added, but is
+basically unchanged.
+
+
+Acknowledgements
+~~~~~~~~~~~~~~~~
+Thanks must go to the original creators of the British
+dictionary, David Bartlett, Brian Kelk and Andrew Brown.
+
+I wouldn't have started this without seeing the Australian
+dictionary, thanks Kelvin Eldridge, Jean Hollis Weber and
+David Wilson.
+
+And thank you to all who've contributed to OpenOffice.org.
+
+
+License
+~~~~~~~
+This dictionary is covered by the GNU Lesser General Public
+License, viewable at http://www.gnu.org/copyleft/lesser.html
+
+
+Issues
+~~~~~~
+Many of the proper nouns already in the dictionary do not have
+an affix for 's.
+All my new words start after the z's of the original dictionary.
+
+
+Contact
+~~~~~~~
+Contact Tristan Burtenshaw (hooty@slingshot.co.nz) with any words,
+places or other suggestions for the dictionary.
+
+
+
+II. Copying
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these