summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-09-02 19:12:26 +0000
committerBram Moolenaar <Bram@vim.org>2004-09-02 19:12:26 +0000
commitd4755bb0e04fca334675f1503bd6474b017a9bba (patch)
tree8be8df859191e78ee9eef80d3b341fd5d0c1b81b /runtime
parent269ec658f0fad22b2bf9f71b06a4e6e10277f0e5 (diff)
downloadvim-git-d4755bb0e04fca334675f1503bd6474b017a9bba.tar.gz
updated for version 7.0014
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/autocmd.txt10
-rw-r--r--runtime/doc/editing.txt26
-rw-r--r--runtime/doc/eval.txt8
-rw-r--r--runtime/doc/filetype.txt9
-rw-r--r--runtime/doc/if_perl.txt6
-rw-r--r--runtime/doc/indent.txt13
-rw-r--r--runtime/doc/message.txt8
-rw-r--r--runtime/doc/options.txt7
-rw-r--r--runtime/doc/os_msdos.txt24
-rw-r--r--runtime/doc/os_win32.txt17
-rw-r--r--runtime/doc/pi_netrw.txt257
-rw-r--r--runtime/doc/repeat.txt5
-rw-r--r--runtime/doc/syntax.txt49
-rw-r--r--runtime/doc/tags29
-rw-r--r--runtime/doc/todo.txt39
-rw-r--r--runtime/doc/uganda.txt4
-rw-r--r--runtime/doc/usr_05.txt4
-rw-r--r--runtime/doc/usr_41.txt2
-rw-r--r--runtime/doc/version7.txt39
-rw-r--r--runtime/filetype.vim20
-rw-r--r--runtime/ftplugin/c.vim4
-rw-r--r--runtime/indent/lua.vim23
-rw-r--r--runtime/indent/vim.vim10
-rw-r--r--runtime/makemenu.vim10
-rw-r--r--runtime/plugin/NetrwFileHandlers.vim123
-rw-r--r--runtime/plugin/gzip.vim7
-rw-r--r--runtime/plugin/netrw.vim778
-rw-r--r--runtime/scripts.vim8
-rw-r--r--runtime/synmenu.vim164
-rw-r--r--runtime/syntax/abap.vim152
-rw-r--r--runtime/syntax/aspvbs.vim8
-rw-r--r--runtime/syntax/ch.vim4
-rw-r--r--runtime/syntax/lex.vim14
-rw-r--r--runtime/syntax/lhaskell.vim5
-rw-r--r--runtime/syntax/lua.vim18
-rw-r--r--runtime/syntax/maple.vim92
-rw-r--r--runtime/syntax/netrwlist.vim45
-rw-r--r--runtime/syntax/perl.vim17
-rw-r--r--runtime/syntax/sh.vim110
-rw-r--r--runtime/syntax/sqlinformix.vim196
-rw-r--r--runtime/syntax/synload.vim22
41 files changed, 1770 insertions, 616 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 2e3a47bd9..14605e80f 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Jul 01
+*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Aug 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -24,10 +24,10 @@ For a basic explanation, see section |40.3| in the user manual.
==============================================================================
1. Introduction *autocmd-intro*
-You can specify commands to be executed automatically for when reading or
-writing a file, when entering or leaving a buffer or window, and when exiting
-Vim. For example, you can create an autocommand to set the 'cindent' option
-for files matching *.c. You can also use autocommands to implement advanced
+You can specify commands to be executed automatically when reading or writing
+a file, when entering or leaving a buffer or window, and when exiting Vim.
+For example, you can create an autocommand to set the 'cindent' option for
+files matching *.c. You can also use autocommands to implement advanced
features, such as editing compressed files (see |gzip-example|). The usual
place to put autocommands is in your .vimrc or .exrc file.
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index 4f56dfe2f..42fa8ba4e 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1,4 +1,4 @@
-*editing.txt* For Vim version 7.0aa. Last change: 2004 Jul 04
+*editing.txt* For Vim version 7.0aa. Last change: 2004 Aug 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -29,16 +29,26 @@ Editing a file with Vim means:
*current-file*
As long as you don't write the buffer, the original file remains unchanged.
If you start editing a file (read a file into the buffer), the file name is
-remembered as the "current file name".
+remembered as the "current file name". This is also known as the name of the
+current buffer.
*alternate-file*
If there already was a current file name, then that one becomes the alternate
-file name. All file names are remembered in the file list. When you enter a
-file name, for editing (e.g., with ":e filename") or writing (e.g., with (:w
-file name"), the file name is added to the list. You can use this list to
-remember which files you edited and to quickly switch from one file to
-another with the CTRL-^ command (e.g., to copy text). First type the number
-of the file and then hit CTRL-^. {Vi: only one alternate file name}
+file name. It can later be used with "#" on the command line |:_#|. However,
+the alternate file name is not changed when |:keepalt| is used.
+
+ *:keepalt* *:keepa*
+:keepalt {cmd} Execute {cmd} while keeping the current alternate file
+ name. Note that commands invoked indirectly (e.g.,
+ with a function) may still set the alternate file
+ name. {not in Vi}
+
+All file names are remembered in the file list. When you enter a file name,
+for editing (e.g., with ":e filename") or writing (e.g., with (:w file name"),
+the file name is added to the list. You can use this list to remember which
+files you edited and to quickly switch from one file to another with the
+CTRL-^ command (e.g., to copy text). First type the number of the file and
+then hit CTRL-^. {Vi: only one alternate file name}
CTRL-G or *CTRL-G* *:f* *:fi* *:file*
:f[ile] Prints the current file name (as typed), the
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index c277ddea8..0b757f381 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.0aa. Last change: 2004 Jul 25
+*eval.txt* For Vim version 7.0aa. Last change: 2004 Aug 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2231,8 +2231,9 @@ remote_read({serverid}) *remote_read()*
<
*remote_send()* *E241*
remote_send({server}, {string} [, {idvar}])
- Send the {string} to {server}. The string is sent as
- input keys and the function returns immediately.
+ Send the {string} to {server}. The string is sent as input
+ keys and the function returns immediately. At the Vim server
+ the keys are not mapped |:map|.
If {idvar} is present, it is taken as the name of a
variable and a {serverid} for later use with
remote_read() is stored there.
@@ -2558,6 +2559,7 @@ strridx({haystack}, {needle}) *strridx()*
{haystack}. The search is done case-sensitive. For advanced
searches use |match()|.
If the {needle} does not occur in {haystack} it returns -1.
+ If the {needle} is empty the length of {haystack} is returned.
See also |stridx()|. Examples: >
:echo strridx("an angry armadillo", "an") 3
<
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 21c48d3cd..a4cc593a2 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -1,4 +1,4 @@
-*filetype.txt* For Vim version 7.0aa. Last change: 2004 Jun 24
+*filetype.txt* For Vim version 7.0aa. Last change: 2004 Aug 31
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -82,6 +82,9 @@ You can disable it again with: >
The filetype detection is not switched off then. But if you do switch off
filetype detection, the indent files will not be loaded either.
This actually loads the file "indoff.vim" in 'runtimepath'.
+This disables auto-indenting for files you will open. It will keep working in
+already opened files. Reset 'autoindent', 'cindent', 'smartindent' and/or
+'indentexpr' to disable indenting in an opened file.
*:filetype-off*
To disable file type detection, use this command: >
@@ -147,7 +150,7 @@ is used. The default value is set like this: >
This means that the contents of compressed files are not inspected.
*new-filetype*
-If a file type that you want to use is not detected yet, there are three ways
+If a file type that you want to use is not detected yet, there are four ways
to add it. In any way, it's better not to modify the $VIMRUNTIME/filetype.vim
file. It will be overwritten when installing a new version of Vim.
@@ -155,7 +158,7 @@ A. If you want to overrule all default file type checks.
This works by writing one file for each filetype. The disadvantage is that
means there can be many files. The advantage is that you can simply drop
this file in the right directory to make it work.
-
+ *ftdetect*
1. Create your user runtime directory. You would normally use the first
item of the 'runtimepath' option. Then create the directory "ftdetect"
inside it. Example for Unix: >
diff --git a/runtime/doc/if_perl.txt b/runtime/doc/if_perl.txt
index 882cd6a85..0d627daa6 100644
--- a/runtime/doc/if_perl.txt
+++ b/runtime/doc/if_perl.txt
@@ -1,4 +1,4 @@
-*if_perl.txt* For Vim version 7.0aa. Last change: 2004 May 01
+*if_perl.txt* For Vim version 7.0aa. Last change: 2004 Aug 30
VIM REFERENCE MANUAL by Sven Verdoolaege
@@ -156,6 +156,8 @@ VIM::Buffers([{bn}...]) With no arguments, returns a list of all the buffers
numbers {bn}, returns a list of the buffers matching
{bn}, using the same rules as Vim's internal
|bufname()| function.
+ WARNING: the list becomes invalid when |:bwipe| is
+ used. Using it anyway may crash Vim.
*perl-Windows*
VIM::Windows([{wn}...]) With no arguments, returns a list of all the windows
@@ -163,6 +165,8 @@ VIM::Windows([{wn}...]) With no arguments, returns a list of all the windows
in a scalar context. For a list of window numbers
{wn}, returns a list of the windows with those
numbers.
+ WARNING: the list becomes invalid when a window is
+ closed. Using it anyway may crash Vim.
*perl-DoCommand*
VIM::DoCommand({cmd}) Executes Ex command {cmd}.
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index fd94d326a..5fc7b06fb 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -1,4 +1,4 @@
-*indent.txt* For Vim version 7.0aa. Last change: 2004 Jul 07
+*indent.txt* For Vim version 7.0aa. Last change: 2004 Sep 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -519,4 +519,15 @@ In addition, you can turn the verbose mode for debug issue: >
Make sure to do ":set cmdheight=2" first to allow the display of the message.
+
+VIM *vim-indent*
+
+For indenting Vim scripts there is one variable that specifies the amount of
+indent for a continuation line, a line that starts with a backslash: >
+
+ :let g:vim_indent_cont = &sw * 3
+
+Three times shiftwidth is the default value.
+
+
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt
index 62044e5cd..4245b6348 100644
--- a/runtime/doc/message.txt
+++ b/runtime/doc/message.txt
@@ -1,4 +1,4 @@
-*message.txt* For Vim version 7.0aa. Last change: 2004 Jul 23
+*message.txt* For Vim version 7.0aa. Last change: 2004 Aug 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -412,6 +412,12 @@ abandon the buffer forcefully, e.g., with ":qa!". Careful, make sure you
don't throw away changes you really want to keep. You might have forgotten
about a buffer, especially when 'hidden' is set.
+>
+ [No write since last change]
+
+This appears when executing a shell command while at least one buffer was
+changed. To avoid the message reset the 'warn' option.
+
*E38* >
Null argument
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index f94b52a4a..376bb6b43 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.0aa. Last change: 2004 Jul 24
+*options.txt* For Vim version 7.0aa. Last change: 2004 Aug 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -188,7 +188,7 @@ the value "ab", using "set guioptions-=ba" won't work, because the string "ba"
doesn't appear.
*:set_env* *expand-env* *expand-environment-var*
-Environment variables in most string options will be expanded. If the
+Environment variables in specific string options will be expanded. If the
environment variable exists the '$' and the following environment variable
name is replaced with its value. If it does not exist the '$' and the name
are not modified. Any non-id character (not a letter, digit or '_') may
@@ -2903,6 +2903,7 @@ A jump table for the options with a short description can be found at |Q_op|.
BALTIC, CHINESEBIG5, DEFAULT, EASTEUROPE, GB2312, GREEK,
HANGEUL, HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS,
SYMBOL, THAI, TURKISH, VIETNAMESE ANSI and BALTIC.
+ Normally you would use "cDEFAULT".
Use a ':' to separate the options.
- A '_' can be used in the place of a space, so you don't need to use
@@ -5730,7 +5731,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Tags in unsorted tags files, and matches with different case will only
be found in the retry.
- If a tag file indicates that is is case-fold sorted, the second,
+ If a tag file indicates that it is case-fold sorted, the second,
linear search can be avoided for the 'ignorecase' case. Use a value
of '2' in the "!_TAG_FILE_SORTED" line for this. A tag file can be
case-fold sorted with the -f switch to "sort" in most unices, as in
diff --git a/runtime/doc/os_msdos.txt b/runtime/doc/os_msdos.txt
index 01290e9ff..3c749f0eb 100644
--- a/runtime/doc/os_msdos.txt
+++ b/runtime/doc/os_msdos.txt
@@ -1,4 +1,4 @@
-*os_msdos.txt* For Vim version 7.0aa. Last change: 2001 Sep 03
+*os_msdos.txt* For Vim version 7.0aa. Last change: 2004 Aug 31
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -207,18 +207,24 @@ in such a way that it becomes too long may give unexpected results.
8. Symbolically linked files *msdos-linked-files*
When using Vim to edit a symbolically linked file on a unix NFS file server,
-you may run into problems.
-When writing the file, Vim does not "write through" the symlink. Instead, it
-deletes the symbolic link and creates a new file in its place.
- On Unix, Vim is prepared for links (symbolic or hard). A backup copy of
-the original file is made and then the original file is overwritten. This
-assures that all properties of the file remain the same. On non-Unix systems,
-the original file is renamed and a new file is written. Only the protection
-bits are set like the original file. However, this doesn't work properly when
+you may run into problems. When writing the file, Vim does not "write
+through" the symlink. Instead, it deletes the symbolic link and creates a new
+file in its place.
+
+On Unix, Vim is prepared for links (symbolic or hard). A backup copy of the
+original file is made and then the original file is overwritten. This assures
+that all properties of the file remain the same. On non-Unix systems, the
+original file is renamed and a new file is written. Only the protection bits
+are set like the original file. However, this doesn't work properly when
working on an NFS-mounted file system where links and other things exist. The
only way to fix this in the current version is not making a backup file, by
":set nobackup nowritebackup" |'writebackup'|
+A similar problem occurs when mounting a Unix filesystem through Samba or a
+similar system. When Vim creates a new file it will get the default user ID
+for the mounted file system. This may be different from the original user ID.
+To avoid this set the 'backupcopy' option to "yes".
+
==============================================================================
9. Copy/paste in a dos box *msdos-copy-paste*
diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt
index 29d7096bf..6f9a541c2 100644
--- a/runtime/doc/os_win32.txt
+++ b/runtime/doc/os_win32.txt
@@ -1,4 +1,4 @@
-*os_win32.txt* For Vim version 7.0aa. Last change: 2004 May 01
+*os_win32.txt* For Vim version 7.0aa. Last change: 2004 Aug 31
VIM REFERENCE MANUAL by George Reilly
@@ -184,8 +184,9 @@ A. There are no good reasons to run the 16-bit DOS version on NT. The Win32
runs on top of an 80x86 emulator.
Q. How do I change the font?
-A. In the GUI version, you can use the 'guifont' option.
- In the console version, you need to set the font of the console itself.
+A. In the GUI version, you can use the 'guifont' option. Example: >
+ :set guifont=Lucida_Console:h15:cDEFAULT
+< In the console version, you need to set the font of the console itself.
You cannot do this from within Vim.
Q. When I change the size of the console window with ':set lines=xx' or
@@ -249,6 +250,16 @@ A. On Unix, Vim is prepared for links (symbolic or hard). A backup copy of
things exist. The only way to fix this in the current version is not
making a backup file, by ":set nobackup nowritebackup" |'writebackup'|
+Q. I'm using Vim to edit a file on a Unix file server through Samba. When I
+ write the file, the owner of the file is changed. Why?
+A. When writing a file Vim renames the original file, this is a backup (in
+ case writing the file fails halfway). Then the file is written as a new
+ file. Samba then gives it the default owner for the file system, which may
+ differ from the original owner.
+ To avoid this set the 'backupcopy' option to "yes". Vim will then make a
+ copy of the file for the backup, and overwrite the original file. The
+ owner isn't changed then.
+
Q. How do I get to see the output of ":make" while it's running?
A. Basically what you need is to put a tee program that will copy its input
(the output from make) to both stdout and to the errorfile. You can find a
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index 005072f99..068d42bbc 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -1,4 +1,4 @@
-*pi_netrw.txt For Vim version 6.2. Last change: Jul 26, 2004
+*pi_netrw.txt For Vim version 6.2. Last change: Jul 30, 2004
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
@@ -16,7 +16,7 @@
4. Transparent File Transfer...........................|netrw-transparent|
5. Ex Commands.........................................|netrw-ex|
6. Variables and Options...............................|netrw-var|
-7. Remote Directory Browser............................|netrw-browse|
+7. Directory Browser...................................|netrw-browse|
8. Debugging...........................................|netrw-debug|
9. History.............................................|netrw-history|
10. Credits.............................................|netrw-credits|
@@ -62,31 +62,31 @@ in your <.vimrc> file: >
scp: g:netrw_scp_cmd = "scp -q"
sftp: g:netrw_sftp_cmd = "sftp"
- READING
+ READING *netrw-read* *netrw-nread*
:Nread ? give help
- :Nread "machine:file" uses rcp
- :Nread "machine file" uses ftp with <.netrc>
- :Nread "machine id password file" uses ftp
- :Nread "dav://machine[:port]/file" uses cadaver
- :Nread "fetch://[user@]machine/file" uses fetch
- :Nread "ftp://[user@]machine[[:#]port]/file" uses ftp autodetects <.netrc>
- :Nread "http://[user@]machine/file" uses http uses wget
- :Nread "rcp://[user@]machine/file" uses rcp
- :Nread "rsync://[user@]machine[:port]/file" uses rsync
- :Nread "scp://[user@]machine[[:#]port]/file" uses scp
- :Nread "sftp://[user@]machine/file" uses sftp
-
- WRITING
+ :Nread "machine:path" uses rcp
+ :Nread "machine path" uses ftp with <.netrc>
+ :Nread "machine id password path" uses ftp
+ :Nread "dav://machine[:port]/path" uses cadaver
+ :Nread "fetch://[user@]machine/path" uses fetch
+ :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp autodetects <.netrc>
+ :Nread "http://[user@]machine/path" uses http uses wget
+ :Nread "rcp://[user@]machine/path" uses rcp
+ :Nread "rsync://[user@]machine[:port]/path" uses rsync
+ :Nread "scp://[user@]machine[[:#]port]/path" uses scp
+ :Nread "sftp://[user@]machine/path" uses sftp
+
+ WRITING *netrw-write* *netrw-nwrite*
:Nwrite ? give help
- :Nwrite "machine:file" uses rcp
- :Nwrite "machine file" uses ftp with <.netrc>
- :Nwrite "machine id password file" uses ftp
- :Nwrite "dav://machine[:port]/file" uses cadaver
- :Nwrite "ftp://[user@]machine[[:#]port]/file" uses ftp autodetects <.netrc>
- :Nwrite "rcp://[user@]machine/file" uses rcp
- :Nwrite "rsync://[user@]machine[:port]/file" uses rsync
- :Nwrite "scp://[user@]machine[[:#]port]/file" uses scp
- :Nwrite "sftp://[user@]machine/file" uses sftp
+ :Nwrite "machine:path" uses rcp
+ :Nwrite "machine path" uses ftp with <.netrc>
+ :Nwrite "machine id password path" uses ftp
+ :Nwrite "dav://machine[:port]/path" uses cadaver
+ :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp autodetects <.netrc>
+ :Nwrite "rcp://[user@]machine/path" uses rcp
+ :Nwrite "rsync://[user@]machine[:port]/path" uses rsync
+ :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp
+ :Nwrite "sftp://[user@]machine/path" uses sftp
http: not supported!
DIRECTORY LISTING
@@ -103,7 +103,7 @@ in your <.vimrc> file: >
:call NetUserPass("uid") -- prompts for password
:call NetUserPass("uid","password") -- sets global uid and password
- VARIABLES
+ VARIABLES *netrw-variables*
b:netrw_lastfile last file Network-read/written retained on
a per-buffer basis (supports plain :Nw )
s:netrw_line during Nw/NetWrite, holds current line number
@@ -126,6 +126,21 @@ in your <.vimrc> file: >
g:netrw_use_nt_rcp=0 don't use the rcp of WinNT, Win2000 and WinXP (default)
=1 use the rcp of WinNT,... in binary mode
+ PATHS *netrw-path*
+
+ Paths to files are generally user-directory relative for most protocols.
+ It is possible that some protocol will make paths relative to some
+ associated directory, however.
+
+ example: vim scp://user@host/somefile
+ example: vim scp://user@host/subdir1/subdir2/somefile
+
+ where "somefile" is the "user"'s home directory. If you wish to get a
+ file using root-relative paths, use the full path:
+
+ example: vim scp://user@host//somefile
+ example: vim scp://user@host//subdir1/subdir2/somefile
+
==============================================================================
2. Network-Oriented File Transfer *netrw-xfer*
@@ -499,21 +514,26 @@ from <netrw.vim> itself:
>
==============================================================================
-7. Remote Directory Browser *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
+7. Directory Browser *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
?..........Help....................................|netrw-help|
<cr>.......Browsing................................|netrw-cr|
- <c-l>......Refreshing the Listing..................|netrw-c-l|
<del>......Deleting Files or Directories...........|netrw-delete|
-..........Going Up................................|netrw--|
a..........Hiding Files or Directories.............|netrw-a|
+ b..........Bookmarking a Directory.................|netrw-b|
+ B..........Changing to a Bookmarked Directory......|netrw-B|
+ c..........Make Browsing Directory The Current Dir.|netrw-c|
+ d..........Make A New Directory....................|netrw-d|
D..........Deleting Files or Directories...........|netrw-D|
- \h.........Edit File/Directory Hiding List.........|netrw-h|
+ <c-h>......Edit File/Directory Hiding List.........|netrw-h|
i..........Long Listing............................|netrw-i|
- \m.........Make A New Directory....................|netrw-m|
+ <c-l>......Refreshing the Listing..................|netrw-ctrl-l|
o..........Browsing with a Horizontal Split........|netrw-o|
+ q..........Listing Bookmarks.......................|netrw-q|
r..........Reversing Sorting Order.................|netrw-r|
R..........Renaming Files or Directories...........|netrw-R|
s..........Selecting Sorting Style.................|netrw-s|
+ S..........Editing the Sorting Sequence............|netrw-S|
v..........Browsing with a Vertical Split..........|netrw-v|
x..........Customizing Browsing....................|netrw-x|
@@ -525,14 +545,15 @@ QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds*
? Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file
<del> Netrw will attempt to remove the file/directory
- <c-l> Causes Netrw to refresh the directory listing
+ d Make a directory
D Netrw will attempt to remove the file(s)/directory(ies)
R Netrw will attempt to rename the file(s)/directory(ies)
- Makes Netrw go up one directory
a Show all of a directory (temporarily ignore g:netrw_list_hide)
- \h Edit file hiding list
+ c Make current browsing directory the current directory
+ <c-h> Edit file hiding list
i Toggles between long and short listing
- \m Make a directory
+ <c-l> Causes Netrw to refresh the directory listing
o Enter the file/directory under the cursor in a new browser
window. A horizontal split is used.
r Reverse sorting order
@@ -543,49 +564,63 @@ QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds*
<
NETRW BROWSER VARIABLES *netrw-browse-var*
>
- --- -----------
- Var Explanation
- --- -----------
- g:netrw_list_cmd supports listing
- g:netrw_list_hide comma separated list of patterns for
- hiding files
- g:netrw_local_mkdir specify command for making a directory locally
- g:netrw_local_rmdir remove directory command default: rmdir
- g:netrw_local_rename rename file/directory command
- unix-default: rm win32-default: ren
- g:netrw_mkdir_cmd specify command for making a directory remotely
- g:netrw_rm_cmd supports removing files
- g:netrw_rmdir_cmd supports removing directories
- g:netrw_rmf_cmd supports removing softlinks to directories
- g:netrw_hide if true, the hiding list is used
- g:netrw_sort_by sort by "name", "time", or "size"
- g:netrw_sort_direction sorting direction: "normal" or "reverse"
- g:netrw_sort_sequence when sorting by name, first sort by the
- comma-separated pattern sequence
- g:netrw_timefmt specify format string to strftime() default: %c
- g:netrw_winsize specify initial size of new o/v windows
+ --- -----------
+ Var Explanation
+ --- -----------
+ g:netrw_ftp_browse_reject ftp can produce a number of errors
+ and warnings that can show up as
+ "directories" and "files" in the
+ listing. This pattern is used to
+ remove such embedded messages.
+ g:netrw_keepdir keep current directory immune from the
+ browsing directory. The browsing
+ directory is contained in b:netrw_curdir
+ g:netrw_list_cmd command for listing remote directories
+ g:netrw_list_hide comma separated list of patterns for
+ hiding files
+ g:netrw_local_mkdir command for making a local directory
+ g:netrw_local_rmdir remove directory command (rmdir)
+ g:netrw_local_rename rename file/directory command
+ unix-default: rm win32-default: ren
+ g:netrw_mkdir_cmd command for making a remote directory
+ g:netrw_rm_cmd command for removing files
+ g:netrw_rmdir_cmd command for removing directories
+ g:netrw_rmf_cmd command for removing softlinks
+ g:netrw_hide if true, the hiding list is used
+ g:netrw_sort_by sort by "name", "time", or "size"
+ g:netrw_sort_direction sorting direction: "normal" or "reverse"
+ g:netrw_sort_sequence when sorting by name, first sort by the
+ comma-separated pattern sequence
+ g:netrw_timefmt specify format string to strftime() (%c)
+ g:netrw_winsize specify initial size of new o/v windows
<
-INTRODUCTION TO REMOTE DIRECTORY BROWSING
+INTRODUCTION TO DIRECTORY BROWSING
+
+Netrw supports the browsing of directories on the local system and on remote
+hosts, including generating listing directories, entering directories, editing
+files therein, deleting files/directories, making new directories, and moving
+(renaming) files and directories. The Netrw browser generally implements the
+previous explorer maps and commands for remote directories, although details
+(such as pertinent global variable names) necessarily differ.
-Netrw supports the browsing of directories on remote hosts, including
-generating listing directories, entering directories, editing files therein,
-deleting files/directories, and moving (renaming) files and directories. The
-Netrw browser generally implements the file explorer methods but for remote
-directories, although details (such as pertinent global variable names)
-necessarily differ.
+The Netrw remote file and directory browser handles two protocols: ssh and
+ftp. The protocol in the url, if it is ftp, will cause netrw to use ftp
+in its remote browsing. Any other protocol will be used for file transfers,
+but otherwise the ssh protocol will be used to do remote directory browsing.
To enter the netrw directory browser, simply attempt to read a "file" with a
trailing slash and it will be interpreted as a request to list a directory:
vim [protocol]://[user@]hostname/path/
-To get no-password directory listings, scp, ssh interaction, etc, see
-|netrw-list-hack|.
+If you'd like to avoid entering the password in for directory listings, scp,
+ssh interaction, etc, see |netrw-list-hack|.
-REFRESHING THE LISTING *netrw-c-l*
+REFRESHING THE LISTING *netrw-ctrl-l*
-To refresh the directory listing, press ctrl-l (<c-l>) or hit the <cr>
-when atop the ./ directory entry in the listing.
+To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
+hit the <cr> when atop the ./ directory entry in the listing. One may also
+refresh a local directory by using ":e .".
GOING UP *netrw--*
@@ -598,10 +633,10 @@ listing operation. By default the command is:
ssh HOSTNAME ls -FLa
-where the HOSTNAME becomes the [user@]hostname as requested by the attempt
-to read. Naturally, the user may override this command with whatever is
-preferred. The NetList function which implements remote directory
-browsing expects that directories will be flagged by a trailing slash.
+where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
+read. Naturally, the user may override this command with whatever is
+preferred. The NetList function which implements remote directory browsing
+expects that directories will be flagged by a trailing slash.
BROWSING *netrw-cr*
@@ -619,11 +654,9 @@ directories or displays the filename, file size (in bytes), and the
time and date of last modification for local directories.
-MAKING A NEW DIRECTORY *netrw-m*
+MAKING A NEW DIRECTORY *netrw-d*
-Actually <Leader>m, where the <Leader> is, by default, the backslash.
-
-With the "<Leader>m" map one may make a new directory either remotely (which
+With the "d" map one may make a new directory either remotely (which
depends on the global variable g:netrw_mkdir_cmd) or locally (which depends on
the global variable g:netrw_local_mkdir). Netrw will issue a request for the
new directory's name. A bare <CR> at that point will abort the making of the
@@ -675,6 +708,7 @@ value is:
One may rename a block of files and directories by selecting them with
the V (|linewise-visual|).
+
HIDING FILES OR DIRECTORIES *g:netrw-a* *g:netrw_list_hide*
The "a" map toggles the netrw vim file browser (both remote and local) between
@@ -685,9 +719,7 @@ patterns (ex. \.obj) to be hidden from normal listing. (see |netrw-h|)
EDIT FILE OR DIRECTORY HIDING LIST *netrw-h*
-Actually <Leader>h, where the <Leader> is, by default, the backslash.
-
-The "<Leader>h" map brings up a requestor allowing the user to change the
+The "<ctrl-h>" map brings up a requestor allowing the user to change the
file/directory hiding list. The hiding list consists of one or more patterns
delimited by commas. Files and/or directories satisfying these patterns will
be hidden (ie. not shown).
@@ -707,6 +739,21 @@ One may select the sorting style by name, time, or (file) size. The
listing will automatically be refreshed to reflect the selected style.
+EDITING THE SORTING SEQUENCE *netrw-S*
+
+When "Sorted by" is name, one may specify priority via the sorting
+sequence (g:netrw_sort_sequence). The sorting sequence typically
+prioritizes the name-listing by suffix, although any pattern will do.
+Patterns are delimited by commas. The default sorting sequence is:
+>
+ /$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$
+<
+The lone * is where all filenames not covered by one of the other
+patterns will end up. One may change the sorting sequence by modifying
+the g:netrw_sort_sequence variable (either manually or in your <.vimrc>)
+or by using the "S" map.
+
+
REVERSING SORTING ORDER *netrw-r*
One may toggle between normal and reverse sorting order by pressing the
@@ -738,6 +785,38 @@ See the <plugin/NetrwFileHandlers.vim> for an example of how to handle an html
file with mozilla.
+MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c*
+
+By default, g:netrw_keepdir is 0. This setting means that the current
+directory will track the browsing directory. However, setting g:netrw_keepdir
+to 1 (say, in your <.vimrc>) will keep the current directory independent
+of the browsing directory. In that case, in order to make the two
+directories the same, use the "c" map (just type c).
+
+
+BOOKMARKING A DIRECTORY *netrw-b*
+
+One may easily "bookmark" a directory by using
+
+ {cnt}b
+
+Any count may be used.
+
+
+CHANGING TO A BOOKMARKED DIRECTORY *netrw-B*
+
+To change directory back to a bookmarked directory, use
+
+ {cnt}B
+
+Any count may be used.
+
+
+LISTING BOOKMARKS *netrw-q*
+
+Pressing "q" will list the bookmarked directories. (query)
+
+
IMPROVING DIRECTORY BROWSING *netrw-list-hack*
Especially with the remote directory browser, constantly entering the password
@@ -767,15 +846,31 @@ which is loaded automatically at startup (assuming :set nocp).
or
http://vim.sourceforge.net/scripts/script.php?script_id=120
- and put it into your local plugin directory
+ and put it into your local plugin directory.
+
+ 2. <Decho.vim> itself needs the <cecutil.vim> script, so you'll need
+ to put it into your .vim/plugin, too. You may obtain it from:
+
+ http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs
+ as "DrC's Utilities"
- 2. Edit the <netrw.vim> file as follows:
+ 3. Edit the <netrw.vim> file by typing:
+ vim netrw.vim
:DechoOn
+ :wq
+
+ To restore to normal non-debugging behavior, edit <netrw.vim>
+ by typing
+
+ vim netrw.vim
+ :DechoOff
+ :wq
- (to restore to normal, use :DechoOff )
+ This command, provided by <Decho.vim>, will comment out all
+ Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
- 3. Then bring up vim and attempt a transfer. A set of messages
+ 4. Then bring up vim and attempt a transfer. A set of messages
should appear concerning the steps that <netrw.vim> took in
attempting to read/write your file over the network. Please
send that information to <netrw.vim>'s maintainer,
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt
index faf31168b..7ef1cf950 100644
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -1,4 +1,4 @@
-*repeat.txt* For Vim version 7.0aa. Last change: 2004 Jun 22
+*repeat.txt* For Vim version 7.0aa. Last change: 2004 Jul 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -20,7 +20,8 @@ Chapter 26 of the user manual introduces repeating |usr_26.txt|.
*.*
. Repeat last change, with count replaced with [count].
Also repeat a yank command, when the 'y' flag is
- included in 'cpoptions'.
+ included in 'cpoptions'. Does not repeat a
+ command-line command.
Simple changes can be repeated with the "." command. Without a count, the
count of the last change is used. If you enter a count, it will replace the
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index d31122b91..28de79adc 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.0aa. Last change: 2004 Jul 15
+*syntax.txt* For Vim version 7.0aa. Last change: 2004 Sep 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -664,13 +664,21 @@ an the "after" directory in 'runtimepath'. For Unix this would be
syn sync fromstart
set foldmethod=syntax
+CH *ch.vim* *ch-syntax*
+
+C/C++ interpreter. Ch has similar syntax highlighting to C and builds upon
+the C syntax file. See |c.vim| for all the settings that are available for C.
+
+By setting a variable you can tell Vim to use Ch syntax for *.h files, instead
+of C or C++: >
+ :let ch_syntax_for_h = 1
+
CHILL *chill.vim* *chill-syntax*
Chill syntax highlighting is similar to C. See |c.vim| for all the settings
that are available. Additionally there is:
-chill_syntax_for_h use Ch syntax for *.h files, instead of C or C++
chill_space_errors like c_space_errors
chill_comment_string like c_comment_strings
chill_minlines like c_minlines
@@ -1776,14 +1784,22 @@ If you use POD files or POD segments, you might: >
:let perl_include_pod = 1
-To handle package references in variable and function names differently from
-the rest of the name (like 'PkgName::' in '$PkgName::VarName'): >
+The reduce the complexity of parsing (and increase performance) you can switch
+off two elements in the parsing of variable names and contents. >
+
+To handle package references in variable and function names not differently
+from the rest of the name (like 'PkgName::' in '$PkgName::VarName'): >
+
+ :let perl_no_scope_in_variables = 1
+
+(In Vim 6.x it was the other way around: "perl_want_scope_in_variables"
+enabled it.)
- :let perl_want_scope_in_variables = 1
+If you do not want complex things like '@{${"foo"}}' to be parsed: >
-If you want complex things like '@{${"foo"}}' to be parsed: >
+ :let perl_no_extended_vars = 1
- :let perl_extended_vars = 1
+{In Vim 6.x it was the other way around: "perl_extended_vars" enabled it.)
The coloring strings can be changed. By default strings and qq friends will be
highlighted like the first line. If you set the variable
@@ -1813,7 +1829,11 @@ its attempts in syntax highlighting. >
If you want to use folding with perl, set perl_fold: >
- :let perl_fold = 1
+ :let perl_fold = 1
+
+If you want to fold blocks in if statements, etc. as well set the following: >
+
+ :let perl_fold_blocks = 1
PHP3 and PHP4 *php.vim* *php3.vim* *php-syntax* *php3-syntax*
@@ -2264,6 +2284,17 @@ fast enough, you can increase minlines and/or maxlines near the end of
the syntax file.
+SQL *sql.vim* *sql-syntax*
+ *sqlinformix.vim* *sqlinformix-syntax*
+
+While there is an ANSI standard for SQL, most database engines add their
+own custom extensions. Vim currently supports the Oracle and Informix
+dialects of SQL. Vim assumes "*.sql" files are Oracle SQL by default.
+
+If you want to use the Informix dialect, put this in your startup vimrc: >
+ :let g:filetype_sql = "sqlinformix"
+
+
TCSH *tcsh.vim* *tcsh-syntax*
This covers the shell named "tcsh". It is a superset of csh. See |csh.vim|
@@ -3514,6 +3545,8 @@ in their own color.
":colorscheme" in a color scheme script.
After the color scheme has been loaded the
|ColorScheme| autocommand event is triggered.
+ For info about writing a colorscheme file: >
+ :edit $VIMRUNTIME/colors/README.txt
:hi[ghlight] List all the current highlight groups that have
attributes set.
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 98a40e6cb..e63526511 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -1994,6 +1994,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:jumps motion.txt /*:jumps*
:k motion.txt /*:k*
:kee motion.txt /*:kee*
+:keepa editing.txt /*:keepa*
+:keepalt editing.txt /*:keepalt*
:keepj motion.txt /*:keepj*
:keepjumps motion.txt /*:keepjumps*
:keepmarks motion.txt /*:keepmarks*
@@ -4143,6 +4145,8 @@ catch-interrupt eval.txt /*catch-interrupt*
catch-order eval.txt /*catch-order*
catch-text eval.txt /*catch-text*
cc change.txt /*cc*
+ch-syntax syntax.txt /*ch-syntax*
+ch.vim syntax.txt /*ch.vim*
change-list-jumps motion.txt /*change-list-jumps*
change.txt change.txt /*change.txt*
changed-5.1 version5.txt /*changed-5.1*
@@ -4689,6 +4693,7 @@ fortran-syntax syntax.txt /*fortran-syntax*
fortran.vim syntax.txt /*fortran.vim*
french-maillist intro.txt /*french-maillist*
frombook usr_01.txt /*frombook*
+ftdetect filetype.txt /*ftdetect*
ftp pi_netrw.txt /*ftp*
ftplugin usr_41.txt /*ftplugin*
ftplugin-docs filetype.txt /*ftplugin-docs*
@@ -4730,7 +4735,7 @@ g:explSuffixesLast pi_expl.txt /*g:explSuffixesLast*
g:explUseSeparators pi_expl.txt /*g:explUseSeparators*
g:explVertical pi_expl.txt /*g:explVertical*
g:explWinSize pi_expl.txt /*g:explWinSize*
-g:netrw_a pi_netrw.txt /*g:netrw_a*
+g:netrw-a pi_netrw.txt /*g:netrw-a*
g:netrw_list_cmd pi_netrw.txt /*g:netrw_list_cmd*
g:netrw_list_hide pi_netrw.txt /*g:netrw_list_hide*
g:netrw_rm_cmd pi_netrw.txt /*g:netrw_rm_cmd*
@@ -5434,19 +5439,22 @@ netbeans-support netbeans.txt /*netbeans-support*
netbeans.txt netbeans.txt /*netbeans.txt*
netrw pi_netrw.txt /*netrw*
netrw-- pi_netrw.txt /*netrw--*
+netrw-B pi_netrw.txt /*netrw-B*
netrw-D pi_netrw.txt /*netrw-D*
-netrw-H pi_netrw.txt /*netrw-H*
-netrw-M pi_netrw.txt /*netrw-M*
netrw-R pi_netrw.txt /*netrw-R*
+netrw-S pi_netrw.txt /*netrw-S*
netrw-activate pi_netrw.txt /*netrw-activate*
+netrw-b pi_netrw.txt /*netrw-b*
netrw-browse pi_netrw.txt /*netrw-browse*
netrw-browse-cmds pi_netrw.txt /*netrw-browse-cmds*
netrw-browse-var pi_netrw.txt /*netrw-browse-var*
-netrw-c-l pi_netrw.txt /*netrw-c-l*
+netrw-c pi_netrw.txt /*netrw-c*
netrw-cadaver pi_netrw.txt /*netrw-cadaver*
netrw-contents pi_netrw.txt /*netrw-contents*
netrw-cr pi_netrw.txt /*netrw-cr*
netrw-credits pi_netrw.txt /*netrw-credits*
+netrw-ctrl-l pi_netrw.txt /*netrw-ctrl-l*
+netrw-d pi_netrw.txt /*netrw-d*
netrw-debug pi_netrw.txt /*netrw-debug*
netrw-delete pi_netrw.txt /*netrw-delete*
netrw-dir pi_netrw.txt /*netrw-dir*
@@ -5454,6 +5462,7 @@ netrw-ex pi_netrw.txt /*netrw-ex*
netrw-file pi_netrw.txt /*netrw-file*
netrw-fixup pi_netrw.txt /*netrw-fixup*
netrw-ftp pi_netrw.txt /*netrw-ftp*
+netrw-h pi_netrw.txt /*netrw-h*
netrw-help pi_netrw.txt /*netrw-help*
netrw-history pi_netrw.txt /*netrw-history*
netrw-i pi_netrw.txt /*netrw-i*
@@ -5461,13 +5470,17 @@ netrw-list pi_netrw.txt /*netrw-list*
netrw-list-hack pi_netrw.txt /*netrw-list-hack*
netrw-move pi_netrw.txt /*netrw-move*
netrw-netrc pi_netrw.txt /*netrw-netrc*
+netrw-nread pi_netrw.txt /*netrw-nread*
+netrw-nwrite pi_netrw.txt /*netrw-nwrite*
netrw-o pi_netrw.txt /*netrw-o*
netrw-options pi_netrw.txt /*netrw-options*
netrw-passwd pi_netrw.txt /*netrw-passwd*
+netrw-path pi_netrw.txt /*netrw-path*
netrw-protocol pi_netrw.txt /*netrw-protocol*
+netrw-q pi_netrw.txt /*netrw-q*
netrw-r pi_netrw.txt /*netrw-r*
+netrw-read pi_netrw.txt /*netrw-read*
netrw-ref pi_netrw.txt /*netrw-ref*
-netrw-remove pi_netrw.txt /*netrw-remove*
netrw-rename pi_netrw.txt /*netrw-rename*
netrw-s pi_netrw.txt /*netrw-s*
netrw-transparent pi_netrw.txt /*netrw-transparent*
@@ -5475,6 +5488,8 @@ netrw-uidpass pi_netrw.txt /*netrw-uidpass*
netrw-urls pi_netrw.txt /*netrw-urls*
netrw-v pi_netrw.txt /*netrw-v*
netrw-var pi_netrw.txt /*netrw-var*
+netrw-variables pi_netrw.txt /*netrw-variables*
+netrw-write pi_netrw.txt /*netrw-write*
netrw-x pi_netrw.txt /*netrw-x*
netrw-xfer pi_netrw.txt /*netrw-xfer*
netrw.vim pi_netrw.txt /*netrw.vim*
@@ -5966,6 +5981,10 @@ sponsor.txt sponsor.txt /*sponsor.txt*
spoon os_unix.txt /*spoon*
spup-syntax syntax.txt /*spup-syntax*
spup.vim syntax.txt /*spup.vim*
+sql-syntax syntax.txt /*sql-syntax*
+sql.vim syntax.txt /*sql.vim*
+sqlinformix-syntax syntax.txt /*sqlinformix-syntax*
+sqlinformix.vim syntax.txt /*sqlinformix.vim*
sscanf eval.txt /*sscanf*
standard-plugin usr_05.txt /*standard-plugin*
standard-plugin-list help.txt /*standard-plugin-list*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 1313e4585..b72c62c7a 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2004 Jul 28
+*todo.txt* For Vim version 7.0aa. Last change: 2004 Aug 31
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,6 +30,17 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
+Multi-byte char in file name causes trouble for opening, "send to" menu and
+writing. Patches from Taro Muraoka:
+ ~/Mail/oldmail/muraoka/in.00575
+ ~/Mail/oldmail/muraoka/in.00577
+
+Is there a limit on the buffer list in the viminfo file?
+":n ~/.trashcan/bogus*" fills it.
+
+When gvim is started from the context menu the xxd menu entries don't work
+(Valencia). xxd.exe is not in $VIMRUNTIME.
+
Aborting at the ATTENTION prompt causes trouble:
buffer remains active, nwindows isn't closed (fixed in buffer.c)
alternate buffer gets "read error" flag.
@@ -44,6 +55,12 @@ Added ga_append() here: (also to 6.3?)
gui_do_findrepl(flags, find_text, repl_text, down)
serverGetVimNames(dpy) if_xcmdsrv.c, os_mswin.c
+Win32: When the path to a file has Russian characters, ":cd %:p:h" doesn't
+work. (Valery Kondakoff)
+
+Win32: When an argument is typed in a console in the active codepage, and
+'encoding' is "utf-8", detect this from illegal characters. Convert from
+console or active codepage to utf-8 then.
For version 7.0:
- Include many PATCHES:
@@ -81,6 +98,8 @@ For version 7.0:
Patch from Yakov Lerner, including test (2004 Jan 7).
VimResized - When the Vim window has been resized (SIGWINCH)
patch from Yakov Lerner, 2003 July 24.
+ Patch for specifying an expression for numbered lists. (Hugo Haas,
+ 2004 Aug 7)
--- awaiting updated patch ---
7 Add patch from Wall for this one ( ~/Mail/oldmail/wall/in.00019 ):
'flipcase' variable: upper/lowercase pairs.
@@ -230,7 +249,8 @@ For version 7.0:
- STICKY CURSOR: Add a way of scrolling that leaves the cursor where it is.
Especially when using the scrollbar. Typing a cursor-movement command
scrolls back to where the cursor is.
-8 Support four composing characters, needed for Hebrew. (Ron Aaron)
+8 Support four composing/combining characters, needed for Hebrew. (Ron Aaron)
+ Add the 'maxcombining' option to set the nr. of composing characters.
- Add a few more things to 'diffopt': "horizontal", "vertical",
"foldcolumn". (Benji Fisher, 2004 Jun 21)
- FileChangedShellPost autocommand event: after (not) reloading a changed
@@ -256,6 +276,14 @@ For version 7.0:
the part that already matched is doubled then. Remove the part of the
word that would be doubled. Make it work line CTRL-N in Insert mode.
- Add Lua interface? (Wolfgang Oertl)
+- "onemore" flag in 'virtualedit': move cursor past end of line. Patch by
+ Mattias Flodin (2004 Jul 30)
+
+Support ":set syntax=cpp.doxygen"? Suggested patch by Michael Geddes (9 Aug
+2004). Should also work for 'filetype'.
+
+Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav
+Smilauer, 2004 Aug 17)
Vi incompatibility:
@@ -365,6 +393,9 @@ Win32 GUI known bugs:
"lucida_console:h8").
6 Win32 GUI: With "-u NONE -U NONE" and doing "CTRL-W v" "CTRL-W o", the ":"
of ":only" is highlighted like the cursor. (Lipelis)
+8 When 'encoding' is "utf-8", should use 'guifont' for both normal and wide
+ characters to make Asian languages work. Win32 fonts contain both
+ type of characters.
7 When font smoothing is enabled, redrawing can become very slow. The reason
appears to be drawing with a transparent background. Would it be possible
to use an opaque background in most places?
@@ -1081,6 +1112,8 @@ Problems that will (probably) not be solved:
*extensions-improvements*
Documentation:
+8 List of options should mention whether environment variables are expanded
+ or not.
8 Extend usr_27.txt a bit. (Adam Seyfarth)
7 Add a section on debugging scripts in the user manual.
9 Make the Reference Manual more precise. For each command mention:
@@ -2973,6 +3006,8 @@ Various improvements:
the buffer. Buffer may be modified.
6 In the quickfix window statusline add the command used to get the list of
errors, e.g. ":make foo", ":grep something *.c".
+7 Add a ":cstring" command. Works like ":cfile" but reads from a string
+ variable. Also accept a list variable?
6 Python interface: add vim.message() function. (Michal Vitecek, 2002 Nov 5)
7 Support using ":vert" with User commands. Add expandable items <vert>.
Do the same for ":browse" and ":confirm"?
diff --git a/runtime/doc/uganda.txt b/runtime/doc/uganda.txt
index ebdf7c7c0..b8139a3cb 100644
--- a/runtime/doc/uganda.txt
+++ b/runtime/doc/uganda.txt
@@ -1,4 +1,4 @@
-*uganda.txt* For Vim version 7.0aa. Last change: 2004 May 12
+*uganda.txt* For Vim version 7.0aa. Last change: 2004 Aug 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -214,7 +214,7 @@ Check the ICCF web site for the latest information! See |iccf| for the URL.
USA and Canada: Contact Kibaale Children's Fund (KCF) in Surrey, Canada. They
take care of the Canadian sponsors for the children in
Kibaale. You can send them a one time donation directly.
- Please send me a note so that know what has been donated
+ Please send me a note so that I know what has been donated
because of Vim. Ask KCF for information about sponsorship.
Kibaale Children's Fund c/o Pacific Academy
10238-168 Street
diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt
index 47396ccf4..42346f22f 100644
--- a/runtime/doc/usr_05.txt
+++ b/runtime/doc/usr_05.txt
@@ -1,4 +1,4 @@
-*usr_05.txt* For Vim version 7.0aa. Last change: 2004 Jun 24
+*usr_05.txt* For Vim version 7.0aa. Last change: 2004 Aug 27
VIM USER MANUAL - by Bram Moolenaar
@@ -427,6 +427,8 @@ you already have the directory.) >
:!mkdir ~/.vim/plugin
:!cp $VIMRUNTIME/macros/matchit.vim ~/.vim/plugin
+The "cp" command is for Unix, on MS-DOS you can use "copy".
+
Now create a "doc" directory in one of the directories in 'runtimepath'. >
:!mkdir ~/.vim/doc
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index e0ea026df..97c39d9a0 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1,4 +1,4 @@
-*usr_41.txt* For Vim version 7.0aa. Last change: 2004 May 06
+*usr_41.txt* For Vim version 7.0aa. Last change: 2004 Aug 28
VIM USER MANUAL - by Bram Moolenaar
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index 0de7925a3..4260877c5 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.0aa. Last change: 2004 Jul 27
+*version7.txt* For Vim version 7.0aa. Last change: 2004 Sep 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -120,6 +120,8 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|:diffoff| Switch off diff mode in the current window or in all
windows.
+|:keepalt| Do not change the alternate file.
+
New functions: ~
@@ -148,6 +150,10 @@ New Syntax/Indent/FTplugin files: ~
MuPAD source syntax, indent and ftplugin. (Dave Silvia)
+ABAB/4 syntax file. (Marius van Wyk)
+
+SQL-Informix syntax file. (Dean L Hill)
+
Others: ~
@@ -195,6 +201,20 @@ Lakshmanan)
Added 'n' flag to search(): don't move the cursor. (Nikolai Weibull)
+When uncompressing fails in the gzip plugin, give an error message but don't
+delete the raw text. Helps if the file has a .gz extension but is not
+actually compressed. (Andrew Pimlott)
+
+When C, C++ or IDL syntax is used, may additionally load doxygen syntax.
+Also support setting the filetype to "cdoxygen" for C plus doxygen syntax.
+(Michael Geddes)
+
+The ":registers" command now displays multi-byte characters properly.
+
+VMS: In the usage message mention that a slash can be used to make a flag
+upper case. Add color support to the builtin vt320 terminal codes.
+(Zoltan Arpadffy)
+
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
@@ -293,4 +313,21 @@ When using the ":saveas f2" command for buffer "f1", the Buffers menu would
contain "f2" twice, one of them leading to "f1". Also trigger the BufFilePre
and BufFilePost events for the alternate buffer that gets the old name.
+strridx() did not work well when the needle is empty. (Ciaran McCreesh)
+
+GTK: Avoid a potential hang in gui_mch_wait_for_chars() when input arrives
+just before it is invoked
+
+VMS: Occasionally CR characters were inserted in the file. Expansion of
+environment variables was not correct. (Zoltan Arpadffy)
+
+UTF-8: When 'delcombine' is set "dw" only deleted the last combining character
+from the first character of the word.
+
+When using ":sball" in an autocommand only the filetype in one buffer was
+detected. Reset did_filetype in enter_buffer().
+
+When using ":argdo" and the window already was at the first argument index,
+but not actually editing it, the current buffer would be used instead.
+
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 19669fbf4..ed856da11 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2004 Jul 06
+" Last Change: 2004 Aug 30
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -63,6 +63,9 @@ endfun
" A-A-P recipe
au BufNewFile,BufRead *.aap setf aap
+" ABAB/4
+au BufNewFile,BufRead *.abap setf abap
+
" ABC music notation
au BufNewFile,BufRead *.abc setf abc
@@ -1426,8 +1429,19 @@ au BufNewFile,BufRead *.spy,*.spi setf spyce
" Squid
au BufNewFile,BufRead squid.conf setf squid
-" SQL (all but the first one for Oracle Designer)
-au BufNewFile,BufRead *.sql,*.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql
+" SQL for Oracle Designer
+au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql
+
+" SQL
+au BufNewFile,BufRead *.sql call SetFileTypeSQL()
+
+fun! SetFileTypeSQL()
+ if exists("g:filetype_sql")
+ exe "setf " . g:filetype_sql
+ else
+ setf sql
+ endif
+endfun
" SQLJ
au BufNewFile,BufRead *.sqlj setf sqlj
diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim
index 3d507581f..cf6686c72 100644
--- a/runtime/ftplugin/c.vim
+++ b/runtime/ftplugin/c.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2004 May 16
+" Last Change: 2004 Sep 01
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -37,7 +37,7 @@ if has("gui_win32") && !exists("b:browsefilter")
\ "C Header Files (*.h)\t*.h\n" .
\ "C Source Files (*.c)\t*.c\n" .
\ "All Files (*.*)\t*.*\n"
- elseif &ft == "chscript"
+ elseif &ft == "ch"
let b:browsefilter = "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" .
\ "C Header Files (*.h)\t*.h\n" .
\ "C Source Files (*.c)\t*.c\n" .
diff --git a/runtime/indent/lua.vim b/runtime/indent/lua.vim
index 37e397e37..2ea16dbf8 100644
--- a/runtime/indent/lua.vim
+++ b/runtime/indent/lua.vim
@@ -1,11 +1,13 @@
" Vim indent file
" Language: Lua script
-" Maintainer: Marcus Aurelius Farias <marcuscf@vant.com.br>
-" First Author: Max Ischenko <mfi@ukr.net>
-" Last Change: 2003 Jan 20
+" Maintainer: Marcus Aurelius Farias <marcus.cf 'at' bol.com.br>
+" First Author: Max Ischenko <mfi 'at' ukr.net>
+" Last Change: 2004 Aug 29
" Only define the function once.
-if exists("*GetLuaIndent") | finish | endif
+if exists("*GetLuaIndent")
+ finish
+endif
setlocal indentexpr=GetLuaIndent()
@@ -28,21 +30,22 @@ function! GetLuaIndent()
" function, if, for, while, repeat, else, elseif, '{'
let ind = indent(lnum)
let flag = 0
- if getline(lnum) =~ '^\s*\(function\>\|if\>\|for\>\|while\>\|repeat\>\|else\>\|elseif\>\|do\>\)' || getline(lnum) =~ '{\s*$' || getline(lnum) =~ '\s*=\s*function'
- let ind = ind + &sw
+ let prevline = getline(lnum)
+ if prevline =~ '^\s*\%(if\>\|for\>\|while\>\|repeat\>\|else\>\|elseif\>\|do\>\)' || prevline =~ '{\s*$' || prevline =~ '\<function\>\s*\%(\k\|[.:]\)\{-}\s*('
+ let ind = ind + &shiftwidth
let flag = 1
endif
" Subtract a 'shiftwidth' after lines ending with
" 'end' when they begin with while, if, for, etc.
- if flag == 1 && getline(lnum) =~ '\<end\>\|\<until\>'
- let ind = ind - &sw
+ if flag == 1 && prevline =~ '\<end\>\|\<until\>'
+ let ind = ind - &shiftwidth
endif
" Subtract a 'shiftwidth' on end, else (and elseif), until and '}'
" This is the part that requires 'indentkeys'.
- if getline(v:lnum) =~ '^\s*\(end\|else\|until\|}\)'
- let ind = ind - &sw
+ if getline(v:lnum) =~ '^\s*\%(end\|else\|until\|}\)'
+ let ind = ind - &shiftwidth
endif
return ind
diff --git a/runtime/indent/vim.vim b/runtime/indent/vim.vim
index 0de77748c..08d8ebf63 100644
--- a/runtime/indent/vim.vim
+++ b/runtime/indent/vim.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: Vim script
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2003 May 25
+" Last Change: 2004 Sep 02
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -36,10 +36,14 @@ function GetVimIndent()
" Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function
" and :else. Add it three times for a line that starts with '\' after
- " a line that doesn't.
+ " a line that doesn't (or g:vim_indent_cont if it exists).
let ind = indent(lnum)
if getline(v:lnum) =~ '^\s*\\' && v:lnum > 1 && getline(lnum) !~ '^\s*\\'
- let ind = ind + &sw * 3
+ if exists("g:vim_indent_cont")
+ let ind = ind + g:vim_indent_cont
+ else
+ let ind = ind + &sw * 3
+ endif
elseif getline(lnum) =~ '\(^\||\)\s*\(if\|wh\%[ile]\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>'
let ind = ind + &sw
elseif getline(lnum) =~ '^\s*aug\%[roup]' && getline(lnum) !~ '^\s*aug\%[roup]\s*!\=\s\+END'
diff --git a/runtime/makemenu.vim b/runtime/makemenu.vim
index 690c49485..e54b327d4 100644
--- a/runtime/makemenu.vim
+++ b/runtime/makemenu.vim
@@ -1,6 +1,6 @@
" Script to define the syntax menu in synmenu.vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2004 May 22
+" Last Change: 2004 Aug 30
" This is used by "make menu" in the src directory.
edit <sfile>:p:h/synmenu.vim
@@ -49,6 +49,7 @@ fun! <SID>Syn(arg)
endfun
SynMenu AB.Aap:aap
+SynMenu AB.ABAP/4:abap
SynMenu AB.Abaqus:abaqus
SynMenu AB.ABC\ music\ notation:abc
SynMenu AB.ABEL:abel
@@ -153,7 +154,6 @@ SynMenu DE.Elinks\ config:elinks
SynMenu DE.Elm\ filter\ rules:elmfilt
SynMenu DE.Embedix\ Component\ Description:ecd
SynMenu DE.ERicsson\ LANGuage:erlang
-SynMenu DE.ESQL-C:esqlc
SynMenu DE.Essbase\ script:csc
SynMenu DE.Eterm\ config:eterm
SynMenu DE.Exim\ conf:exim
@@ -306,7 +306,6 @@ SynMenu PQ.Pike:pike
SynMenu PQ.Pine\ RC:pine
SynMenu PQ.Pinfo\ RC:pinfo
SynMenu PQ.PL/M:plm
-SynMenu PQ.PL/SQL:plsql
SynMenu PQ.PLP:plp
SynMenu PQ.PO\ (GNU\ gettext):po
SynMenu PQ.Postfix\ main\ config:pfmain
@@ -392,10 +391,13 @@ SynMenu Sh-S.Spyce:spyce
SynMenu Sh-S.Speedup:spup
SynMenu Sh-S.Splint:splint
SynMenu Sh-S.Squid\ config:squid
+SynMenu Sh-S.SQL.ESQL-C:esqlc
SynMenu Sh-S.SQL.MySQL:mysql
-SynMenu Sh-S.SQL.SQL:sql
+SynMenu Sh-S.SQL.PL/SQL:plsql
+SynMenu Sh-S.SQL.SQL\ (Oracle):sql
SynMenu Sh-S.SQL.SQL\ Forms:sqlforms
SynMenu Sh-S.SQL.SQLJ:sqlj
+SynMenu Sh-S.SQL.SQL-Informix:sqlinformix
SynMenu Sh-S.SQR:sqr
SynMenu Sh-S.Ssh.ssh_config:sshconfig
SynMenu Sh-S.Ssh.sshd_config:sshdconfig
diff --git a/runtime/plugin/NetrwFileHandlers.vim b/runtime/plugin/NetrwFileHandlers.vim
index 619115b99..7da6479fd 100644
--- a/runtime/plugin/NetrwFileHandlers.vim
+++ b/runtime/plugin/NetrwFileHandlers.vim
@@ -1,11 +1,18 @@
" NetrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
" Author: Charles E. Campbell, Jr.
-" Date: Jul 09, 2004
-" Version: 1
+" Date: Aug 27, 2004
+" Version: 2
+
" ---------------------------------------------------------------------
+" Prevent Reloading: {{{1
+if exists("g:loaded_netrwfilehandlers") || &cp
+ finish
+endif
+let g:loaded_netrwfilehandlers= "v2"
-" NetrwFileHandler_html: handles html when the user hits "x" when the
+" ---------------------------------------------------------------------
+" 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.")")
@@ -14,10 +21,10 @@ fun! NetrwFileHandler_html(pagefile)
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
@@ -28,7 +35,7 @@ fun! NetrwFileHandler_html(pagefile)
endfun
" ---------------------------------------------------------------------
-" NetrwFileHandler_htm: handles html when the user hits "x" when the
+" 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.")")
@@ -37,10 +44,10 @@ fun! NetrwFileHandler_htm(pagefile)
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
@@ -51,14 +58,15 @@ fun! NetrwFileHandler_htm(pagefile)
endfun
" ---------------------------------------------------------------------
-" NetrwFileHandler_jpg:
+" NetrwFileHandler_jpg: {{{1
fun! NetrwFileHandler_jpg(jpgfile)
" call Dfunc("NetrwFileHandler_jpg(jpgfile<".a:jpgfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:jpgfile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
- exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".a:jpgfile
+" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
+ exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:jpgfile.'"'
else
" call Dret("NetrwFileHandler_jpg 0")
return 0
@@ -69,14 +77,14 @@ fun! NetrwFileHandler_jpg(jpgfile)
endfun
" ---------------------------------------------------------------------
-" NetrwFileHandler_gif:
+" 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! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:giffile.'"'
else
" call Dret("NetrwFileHandler_gif 0")
return 0
@@ -87,14 +95,32 @@ fun! NetrwFileHandler_gif(giffile)
endfun
" ---------------------------------------------------------------------
-" NetrwFileHandler_pnm:
+" 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.'"'
+ 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! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pnmfile.'"'
else
" call Dret("NetrwFileHandler_pnm 0")
return 0
@@ -105,14 +131,14 @@ fun! NetrwFileHandler_pnm(pnmfile)
endfun
" ---------------------------------------------------------------------
-" NetrwFileHandler_bmp: visualize bmp files
+" 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
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
@@ -123,84 +149,109 @@ fun! NetrwFileHandler_bmp(bmpfile)
endfun
" ---------------------------------------------------------------------
-" NetrwFileHandler_pdf: visualize pdf files
+" NetrwFileHandler_pdf: visualize pdf files {{{1
fun! NetrwFileHandler_pdf(pdf)
- " call Dfunc("NetrwFileHandler_pdf(pdf<".a:pdf.">)")
+" " call Dfunc("NetrwFileHandler_pdf(pdf<".a:pdf.">)")
if executable("gs")
exe "silent! !gs ".a:pdf
else
- " call Dret("NetrwFileHandler_pdf 0")
+" " call Dret("NetrwFileHandler_pdf 0")
return 0
endif
- " call Dret("NetrwFileHandler_pdf 1")
+" " call Dret("NetrwFileHandler_pdf 1")
return 1
endfun
" ---------------------------------------------------------------------
-" NetrwFileHandler_sxw: visualize sxw files
+" NetrwFileHandler_sxw: visualize sxw files {{{1
fun! NetrwFileHandler_sxw(sxw)
- " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
+" " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
if executable("gs")
exe "silent! !gs ".a:sxw
else
- " call Dret("NetrwFileHandler_sxw 0")
+" " call Dret("NetrwFileHandler_sxw 0")
return 0
endif
- " call Dret("NetrwFileHandler_sxw 1")
+" " call Dret("NetrwFileHandler_sxw 1")
return 1
endfun
" ---------------------------------------------------------------------
-" NetrwFileHandler_doc: visualize doc files
+" NetrwFileHandler_doc: visualize doc files {{{1
fun! NetrwFileHandler_doc(doc)
- " call Dfunc("NetrwFileHandler_doc(doc<".a:doc.">)")
+" " call Dfunc("NetrwFileHandler_doc(doc<".a:doc.">)")
if executable("oowriter")
exe "silent! !oowriter ".a:doc
redraw!
else
- " call Dret("NetrwFileHandler_doc 0")
+" " call Dret("NetrwFileHandler_doc 0")
return 0
endif
- " call Dret("NetrwFileHandler_doc 1")
+" " call Dret("NetrwFileHandler_doc 1")
return 1
endfun
" ---------------------------------------------------------------------
-" NetrwFileHandler_sxw: visualize sxw files
+" NetrwFileHandler_sxw: visualize sxw files {{{1
fun! NetrwFileHandler_sxw(sxw)
- " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
+" " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
if executable("oowriter")
exe "silent! !oowriter ".a:sxw
redraw!
else
- " call Dret("NetrwFileHandler_sxw 0")
+" " call Dret("NetrwFileHandler_sxw 0")
return 0
endif
- " call Dret("NetrwFileHandler_sxw 1")
+" " call Dret("NetrwFileHandler_sxw 1")
return 1
endfun
" ---------------------------------------------------------------------
-" NetrwFileHandler_xls: visualize xls files
+" NetrwFileHandler_xls: visualize xls files {{{1
fun! NetrwFileHandler_xls(xls)
- " call Dfunc("NetrwFileHandler_xls(xls<".a:xls.">)")
+" " call Dfunc("NetrwFileHandler_xls(xls<".a:xls.">)")
if executable("oocalc")
exe "silent! !oocalc ".a:xls
redraw!
else
- " call Dret("NetrwFileHandler_xls 0")
+" " 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
+ redraw!
+ elseif executable("ghostscript")
+ exe "silent! !ghostscript ".a:ps
+ redraw!
+ elseif executable("ghostscript")
+ exe "silent! !ghostscript ".a:ps
+ redraw!
+ elseif executable("gswin32")
+ exe "silent! !gswin32 \"".a:ps.'"'
+ redraw!
+" call Dret("NetrwFileHandler_ps 0")
return 0
endif
- " call Dret("NetrwFileHandler_xls 1")
+" call Dret("NetrwFileHandler_ps 1")
return 1
endfun
" ---------------------------------------------------------------------
+" vim: ts=4 fdm=marker
diff --git a/runtime/plugin/gzip.vim b/runtime/plugin/gzip.vim
index 39b0cbc36..2b9b5238d 100644
--- a/runtime/plugin/gzip.vim
+++ b/runtime/plugin/gzip.vim
@@ -1,6 +1,6 @@
" Vim plugin for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2004 Jan 12
+" Last Change: 2004 Jul 30
" Exit quickly when:
" - this plugin was already loaded
@@ -71,6 +71,11 @@ fun s:read(cmd)
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")
diff --git a/runtime/plugin/netrw.vim b/runtime/plugin/netrw.vim
index be6bb41dd..84cda93c4 100644
--- a/runtime/plugin/netrw.vim
+++ b/runtime/plugin/netrw.vim
@@ -1,18 +1,20 @@
" netrw.vim: Handles file transfer and remote directory listing across a network
-" Last Change: Jul 26, 2004
+" Last Change: Aug 27, 2004
" Maintainer: Charles E. Campbell, Jr. PhD <drchipNOSPAM at campbellfamily.biz>
-" Version: 47m
+" Version: 47
" License: Vim License (see vim's :help license)
"
" But be doers of the word, and not only hearers, deluding your own selves
" (James 1:22 RSV)
" =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
-" Exit quickly when already loaded or when 'compatible' is set. {{{1
+" ---------------------------------------------------------------------
+" Prevent Reloading: {{{1
if exists("loaded_netrw") || &cp
finish
endif
-let loaded_netrw = "v47m"
+let loaded_netrw = "v47"
let s:save_cpo = &cpo
let loaded_explorer = 1
set cpo&vim
@@ -26,7 +28,7 @@ if !exists("g:netrw_win95ftp")
let g:netrw_win95ftp= 1
endif
if !exists("g:netrw_cygwin")
- if has("win32")
+ if has("win32") || has("win95") || has("win64") || has("win16")
let g:netrw_cygwin= 1
else
let g:netrw_cygwin= 0
@@ -88,8 +90,10 @@ if !exists("g:netrw_local_rmdir")
let g:netrw_local_rmdir= "rmdir"
endif
if !exists("g:netrw_local_rename")
- if has("win32")
- let g:netrw_local_rename= "ren"
+ if g:netrw_cygwin
+ let g:netrw_local_rename= "mv"
+ elseif has("win32") || has("win95") || has("win64") || has("win16")
+ let g:netrw_local_rename= "rename"
elseif has("unix")
let g:netrw_local_rename= "mv"
endif
@@ -103,6 +107,26 @@ endif
if !exists("g:netrw_hide")
let g:netrw_hide= 1
endif
+if !exists("g:netrw_ftp_browse_reject")
+ let g:netrw_ftp_browse_reject='^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not'
+endif
+if !exists("g:netrw_keepdir")
+ let g:netrw_keepdir= 0
+endif
+if !exists("s:netrw_cd_escape")
+ if has("win32") || has("win95") || has("win64") || has("win16")
+ let s:netrw_cd_escape="#% "
+ else
+ let s:netrw_cd_escape="*$%'\" ?`"
+ endif
+endif
+if !exists("s:netrw_glob_escape")
+ if has("win32") || has("win95") || has("win64") || has("win16")
+ let s:netrw_glob_escape= ""
+ else
+ let s:netrw_glob_escape= '[]*?`{~'
+ endif
+endif
" BufEnter event ignored by decho when following variable is true
" Has a side effect that doau BufReadPost doesn't work, so
@@ -146,7 +170,7 @@ if !exists("g:netrw_fetch_cmd")
endif
endif
-if has("win32")
+if has("win32") || has("win95") || has("win64") || has("win16")
\ && exists("g:netrw_use_nt_rcp")
\ && g:netrw_use_nt_rcp
\ && executable( $SystemRoot .'/system32/rcp.exe')
@@ -168,7 +192,7 @@ if version >= 600
" Network Handler: {{{2
augroup Network
au!
- if has("win32")
+ if has("win32") || has("win95") || has("win64") || has("win16")
au BufReadCmd file://* exe "silent doau BufReadPre ".expand("<afile>")|exe 'e '.substitute(expand("<afile>"),"file:/*","","")|exe "silent doau BufReadPost ".expand("<afile>")
else
au BufReadCmd file:///* exe "silent doau BufReadPre ".expand("<afile>")|exe 'e /'.substitute(expand("<afile>"),"file:/*","","")|exe "silent doau BufReadPost ".expand("<afile>")
@@ -244,7 +268,7 @@ fun! s:NetRead(...)
let ichoice = 1
endif
- " get name of a temporary file
+ " get name of a temporary file and set up shell-quoting character
let tmpfile= tempname()
" call Decho("ichoice=".ichoice." readcmd<".readcmd.">")
@@ -260,8 +284,8 @@ fun! s:NetRead(...)
exe "let choice= a:" . ichoice
" call Decho("no lastfile: choice<" . choice . ">")
- " Reconstruct Choice if choice starts with '"'
if match(choice,"?") == 0
+ " give help
echo 'NetRead Usage:'
echo ':Nread machine:path uses rcp'
echo ':Nread "machine path" uses ftp with <.netrc>'
@@ -275,7 +299,9 @@ fun! s:NetRead(...)
echo ':Nread scp://[user@]machine[[:#]port]/path uses scp'
echo ':Nread sftp://[user@]machine[[:#]port]/path uses sftp'
break
+
elseif match(choice,"^\"") != -1
+ " Reconstruct Choice if choice starts with '"'
" call Decho("reconstructing choice")
if match(choice,"\"$") != -1
" case "..."
@@ -304,7 +330,7 @@ fun! s:NetRead(...)
let ichoice= ichoice + 1
" fix up windows urls
- if has("win32")
+ if has("win32") || has("win95") || has("win64") || has("win16")
let choice = substitute(choice,'\\','/','ge')
" call Decho("fixing up windows url to <".choice."> tmpfile<".tmpfile)
@@ -318,12 +344,8 @@ fun! s:NetRead(...)
" Check if NetBrowse() should be handling this request
" call Decho("checking if netlist: choice<".choice."> netrw_list_cmd<".g:netrw_list_cmd.">")
if choice =~ "^.*/$"
- if strlen(g:netrw_list_cmd) > 0
- keepjumps call s:NetBrowse(choice)
-" call Dret("NetRead")
- else
- echoerr "sorry, can't do a remote listing; ssh isn't executable"
- endif
+ keepjumps call s:NetBrowse(choice)
+" call Dret("NetRead")
return
endif
@@ -366,7 +388,7 @@ fun! s:NetRead(...)
new
setlocal ff=unix
exe "put ='".g:netrw_ftpmode."'"
- exe "put ='get ".netrw_fname." ".tmpfile."'"
+ exe "put ='"."get ".netrw_fname." ".tmpfile."'"
if exists("g:netrw_port") && g:netrw_port != ""
" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port
@@ -376,7 +398,11 @@ fun! s:NetRead(...)
endif
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
if getline(1) !~ "^$"
+ let debugkeep= &debug
+ set debug=msg
echoerr getline(1)
+ exe "echomsg '".getline(1)."'"
+ let &debug= debugkeep
endif
bd!
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
@@ -413,11 +439,12 @@ fun! s:NetRead(...)
" -n unix : DON'T use <.netrc>, even though it exists
" -n win32: quit being obnoxious about password
" call Decho('performing ftp -i -n')
- norm 1Gdd
+ norm! 1Gdd
" call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n"
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
if getline(1) !~ "^$"
+" call Decho("error<".getline(1).">")
echoerr getline(1)
endif
bd!
@@ -496,7 +523,7 @@ fun! s:NetRead(...)
endif
" perform cadaver operation:
- norm 1Gdd
+ norm! 1Gdd
" call Decho("executing: %!".g:netrw_dav_cmd)
exe g:netrw_silentxfer."%!".g:netrw_dav_cmd
bd!
@@ -570,14 +597,12 @@ fun! s:NetRead(...)
" call Decho("cleanup")
if exists("b:netrw_method")
unlet b:netrw_method
- unlet g:netrw_machine
unlet b:netrw_fname
endif
call s:NetOptionRestore()
" call Dret("NetRead")
endfun
-" end of NetRead
" ------------------------------------------------------------------------
" NetGetFile: Function to read file "fname" with command "readcmd". {{{1
@@ -644,14 +669,14 @@ fun! s:NetGetFile(readcmd, fname, method)
endif
exe curbufnr . "bwipe!"
- exe "f ".curfilename
+ exe "f ".escape(curfilename," ")
" the ":f newname" apparently leaves the temporary file as the alternate
" file in the buffer list (see :ls!). The following command wipes it out.
exe bufnr("#")."bwipe!"
else
let oldul= &ul
setlocal ul=-1
- exe a:readcmd." ".v:cmdarg." ".fname
+ exe a:readcmd." ".v:cmdarg." ".escape(fname," ")
if delline > 0
" wipe out last line, which should be a blank line anyway
$del
@@ -764,7 +789,7 @@ fun! s:NetWrite(...) range
let ichoice= ichoice + 1
" fix up windows urls
- if has("win32")
+ if has("win32") || has("win95") || has("win64") || has("win16")
let choice= substitute(choice,'\\','/','ge')
"ER: see NetRead()
exe 'lcd ' . fnamemodify(tmpfile,':h')
@@ -807,8 +832,8 @@ fun! s:NetWrite(...) range
setlocal ff=unix
exe "put ='".g:netrw_ftpmode."'"
" call Decho(" NetWrite: put ='".g:netrw_ftpmode."'")
- exe "put ='put ".tmpfile." ".netrw_fname."'"
-" call Decho("put ='put ".tmpfile." ".netrw_fname."'")
+ exe "put ='"."put ".tmpfile." ".netrw_fname."'"
+" call Decho("put ='"."put ".tmpfile." ".netrw_fname."'")
if exists("g:netrw_port") && g:netrw_port != ""
" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port
@@ -850,7 +875,7 @@ fun! s:NetWrite(...) range
" -n unix : DON'T use <.netrc>, even though it exists
" -n win32: quit being obnoxious about password
" call Decho('performing ftp -i -n')
- norm 1Gdd
+ norm! 1Gdd
" call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n"
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
@@ -907,7 +932,7 @@ fun! s:NetWrite(...) range
endif
" perform cadaver operation:
- norm 1Gdd
+ norm! 1Gdd
" call Decho("executing: %!".g:netrw_dav_cmd)
exe g:netrw_silentxfer."%!".g:netrw_dav_cmd
bd!
@@ -938,7 +963,7 @@ fun! s:NetWrite(...) range
new
setlocal ff=unix
put ='put '.tmpfile.' '.netrw_fname
- norm 1Gdd
+ norm! 1Gdd
" call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine)
exe g:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.uid_machine
bd!
@@ -961,7 +986,6 @@ fun! s:NetWrite(...) range
" call Dret("NetWrite")
endfun
-" end of NetWrite
" ------------------------------------------------------------------------
" Browsing Support For Remote Directories And Files: {{{1
@@ -970,13 +994,17 @@ endfun
" g:netrw_list_cmd has a string, HOSTNAME, that needs to be substituted
" with the requested remote hostname first.
fun! <SID>NetBrowse(dirname)
-" call Dfunc("NetBrowse(dirname<".a:dirname.">)")
+" call Dfunc("NetBrowse(dirname<".a:dirname.">) longlist=".g:netrw_longlist)
" sanity check
- if !exists("g:netrw_list_cmd") || g:netrw_list_cmd == ''
- echoerr "***netrw*** this system doesn't support remote directory listing"
-" call Dret("NetBrowse 0")
- return 0
+ if exists("b:netrw_method") && (b:netrw_method =~ '[23]' && !executable("ftp"))
+ echoerr "***netrw*** this system doesn't support remote directory listing via ftp"
+" call Dret("NetBrowse")
+ return
+ elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == ''
+ echoerr "***netrw*** this system doesn't support remote directory listing via ssh"
+" call Dret("NetBrowse")
+ return
endif
" make this buffer modifiable
@@ -984,10 +1012,11 @@ fun! <SID>NetBrowse(dirname)
" analyze a:dirname and g:netrw_list_cmd
let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$'
+" call Decho("dirpat<".dirpat.">")
if a:dirname !~ dirpat
echoerr "NetBrowse: I don't understand your dirname<".a:dirname.">"
-" call Dret("NetBrowse 0 : badly formatted dirname")
- return 0
+" call Dret("NetBrowse : badly formatted dirname<".a:dirname.">")
+ return
endif
let method = substitute(a:dirname,dirpat,'\1','')
@@ -1001,7 +1030,15 @@ fun! <SID>NetBrowse(dirname)
" call Decho("set up path <".path .">")
" call Decho("set up fname <".fname .">")
- let listcmd = substitute(g:netrw_list_cmd,'\<HOSTNAME\>',user.machine,'')
+ if method == "ftp"
+ let listcmd = "-lF"
+ else
+ let listcmd = substitute(g:netrw_list_cmd,'\<HOSTNAME\>',user.machine,'')
+ endif
+ if exists("b:netrw_method")
+" call Decho("setting s:netrw_method<".b:netrw_method.">")
+ let s:netrw_method= b:netrw_method
+ endif
" optionally sort by time (-t) or by size (-S)
if g:netrw_sort_by =~ "^t"
@@ -1015,13 +1052,12 @@ fun! <SID>NetBrowse(dirname)
endif
" call Decho("set up listcmd<".listcmd.">")
-
if fname =~ '@$' && fname !~ '^"'
" call Decho("attempt transfer of symlink as file")
call s:NetBrowse(substitute(a:dirname,'@$','','e'))
redraw!
-" call Dret("NetBrowse 0 : symlink")
- return 0
+" call Dret("NetBrowse : symlink")
+ return
elseif fname !~ '/$' && fname !~ '^"'
" looks like a regular file, attempt transfer
@@ -1035,15 +1071,15 @@ fun! <SID>NetBrowse(dirname)
" remote-read the requested file into current buffer
enew!
- exe "file ".method."://".user.machine."/".escape(path,' ')
+ exe "file ".method."://".user.machine."/".escape(path,s:netrw_cd_escape)
exe "silent doau BufReadPre ".fname
silent call s:NetRead(method."://".user.machine."/".path)
exe "silent doau BufReadPost ".fname
keepjumps 1d
setlocal nomod
-" call Dret("NetBrowse 0 : file<".fname.">")
- return 0
+" call Dret("NetBrowse : file<".fname.">")
+ return
endif
" ---------------------------------------------------------------------
@@ -1051,97 +1087,153 @@ fun! <SID>NetBrowse(dirname)
" call Decho("Perform directory listing...")
" set up new buffer and map
let bufname = method.'://'.user.machine.'/'.path
- let bufnamenr = bufnr(bufname)
+ let bufnamenr = bufexists(bufname)
" call Decho("bufname<".bufname."> bufnamenr=".bufnamenr)
- if bufnamenr != -1
+ if bufnamenr != 0
" buffer already exists, switch to it!
+" call Decho("buffer already exists, switching to it")
exe "b ".bufnamenr
if line("$") >= 5
-" call Dret("NetBrowse 1")
- return 1
+" call Dret("NetBrowse")
+ return
endif
else
+" call Decho("generate a new buffer")
enew!
endif
+
+ " rename file to reflect where its from
setlocal ts=32 bt=nofile bh=wipe nobl
- exe 'file '.escape(bufname,' ')
+ exe 'file '.escape(bufname,s:netrw_cd_escape)
" call Decho("renaming file to bufname<".bufname.">")
setlocal bt=nowrite bh=hide nobl
- nnoremap <buffer> <silent> <cr> :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()))<cr>
+
+ " set up buffer-local mappings
+" call Decho("set up buffer-local mappings")
+ nnoremap <buffer> <silent> <cr> :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))<cr>
nnoremap <buffer> <silent> <c-l> :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
nnoremap <buffer> <silent> - :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'../'))<cr>
nnoremap <buffer> <silent> a :let g:netrw_hide=!g:netrw_hide<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
- nnoremap <buffer> <silent> <Leader>h :call <SID>NetHideEdit(0)<cr>
- nnoremap <buffer> <silent> i :call <SID>NetSavePosn()<bar>call <SID>NetLongList(0)<bar>call <SID>NetRestorePosn()<cr>
- nnoremap <buffer> <silent> o :exe g:netrw_winsize."wincmd s"<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()))<cr>
- nnoremap <buffer> <silent> r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()))<cr>
- nnoremap <buffer> <silent> s :let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
- nnoremap <buffer> <silent> v :exe g:netrw_winsize."wincmd v"<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()))<cr>
- nnoremap <buffer> <silent> x :exe "norm! 0"<bar>call <SID>NetBrowseX(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()),1)<cr>
- nnoremap <buffer> <silent> <2-leftmouse> :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()))<cr>
+ nnoremap <buffer> <silent> b :<c-u>call <SID>NetBookmarkDir(0,expand("%"))<cr>
+ nnoremap <buffer> <silent> B :<c-u>call <SID>NetBookmarkDir(1,expand("%"))<cr>
+ nnoremap <buffer> <silent> <c-h> :call <SID>NetHideEdit(0)<cr>
+ nnoremap <buffer> <silent> i :call <SID>NetLongList(0)<cr>
+ nnoremap <buffer> <silent> o :exe g:netrw_winsize."wincmd s"<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))<cr>
+ nnoremap <buffer> <silent> q :<c-u>call <SID>NetBookmarkDir(2,expand("%"))<cr>
+ nnoremap <buffer> <silent> r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
+ nnoremap <buffer> <silent> s :call <SID>NetSaveWordPosn()<bar>let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<bar>call <SID>NetRestoreWordPosn()<cr>
+ nnoremap <buffer> <silent> S :call <SID>NetSortSequence(0)<cr>
+ nnoremap <buffer> <silent> v :exe g:netrw_winsize."wincmd v"<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))<cr>
+ nnoremap <buffer> <silent> x :exe "norm! 0"<bar>call <SID>NetBrowseX(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()),1)<cr>
+ nnoremap <buffer> <silent> <2-leftmouse> :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))<cr>
exe 'nnoremap <buffer> <silent> <del> :exe "norm! 0"<bar>call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
exe 'vnoremap <buffer> <silent> <del> :call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
+ exe 'nnoremap <buffer> <silent> d :call <SID>NetMakeDir("'.user.machine.'")<cr>'
exe 'nnoremap <buffer> <silent> D :exe "norm! 0"<bar>call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
exe 'vnoremap <buffer> <silent> D :call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
exe 'nnoremap <buffer> <silent> R :exe "norm! 0"<bar>call <SID>NetBrowseRename("'.user.machine.'","'.path.'")<cr>'
exe 'vnoremap <buffer> <silent> R :call <SID>NetBrowseRename("'.user.machine.'","'.path.'")<cr>'
- exe 'nnoremap <buffer> <silent> <Leader>m :call <SID>NetMakeDir("'.user.machine.'")<cr>'
nnoremap <buffer> ? :he netrw-browse-cmds<cr>
setlocal ma
" Set up the banner
-" call Decho("executing: r! ".listcmd." '".path."'")
- keepjumps put ='\" =============================='
+" call Decho("set up the banner: sortby<".g:netrw_sort_by."> method<".method.">")
+ keepjumps put ='\" ==========================================================================='
keepjumps put ='\" Netrw Remote Directory Listing'
keepjumps put ='\" '.bufname
- let g:netrw_bannercnt= 6
+ let s:netrw_bannercnt= 7
+ let sortby= g:netrw_sort_by
+ if g:netrw_sort_direction =~ "^r"
+ let sortby= sortby." reversed"
+ endif
+
if g:netrw_sort_by =~ "^n"
" sorted by name
- let g:netrw_bannercnt= g:netrw_bannercnt + 1
- keepjumps put ='\" Sorted by '.g:netrw_sort_by
+ let s:netrw_bannercnt= s:netrw_bannercnt + 1
+ keepjumps put ='\" Sorted by '.sortby
keepjumps put ='\" Sort sequence: '.g:netrw_sort_sequence
else
" sorted by size or date
- keepjumps put ='\" Sorted by '.g:netrw_sort_by
+ keepjumps put ='\" Sorted by '.sortby
endif
if g:netrw_list_hide != "" && g:netrw_hide
keepjumps put ='\" Hiding: '.g:netrw_list_hide
- let g:netrw_bannercnt= g:netrw_bannercnt + 1
+ let s:netrw_bannercnt= s:netrw_bannercnt + 1
endif
- keepjumps put ='\" =============================='
+ keepjumps put ='\" Quick Help: ?:help -:go up dir D:delete R:rename s:sort-by x:exec'
+ keepjumps put ='\" ==========================================================================='
+
+ " remote read the requested directory listing
+ " Use ftp if that was the file-transfer method selected, otherwise use ssh
+ " Note that not all ftp servers honor the options for ls
+ if method == "ftp"
+ call NetBrowseFtpCmd(path,"ls ".listcmd)
+ keepjumps 1d
- " remote read the requested directory
- exe "silent r! ".listcmd." '".path."'"
- keepjumps 1d
+ if !g:netrw_longlist
+" call Decho("generate short listing")
+ " shorten the listing
+ exe "keepjumps ".s:netrw_bannercnt
+ " cleanup
+ while getline(".") =~ g:netrw_ftp_browse_reject
+ keepjumps d
+ endwhile
+ keepjumps put='../'
+ keepjumps put='./'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2/e'
+ exe "keepjumps silent ".s:netrw_bannercnt.',$g/ -> /s# -> .*/$#/#'
+ exe "keepjumps silent ".s:netrw_bannercnt.',$g/ -> /s# -> .*$#/#'
+ endif
+
+ else
+" call Decho("use ssh")
+ let shq= &shq? &shq : ( &sxq? &sxq : "'")
+" call Decho("exe silent r! ".listcmd." ".shq.escape(path,s:netrw_cd_escape).shq)
+ exe "silent r! ".listcmd." ".shq.escape(path,s:netrw_cd_escape).shq
+ keepjumps 1d
+ endif
" manipulate the directory listing (hide, sort)
setlocal ft=netrwlist
- if line("$") >= g:netrw_bannercnt
+ if line("$") >= s:netrw_bannercnt
if g:netrw_hide && g:netrw_list_hide != ""
call s:NetrwListHide()
endif
+
if g:netrw_longlist
" do a long listing; these substitutions need to be done prior to sorting
- keepjumps silent /^total\s*\d\+$/d
- exe 'keepjumps silent '.g:netrw_bannercnt.',$s/ -> .*$//e'
- exe 'keepjumps silent '.g:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2\t\1/e'
- exe g:netrw_bannercnt
+" call Decho("manipulate long listing")
+
+ if method == "ftp"
+ " cleanup
+ exe "keepjumps ".s:netrw_bannercnt
+ while getline(".") =~ '^total\s\+\d\+$' || getline(".") =~ 'Trying\s\+\d\+.*$'
+ keepjumps d
+ endwhile
+ exe 'keepjumps '.s:netrw_bannercnt."put='./'"
+ exe 'keepjumps '.s:netrw_bannercnt."put='../'"
+ endif
+
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$s/ -> .*$//e'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2\t\1/e'
+ exe s:netrw_bannercnt
endif
+
if g:netrw_sort_by =~ "^n"
call s:SetSort()
- exe 'keepjumps silent '.g:netrw_bannercnt.',$call s:NetSort()'
- exe 'keepjumps silent '.g:netrw_bannercnt.',$s/^\d\{3}\///e'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$call s:NetSort()'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$s/^\d\{3}\///e'
endif
if g:netrw_longlist
" shorten the list to keep its width <= 80 characters
- exe "keepjumps silent ".g:netrw_bannercnt.',$s/\t[-dstrwx]\+/\t/e'
+ exe "keepjumps silent ".s:netrw_bannercnt.',$s/\t[-dstrwx]\+/\t/e'
endif
endif
+ setlocal nomod
+ setlocal noma
- setlocal noma nomod
-
-" call Dret("NetBrowse 1")
- return 1
+" call Dret("NetBrowse")
+ return
endfun
" ---------------------------------------------------------------------
@@ -1188,19 +1280,19 @@ fun! <SID>NetBrowseChgDir(dirname,newdir)
endfun
" ---------------------------------------------------------------------
-" NetGetDir: it gets the directory named under the cursor
-fun! <SID>NetGetDir()
-" call Dfunc("NetGetDir() line#".line("."))
+" NetGetWord: it gets the directory named under the cursor
+fun! <SID>NetGetWord()
+" call Dfunc("NetGetWord() line#".line("."))
let dirname= getline(".")
if dirname =~ '\t'
let dirname= substitute(dirname,'\t.*$','','e')
endif
-" call Dret("NetGetDir <".dirname.">")
+" call Dret("NetGetWord <".dirname.">")
return dirname
endfun
" ---------------------------------------------------------------------
-" NetBrowseRm: remove a remote file or directory {{{2
+" NetBrowseRm: remove/delete a remote file or directory {{{2
fun! <SID>NetBrowseRm(usrhost,path) range
" call Dfunc("NetBrowseRm(usrhost<".a:usrhost."> path<".a:path.">)")
" call Decho("firstline=".a:firstline." lastline=".a:lastline)
@@ -1213,41 +1305,52 @@ fun! <SID>NetBrowseRm(usrhost,path) range
exe ctr
norm! 0
- let rmfile= a:path.s:NetGetDir()
+ let rmfile= s:NetGetWord()
" call Decho("rmfile<".rmfile.">")
if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '/$')
" attempt to remove file
- let netrw_rm_cmd= substitute(g:netrw_rm_cmd,'HOSTNAME',a:usrhost,'').' '.rmfile
-" call Decho("attempt to remove file: system(".netrw_rm_cmd.")")
call inputsave()
let ok= input("Confirm deletion of file<".rmfile."> ","y")
call inputrestore()
+
if ok == "y"
- let ret= system(netrw_rm_cmd)
-" call Decho("returned=".ret." errcode=".v:shell_error)
+ if exists("s:netrw_method") && (s:netrw_method == 2 || s:netrw_method == 3)
+ silent! keepjumps .,$d
+ call NetBrowseFtpCmd(a:path,"delete ".rmfile)
+ else
+ let netrw_rm_cmd= substitute(g:netrw_rm_cmd,'HOSTNAME',a:usrhost,'').' "'.escape(a:path.rmfile,s:netrw_cd_escape).'"'
+" call Decho("attempt to remove file: system(".netrw_rm_cmd.")")
+ let ret= system(netrw_rm_cmd)
+" call Decho("returned=".ret." errcode=".v:shell_error)
+ endif
endif
else
" attempt to remove directory
- let netrw_rmdir_cmd= substitute(g:netrw_rmdir_cmd,'HOSTNAME',a:usrhost,'').' '.rmfile
-" call Decho("attempt to remove dir: system(".netrw_rmdir_cmd.")")
call inputsave()
let ok= input("Confirm deletion of directory<".rmfile."> ","y")
call inputrestore()
if ok == "y"
- let ret= system(netrw_rmdir_cmd)
-" call Decho("returned=".ret." errcode=".v:shell_error)
-
- if v:shell_error != 0
- let netrw_rmf_cmd= substitute(g:netrw_rmf_cmd,'HOSTNAME',a:usrhost,'').' '.substitute(rmfile,'/$','','e')
-" call Decho("2nd attempt to remove dir: system(".netrw_rmf_cmd.")")
- let ret= system(netrw_rmf_cmd)
+ if exists("s:netrw_method") && (s:netrw_method == 2 || s:netrw_method == 3)
+ call NetBrowseFtpCmd(a:path,"rmdir ".rmfile)
+ else
+ let rmfile = a:path.rmfile
+ let netrw_rmdir_cmd= substitute(g:netrw_rmdir_cmd,'HOSTNAME',a:usrhost,'').' '."'".'"'.rmfile.'"'."'"
+" call Decho("attempt to remove dir: system(".netrw_rmdir_cmd.")")
+ let ret= system(netrw_rmdir_cmd)
" call Decho("returned=".ret." errcode=".v:shell_error)
if v:shell_error != 0
- echoerr "unable to remove directory<".rmfile."> -- is it empty?"
+ let netrw_rmf_cmd= substitute(g:netrw_rmf_cmd,'HOSTNAME',a:usrhost,'').' '.substitute(rmfile,'/$','','e')
+" call Decho("2nd attempt to remove dir: system(".netrw_rmf_cmd.")")
+ let ret= system(netrw_rmf_cmd)
+" call Decho("returned=".ret." errcode=".v:shell_error)
+
+ if v:shell_error != 0
+ echoerr "unable to remove directory<".rmfile."> -- is it empty?"
+ endif
endif
endif
endif
@@ -1279,15 +1382,21 @@ fun! <SID>NetBrowseRename(usrhost,path) range
exe "keepjumps ".ctr
norm! 0
- let oldname= a:path.s:NetGetDir()
+ let oldname= s:NetGetWord()
" call Decho("oldname<".oldname.">")
call inputsave()
- let newname= input("Moving ".a:usrhost."'s ".oldname." to : ",oldname)
+ let newname= input("Moving ".oldname." to : ",oldname)
call inputrestore()
- let ret= system(rename_cmd." ".oldname." ".newname)
-" call Decho("executing system(".rename_cmd." ".oldname." ".newname)
+ if exists("s:netrw_method") && (s:netrw_method == 2 || s:netrw_method == 3)
+ call NetBrowseFtpCmd(a:path,"rename ".oldname." ".newname)
+ else
+ let oldname= a:path.oldname
+ let newname= a:path.newname
+" call Decho("system(rename_cmd".' "'.escape(oldname," ").'" "'.escape(newname,s:netrw_cd_escape).'"')
+ let ret= system(rename_cmd.' "'.escape(oldname,s:netrw_cd_escape).'" "'.escape(newname,s:netrw_cd_escape).'"')
+ endif
let ctr= ctr + 1
endwhile
@@ -1306,6 +1415,9 @@ fun! <SID>NetBrowseX(fname,remote)
" call Dfunc("NetBrowseX(".a:fname." remote=".a:remote.")")
let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e')
+ if has("win32") || has("win95") || has("win64") || has("win16")
+ let exten= substitute(exten,'^.*$','\L&\E','')
+ endif
" call Decho("exten<".exten."> "."NetrwFileHandler_".exten."():exists=".exists("*NetrwFileHandler_".exten))
if exten != "" && exists("*NetrwFileHandler_".exten)
@@ -1345,6 +1457,79 @@ fun! <SID>NetBrowseX(fname,remote)
endfun
" ---------------------------------------------------------------------
+" NetBrowseFtpCmd: unfortunately, not all ftp servers honor options for ls {{{2
+" This function assumes that a long listing will be received. Size, time,
+" and reverse sorts will be requested of the server but not otherwise
+" enforced here.
+fun! NetBrowseFtpCmd(path,cmd)
+" call Dfunc("NetBrowseFtpCmd(path<".a:path."> cmd<".a:cmd.">) netrw_method=".s:netrw_method)
+
+ " because WinXX ftp uses unix style input
+ " curline is one more than the bannercnt in order to account
+ " for the unwanted first blank line (doing a :put to an empty
+ " buffer yields a blank first line)
+ let ffkeep= &ff
+ setlocal ma
+ setlocal ff=unix
+ let curline= s:netrw_bannercnt+1
+ exe "silent! keepjumps ".curline.",$d"
+
+ ".........................................
+ if s:netrw_method == 2
+ " ftp + <.netrc>: Method #2
+ if a:path != ""
+ put ='cd '.a:path
+ endif
+ exe "put ='".a:cmd."'"
+
+ if exists("g:netrw_port") && g:netrw_port != ""
+" call Decho("exe ".g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
+ exe g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port
+ else
+" call Decho("exe ".g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
+ exe g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine
+ endif
+
+ ".........................................
+ elseif s:netrw_method == 3
+ " ftp + machine,id,passwd,filename: Method #3
+ setlocal ff=unix
+ if exists("g:netrw_port") && g:netrw_port != ""
+ put ='open '.g:netrw_machine.' '.g:netrw_port
+ else
+ put ='open '.g:netrw_machine
+ endif
+
+ if exists("g:netrw_ftp") && g:netrw_ftp == 1
+ put =g:netrw_uid
+ put =g:netrw_passwd
+ else
+ put ='user '.g:netrw_uid.' '.g:netrw_passwd
+ endif
+
+ if a:path != ""
+ put ='cd '.a:path
+ endif
+ exe "put ='".a:cmd."'"
+
+ " perform ftp:
+ " -i : turns off interactive prompting from ftp
+ " -n unix : DON'T use <.netrc>, even though it exists
+ " -n win32: quit being obnoxious about password
+" call Decho("exe ".g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i -n")
+ exe g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i -n"
+
+ ".........................................
+ else
+ echo "***warning*** unable to comply with your request<" . choice . ">"
+ endif
+
+ " restore settings
+ let &ff= ffkeep
+" call Dret("NetBrowseFtpCmd")
+endfun
+
+" ---------------------------------------------------------------------
" NetrwListHide: uses [range]g~...~d to delete files that match comma {{{2
" separated patterns given in g:netrw_list_hide
fun! <SID>NetrwListHide()
@@ -1360,7 +1545,7 @@ fun! <SID>NetrwListHide()
let listhide= ""
endif
" call Decho("pruning <".hide."> listhide<".listhide.">")
- exe 'keepjumps silent '.g:netrw_bannercnt.',$g~'.hide.'~d'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$g~'.hide.'~d'
endwhile
" call Dret("NetrwListHide")
@@ -1380,16 +1565,37 @@ fun! <SID>NetHideEdit(mode)
if a:mode == 0
silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
else
- silent call s:LocalBrowse(s:NetBrowseChgDir(expand("%"),'./'))
+ silent call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"))
endif
" call Dret("NetHideEdit")
endfun
" ---------------------------------------------------------------------
+" NetSortSequence: allows user to edit the sorting sequence
+fun! <SID>NetSortSequence(mode)
+" call Dfunc("NetSortSequence(mode=".a:mode.")")
+
+ call inputsave()
+ let newsortseq= input("Edit Sorting Sequence: ",g:netrw_sort_sequence)
+ call inputrestore()
+
+ " refresh the listing
+ let g:netrw_sort_sequence= newsortseq
+ if a:mode == 0
+ silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
+ else
+ silent call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"))
+ endif
+
+" call Dret("NetSortSequence")
+endfun
+
+" ---------------------------------------------------------------------
" NetLongList: {{{2
fun! <SID>NetLongList(mode)
" call Dfunc("NetLongList(mode=".a:mode.") netrw_longlist=".g:netrw_longlist)
+ call s:NetSavePosn()
if g:netrw_longlist != 0
" turn long listing off
@@ -1406,13 +1612,32 @@ fun! <SID>NetLongList(mode)
if a:mode == 0
silent call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),"./"))
else
- silent call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%"),"./"))
+ silent call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"))
endif
+ call s:NetRestorePosn()
" call Dret("NetLongList : g:netrw_longlist=".g:netrw_longlist)
endfun
" ---------------------------------------------------------------------
+" NetSaveWordPosn: used by the "s" command in both remote and local
+" browsing. Along with NetRestoreWordPosn(), it keeps the cursor on
+" the same word even though the sorting has changed its order of appearance.
+fun! s:NetSaveWordPosn()
+" call Dfunc("NetSaveWordPosn()")
+ let s:netrw_saveword= '^'.escape(getline("."),s:netrw_cd_escape).'$'
+" call Dret("NetSaveWordPosn : saveword<".s:netrw_saveword.">")
+endfun
+
+" ---------------------------------------------------------------------
+" NetRestoreWordPosn: used by the "s" command; see NetSaveWordPosn() above
+fun! s:NetRestoreWordPosn()
+" call Dfunc("NetRestoreWordPosn()")
+ silent! call search(s:netrw_saveword,'w')
+" call Dret("NetRestoreWordPosn")
+endfun
+
+" ---------------------------------------------------------------------
" NetMakeDir: this function makes a directory (both local and remote)
fun! <SID>NetMakeDir(usrhost)
" call Dfunc("NetMakeDir(usrhost<".a:usrhost.">)")
@@ -1423,31 +1648,45 @@ fun! <SID>NetMakeDir(usrhost)
call inputsave()
let newdirname= input("Please give directory name: ")
call inputrestore()
+" call Decho("newdirname<".newdirname.">")
if newdirname == ""
" call Dret("NetMakeDir : user aborted with bare <cr>")
return
endif
- let newdirname= escape(newdirname,' ')
if a:usrhost == ""
" Local mkdir:
" sanity checks
- if isdirectory(newdirname)
+ let fullnewdir= b:netrw_curdir.'/'.newdirname
+" call Decho("fullnewdir<".fullnewdir.">")
+ if isdirectory(fullnewdir)
echoerr "***warning*** <".newdirname."> is already a directory!"
" call Dret("NetMakeDir : directory<".newdirname."> exists previously")
return
endif
- if filereadable(newdirname)
+ if filereadable(fullnewdir)
echoerr "***warning*** <".newdirname."> is already a file!"
" call Dret("NetMakeDir : file<".newdirname."> exists previously")
return
endif
- exe "silent! !".g:netrw_local_mkdir." ".newdirname
+ let netrw_origdir= s:NetGetcwd(1)
+ exe 'cd '.b:netrw_curdir
+" call Decho("netrw_origdir<".netrw_origdir."> b:netrw_curdir<".b:netrw_curdir.">")
+" call Decho("exe silent! !".g:netrw_local_mkdir.' "'.newdirname.'"')
+ exe "silent! !".g:netrw_local_mkdir.' "'.newdirname.'"'
+ if g:netrw_keepdir | exe 'keepjumps cd '.netrw_origdir | endif
+
if v:shell_error == 0
" refresh listing
- call s:LocalBrowse(".")
+" call Decho("refresh listing")
+ let linenum= line(".")
+ norm! H0
+ let hline = line(".")
+ call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,'./'))
+ exe "norm! ".hline."G0z\<CR>"
+ exe linenum
else
echoerr "***warning*** unable to make directory<".newdirname.">"
endif
@@ -1456,12 +1695,17 @@ fun! <SID>NetMakeDir(usrhost)
else
" Remote mkdir:
let mkdircmd = substitute(g:netrw_mkdir_cmd,'\<HOSTNAME\>',a:usrhost,'')
- let newdirname= substitute(expand("%"),'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname
+ let newdirname= "'".'"'.substitute(expand("%"),'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname.'"'."'"
" call Decho("exe silent! !".mkdircmd." ".newdirname)
exe "silent! !".mkdircmd." ".newdirname
if v:shell_error == 0
" refresh listing
+ let linenum= line(".")
+ norm! H0
+ let hline = line(".")
call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
+ exe "norm! ".hline."G0z\<CR>"
+ exe linenum
else
echoerr "***warning*** unable to make directory<".newdirname.">"
endif
@@ -1472,6 +1716,46 @@ fun! <SID>NetMakeDir(usrhost)
endfun
" ---------------------------------------------------------------------
+" NetBookmarkDir:
+" 0: bookmark the current directory
+" 1: change to the bookmarked directory
+fun! <SID>NetBookmarkDir(chg,curdir)
+" call Dfunc("NetBookmarkDir(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count)
+
+ if a:chg == 0
+ " bookmark the current directory
+ let s:netrw_bookmarkdir_{v:count}= a:curdir
+ if !exists("s:bookmarkmax")
+ let s:bookmarkmax= v:count
+ elseif v:count > s:bookmarkmax
+ let s:bookmarkmax= v:count
+ endif
+
+ elseif a:chg == 1
+ " change to the bookmarked directory
+ if exists("s:netrw_bookmarkdir_{v:count}")
+ exe "e ".s:netrw_bookmarkdir_{v:count}
+ else
+ echomsg "Sorry, bookmark#".v:count." doesn't exist!"
+ endif
+
+ elseif exists("s:bookmarkmax")
+ " list bookmarks
+" call Decho("list bookmarks [0,".s:bookmarkmax."]")
+ let cnt= 0
+ while cnt <= s:bookmarkmax
+ if exists("s:netrw_bookmarkdir_{cnt}")
+ echo "Netrw Bookmark#".cnt.": ".s:netrw_bookmarkdir_{cnt}
+" call Decho("Netrw Bookmark#".cnt.": ".s:netrw_bookmarkdir_{cnt})
+ endif
+ let cnt= cnt + 1
+ endwhile
+ endif
+" call Dret("NetBookmarkDir")
+endfun
+
+
+" ---------------------------------------------------------------------
" Browsing Support For Local Directories And Files: {{{1
" ---------------------------------------------------------------------
@@ -1484,131 +1768,154 @@ fun! <SID>LocalBrowse(dirname)
return
endif
-" " unfortunate interaction -- when putting Dfunc/Dret above
- " one can no longer enter the DBG buffer.
-" call Dfunc("LocalBrowse(dirname<".a:dirname.">)")
+ " unfortunate interaction -- when putting debugging calls
+ " above one can no longer enter the DBG buffer.
+" call Dfunc("LocalBrowse(dirname<".a:dirname.">) buf#".bufnr("%")." winnr=".winnr())
+" call Decho("winbufnr1=".winbufnr(1)." winbufnr2=".winbufnr(2)." winbufnr3=".winbufnr(3))
+" call Dredir("ls!")
- exe 'cd '.escape(substitute(a:dirname,'\\','/','ge'),' ')
- let dirname= substitute(getcwd(),'\\','/','ge')."/"
-" call Decho("dirname<".dirname.">")
+ if v:version < 603
+ echoerr "vim version<".v:version."> too old for browsing with netrw"
+" call Dret("LocalBrowse : vim version<".v:version."> too old")
+ return
+ endif
+
+ " record and change current directory
+ let netrw_origdir= s:NetGetcwd(1)
+ exe 'cd '.escape(substitute(a:dirname,'\\','/','ge'),s:netrw_cd_escape)
+ let dirname= s:NetGetcwd(0)
+" call Decho("dirname<".dirname."> buf#".bufnr("%")." winnr=".winnr())
" make this buffer modifiable
setlocal ma
- " ---------------------------------------------------------------------
+ " ---------------------------
" Perform Directory Listing:
" call Decho("Perform directory listing...")
" set up new buffer and map
- let dirnamenr = bufnr(dirname)
- if dirnamenr != -1 && bufname(dirnamenr) != dirname
- " try removing the trailing "/"
- let dirnamenr= bufnr(substitute(dirname,'/$','','e'))
+ " remove the trailing "/"
+ let dirnamens= substitute(dirname,'/$','','e')
+ let dirnamenr= bufnr(dirnamens.'$')
+" call Decho("dirnamenr= bufnr(".dirnamens.")=".dirnamenr)
+
+ if dirnamenr != 0 && bufname(dirnamenr) != dirnamens
+ " try keeping the trailing slash
+ let dirnamenr = bufnr(dirname.'$')
+" call Decho("retry: dirnamenr= bufnr(".dirname.")=".dirnamenr)
endif
" call Decho("bufnr(dirname<".dirname.">)=".dirnamenr)
-" call Dredir("file")
- if dirnamenr != -1 && bufexists(dirname)
+ if dirnamenr != -1
" buffer already exists (hidden), so switch to it!
-" call Dredir("file")
+" call Decho("buffer already exists: dirnamenr=".dirnamenr." dirname<".dirname."> pre-exists")
+" call Dredir("ls!")
exe "b ".dirnamenr
-" call Dredir("file")
- exe 'cd '.escape(substitute(a:dirname,'\\','/','ge'),' ')
-" call Dredir("file")
+ exe 'silent! cd '.escape(substitute(a:dirname,'\\','/','ge'),s:netrw_cd_escape)
" call Decho("changed directory to<".dirname.">")
-" call Dredir("file")
if a:dirname != "." && line("$") >= 5
-" call Dret("LocalBrowse : buffer already exists with info")
+" call Dret("LocalBrowse : buffer already exists with info, #".dirnamenr)
+ if g:netrw_keepdir | exe 'keepjumps cd '.netrw_origdir | endif
return
endif
-" call Dredir("file")
" call Decho("buffer already exists, but needs listing (buf#".dirnamenr.")")
+ setlocal ma
keepjumps %d
-" call Dredir("file")
- if expand("%:p") != escape(dirname,' ')
- exe 'silent! file '.escape(dirname,' ')
-" call Decho("renamed file to<".escape(dirname,' ').">")
+ if expand("%:p") != dirname
+ exe 'silent! file '.escape(dirname,s:netrw_cd_escape)
+" call Decho("renamed file to<".escape(dirname,' #').">")
endif
-" call Dredir("file")
else
-" call Dredir("ls!")
-" call Decho("generate new buffer named<".escape(dirname,' ').">")
+" call Decho("generate new buffer named<".escape(dirname,' #').">")
silent! enew!
- exe 'silent! file '.escape(dirname,' ')
-" call Decho("renamed file to<".escape(dirname,' ').">")
+ exe 'silent! file '.substitute(escape(dirname,s:netrw_cd_escape),'/$','','e')
+" call Decho("renamed file to<".escape(dirname,s:netrw_cd_escape).">")
endif
" set standard browser options on buffer
setlocal ts=32 bt=nowrite bh=hide nobl
" set up all the maps
" call Decho("Setting up local browser maps")
- nnoremap <buffer> <silent> <cr> :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),<SID>NetGetDir()))<cr>
- nnoremap <buffer> <silent> <c-l> :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),'./'))<cr>
- nnoremap <buffer> <silent> - :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),'../'))<cr>
- nnoremap <buffer> <silent> a :let g:netrw_hide=!g:netrw_hide<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),'./'))<cr>
- nnoremap <buffer> <silent> <Leader>h :call <SID>NetHideEdit(1)<cr>
- nnoremap <buffer> <silent> <Leader>m :call <SID>NetMakeDir("")<cr>
+ let b:netrw_curdir= s:NetGetcwd(1)
+ nnoremap <buffer> <silent> <cr> :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))<cr>
+ nnoremap <buffer> <silent> <c-l> :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'))<cr>
+ nnoremap <buffer> <silent> - :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,'../'))<cr>
+ nnoremap <buffer> <silent> a :let g:netrw_hide=!g:netrw_hide<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'))<cr>
+ nnoremap <buffer> <silent> b :<c-u>call <SID>NetBookmarkDir(0,b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> B :<c-u>call <SID>NetBookmarkDir(1,b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> c :exe "cd ".b:netrw_curdir<cr>
+ nnoremap <buffer> <silent> d :call <SID>NetMakeDir("")<cr>
+ nnoremap <buffer> <silent> <c-h> :call <SID>NetHideEdit(1)<cr>
nnoremap <buffer> <silent> i :call <SID>NetLongList(1)<cr>
- nnoremap <buffer> <silent> o :exe g:netrw_winsize."wincmd s"<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),<SID>NetGetDir()))<cr>
- nnoremap <buffer> <silent> r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),<SID>NetGetDir()))<cr>
- nnoremap <buffer> <silent> s :let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),'./'))<cr>
- nnoremap <buffer> <silent> v :exe g:netrw_winsize."wincmd v"<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),<SID>NetGetDir()))<cr>
- nnoremap <buffer> <silent> x :exe "norm! 0"<bar>call <SID>NetBrowseX(<SID>LocalBrowseChgDir(getcwd(),<SID>NetGetDir()),0)<cr>
- nnoremap <buffer> <silent> <2-leftmouse> :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),<SID>NetGetDir()))<cr>
- exe 'nnoremap <buffer> <silent> <del> :exe "norm! 0"<bar>call <SID>LocalBrowseRm("'.getcwd().'/")<cr>'
- exe 'vnoremap <buffer> <silent> <del> :call <SID>LocalBrowseRm("'.getcwd().'/")<cr>'
- exe 'nnoremap <buffer> <silent> D :exe "norm! 0"<bar>call <SID>LocalBrowseRm("'.getcwd().'/")<cr>'
- exe 'vnoremap <buffer> <silent> D :call <SID>LocalBrowseRm("'.getcwd().'/")<cr>'
- exe 'nnoremap <buffer> <silent> R :exe "norm! 0"<bar>call <SID>LocalBrowseRename("'.getcwd().'/")<cr>'
- exe 'vnoremap <buffer> <silent> R :call <SID>LocalBrowseRename("'.getcwd().'/")<cr>'
+ nnoremap <buffer> <silent> o :exe g:netrw_winsize."wincmd s"<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))<cr>
+ nnoremap <buffer> <silent> q :<c-u>call <SID>NetBookmarkDir(2,b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'))<cr>
+ nnoremap <buffer> <silent> s :call <SID>NetSaveWordPosn()<bar>let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'))<bar>call <SID>NetRestoreWordPosn()<cr>
+ nnoremap <buffer> <silent> S :call <SID>NetSortSequence(1)<cr>
+ nnoremap <buffer> <silent> v :exe g:netrw_winsize."wincmd v"<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))<cr>
+ nnoremap <buffer> <silent> x :exe "norm! 0"<bar>call <SID>NetBrowseX(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord(),0),0)<cr>
+ nnoremap <buffer> <silent> <2-leftmouse> :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))<cr>
+ exe 'nnoremap <buffer> <silent> <del> :exe "norm! 0"<bar>call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
+ exe 'vnoremap <buffer> <silent> <del> :call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
+ exe 'nnoremap <buffer> <silent> D :exe "norm! 0"<bar>call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
+ exe 'vnoremap <buffer> <silent> D :call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
+ exe 'nnoremap <buffer> <silent> R :exe "norm! 0"<bar>call <SID>LocalBrowseRename("'.b:netrw_curdir.'")<cr>'
+ exe 'vnoremap <buffer> <silent> R :call <SID>LocalBrowseRename("'.b:netrw_curdir.'")<cr>'
exe 'nnoremap <buffer> <silent> <Leader>m :call <SID>NetMakeDir("")<cr>'
nnoremap <buffer> ? :he netrw-dir<cr>
" Set up the banner
" call Decho("set up banner")
- keepjumps put ='\" ================='
+ keepjumps put ='\" ============================================================================'
keepjumps 1d
- keepjumps put ='\" Directory Listing'
+ keepjumps put ='\" Directory Listing (netrw '.g:loaded_netrw.')'
keepjumps put ='\" '.dirname
- let g:netrw_bannercnt= 6
+ let s:netrw_bannercnt= 7
+
+ let sortby= g:netrw_sort_by
+ if g:netrw_sort_direction =~ "^r"
+ let sortby= sortby." reversed"
+ endif
if g:netrw_sort_by =~ "^n"
" call Decho("directories will be sorted by name")
" sorted by name
- let g:netrw_bannercnt= g:netrw_bannercnt + 1
- keepjumps put ='\" Sorted by '.g:netrw_sort_by
+ let s:netrw_bannercnt= s:netrw_bannercnt + 1
+ keepjumps put ='\" Sorted by '.sortby
keepjumps put ='\" Sort sequence: '.g:netrw_sort_sequence
else
" call Decho("directories will be sorted by size or date")
" sorted by size or date
- keepjumps put ='\" Sorted by '.g:netrw_sort_by
+ keepjumps put ='\" Sorted by '.sortby
endif
if g:netrw_list_hide != "" && g:netrw_hide
keepjumps put ='\" Hiding: '.g:netrw_list_hide
- let g:netrw_bannercnt= g:netrw_bannercnt + 1
+ let s:netrw_bannercnt= s:netrw_bannercnt + 1
endif
- keepjumps put ='\" ================='
+ keepjumps put ='\" Quick Help: ?:help -:go up dir D:delete R:rename s:sort-by x:exec'
+ keepjumps put ='\" ============================================================================'
" generate the requested directory listing
call LocalBrowseList(dirname)
" manipulate the directory listing (hide, sort)
setlocal ft=netrwlist
- if line("$") >= g:netrw_bannercnt
+ if line("$") >= s:netrw_bannercnt
if g:netrw_hide && g:netrw_list_hide != ""
call s:NetrwListHide()
endif
if g:netrw_sort_by =~ "^n"
call s:SetSort()
- exe 'keepjumps silent '.g:netrw_bannercnt.',$call s:NetSort()'
- exe 'keepjumps silent '.g:netrw_bannercnt.',$s/^\d\{3}\///e'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$call s:NetSort()'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$s/^\d\{3}\///e'
else
- exe 'keepjumps silent '.g:netrw_bannercnt.',$call s:NetSort()'
- exe 'keepjumps silent '.g:netrw_bannercnt.',$s/^\d\{-}\///e'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$call s:NetSort()'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$s/^\d\{-}\///e'
endif
endif
- exe g:netrw_bannercnt
+ exe s:netrw_bannercnt
setlocal noma nomod
+ if g:netrw_keepdir | exe 'keepjumps cd '.netrw_origdir | endif
" call Dret("LocalBrowse : file<".expand("%:p").">")
endfun
@@ -1618,8 +1925,15 @@ endfun
fun! LocalBrowseList(dirname)
" call Dfunc("LocalBrowseList(dirname<".a:dirname.">)")
+ let dirname = escape(a:dirname,s:netrw_glob_escape)
let dirnamelen = strlen(a:dirname)
- let filelist = glob(a:dirname."*")."\n".glob(a:dirname.".*")
+ let filelist = glob(dirname."*")
+ if filelist != ""
+ let filelist= filelist."\n"
+ endif
+ let filelist= filelist.glob(dirname.".*")
+" call Decho("dirname<".dirname.">")
+" call Decho("dirnamelen<".dirnamelen.">")
" call Decho("filelist<".filelist.">")
while filelist != ""
@@ -1640,24 +1954,29 @@ fun! LocalBrowseList(dirname)
let fsz = strpart(" ",1,15-strlen(sz)).sz
let pfile= pfile."\t".fsz." ".strftime(g:netrw_timefmt,getftime(file))
endif
+
if g:netrw_sort_by =~ "^t"
" sort by time (handles time up to 1 quintillion seconds, US)
" call Decho("getftime(".file.")=".getftime(file))
let t = getftime(file)
let ft = strpart("000000000000000000",1,18-strlen(t)).t
" call Decho("exe keepjumps put ='".ft.'/'.file."'")
- exe "keepjumps put ='".ft.'/'.pfile."'"
+ let ftpfile= ft.'/'.pfile
+ keepjumps put=ftpfile
+
elseif g:netrw_sort_by =~ "^s"
" sort by size (handles file sizes up to 1 quintillion bytes, US)
" call Decho("getfsize(".file.")=".getfsize(file))
let sz = getfsize(file)
let fsz = strpart("000000000000000000",1,18-strlen(sz)).sz
" call Decho("exe keepjumps put ='".fsz.'/'.file."'")
- exe "keepjumps put ='".fsz.'/'.pfile."'"
+ let fszpfile= fsz.'/'.pfile
+ keepjumps put =fszpfile
+
else
" sort by name
-" call Decho("exe keepjumps put ='".file."'")
- exe "keepjumps put ='".pfile."'"
+" call Decho("exe keepjumps put ='".pfile."'")
+ keepjumps put=pfile
endif
endwhile
@@ -1667,10 +1986,10 @@ endfun
" ---------------------------------------------------------------------
" LocalBrowseChgDir: constructs a new directory based on the current {{{2
" directory and a new directory name
-fun! <SID>LocalBrowseChgDir(dirname,newdir)
-" call Dfunc("LocalBrowseChgDir(dirname<".a:dirname."> newdir<".a:newdir.">)")
+fun! <SID>LocalBrowseChgDir(dirname,newdir,...)
+" call Dfunc("LocalBrowseChgDir(dirname<".a:dirname."> newdir<".a:newdir.">) a:0=".a:0)
- let dirname= substitute(a:dirname,'\\','/','ge')
+ let dirname= substitute(a:dirname,'\\','','ge')
let newdir = a:newdir
if dirname !~ '/$'
@@ -1684,7 +2003,10 @@ fun! <SID>LocalBrowseChgDir(dirname,newdir)
" handling a file
let dirname= dirname.newdir
" call Decho("handling a file: dirname<".dirname.">")
- exe "e ".dirname
+ " this lets NetBrowseX avoid the edit
+ if a:0 < 1
+ exe "e ".escape(dirname,s:netrw_cd_escape)
+ endif
elseif newdir == './'
" refresh the directory list
@@ -1714,14 +2036,28 @@ fun! <SID>LocalBrowseRm(path) range
" call Decho("firstline=".a:firstline." lastline=".a:lastline)
" preparation for removing multiple files/directories
- let ctr= a:firstline
+ let ctr = a:firstline
+ let ret = 0
+ let netrw_origdir = s:NetGetcwd(1)
+ exe 'cd '.b:netrw_curdir
" remove multiple files and directories
while ctr <= a:lastline
- exe ctr
+ exe "keepjumps ".ctr
+
+ " sanity checks
+ if line(".") < s:netrw_bannercnt
+ let ctr= ctr + 1
+ continue
+ endif
+ let curword= s:NetGetWord()
+ if curword == "./" || curword == "../"
+ let ctr= ctr + 1
+ continue
+ endif
norm! 0
- let rmfile= a:path.s:NetGetDir()
+ let rmfile= a:path.curword
" call Decho("rmfile<".rmfile.">")
if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '/$')
@@ -1730,8 +2066,8 @@ fun! <SID>LocalBrowseRm(path) range
let ok= input("Confirm deletion of file<".rmfile."> ","y")
call inputrestore()
if ok == "y"
- call delete(rmfile)
-" call Decho("errcode=".v:shell_error)
+ let ret= delete(rmfile)
+" call Decho("errcode=".v:shell_error." ret=".ret)
endif
else
@@ -1739,10 +2075,11 @@ fun! <SID>LocalBrowseRm(path) range
call inputsave()
let ok= input("Confirm deletion of directory<".rmfile."> ","y")
call inputrestore()
- let rmfile= escape(substitute(rmfile,'/$','','e'),' ')
+ let rmfile= substitute(rmfile,'/$','','e')
if ok == "y"
- call system(g:netrw_local_rmdir." ".rmfile)
+" call Decho("1st attempt: system(".g:netrw_local_rmdir.' "'.rmfile.'")')
+ call system(g:netrw_local_rmdir.' "'.rmfile.'"')
" call Decho("v:shell_error=".v:shell_error)
if v:shell_error != 0
@@ -1769,9 +2106,10 @@ fun! <SID>LocalBrowseRm(path) range
endwhile
" refresh the directory
- let curline= line(".")-1
+ let curline= line(".")
+ if g:netrw_keepdir | exe 'keepjumps cd '.netrw_origdir | endif
" call Decho("refresh the directory")
- call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%"),'./'))
+ call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'))
exe curline
" call Dret("LocalBrowseRm")
@@ -1789,15 +2127,26 @@ fun! <SID>LocalBrowseRename(path) range
while ctr <= a:lastline
exe "keepjumps ".ctr
+ " sanity checks
+ if line(".") < s:netrw_bannercnt
+ let ctr= ctr + 1
+ continue
+ endif
+ let curword= s:NetGetWord()
+ if curword == "./" || curword == "../"
+ let ctr= ctr + 1
+ continue
+ endif
+
norm! 0
- let oldname= a:path.s:NetGetDir()
+ let oldname= a:path.curword
" call Decho("oldname<".oldname.">")
call inputsave()
- let newname= input("Moving ".oldname." to : ",oldname)
+ let newname= input("Moving ".oldname." to : ",substitute(oldname,'/*$','','e'))
call inputrestore()
- let ret= system(g:netrw_local_rename." ".oldname." ".newname)
+ let ret= system(g:netrw_local_rename.' "'.oldname.'" "'.newname.'"')
" call Decho("executing system(".g:netrw_local_rename." ".oldname." ".newname)
let ctr= ctr + 1
@@ -1806,12 +2155,29 @@ fun! <SID>LocalBrowseRename(path) range
" refresh the directory
let curline= line(".")
" call Decho("refresh the directory listing")
- call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%"),'./'))
+ call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'))
exe "keepjumps ".curline
" call Dret("LocalBrowseRename")
endfun
" ---------------------------------------------------------------------
+" NetGetcwd: get the current directory.
+" Change backslashes to forward slashes, if any.
+" If doesc is true, escape certain troublesome characters
+fun! <SID>NetGetcwd(doesc)
+" call Dfunc("NetGetcwd(doesc=".a:doesc.")")
+ let curdir= substitute(getcwd(),'\\','/','ge')
+ if curdir !~ '/$'
+ let curdir= curdir.'/'
+ endif
+ if a:doesc
+ let curdir= escape(curdir,s:netrw_cd_escape)
+ endif
+" call Dret("NetGetcwd <".curdir.">")
+ return curdir
+endfun
+
+" ---------------------------------------------------------------------
" NetMethod: determine method of transfer {{{1
" method == 1: rcp
" 2: ftp + <.netrc>
@@ -1982,7 +2348,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
if userid != ""
let g:netrw_uid= userid
endif
- if has("win32")
+ if has("win32") || has("win95") || has("win64") || has("win16")
" don't let PCs try <.netrc>
let b:netrw_method = 3
endif
@@ -2005,7 +2371,6 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
" call Decho("b:netrw_fname <".b:netrw_fname.">")
" call Dret("NetMethod")
endfun
-" end of NetMethod
" ------------------------------------------------------------------------
" NetUserPass: set username and password for subsequent ftp transfer {{{1
@@ -2036,7 +2401,6 @@ fun! NetUserPass(...)
endif
" call Dret("NetUserPass")
endfun
-" end NetUserPass
" ------------------------------------------------------------------------
" NetOptionSave: save options and set to "standard" form {{{1
@@ -2163,7 +2527,7 @@ endfun
" "files" that satisfy each pattern, putting the priority / in
" front. An "*" pattern handles the default priority.
fun! <SID>SetSort()
-" call Dfunc("SetSort() bannercnt=".g:netrw_bannercnt)
+" call Dfunc("SetSort() bannercnt=".s:netrw_bannercnt)
if g:netrw_longlist
let seqlist = substitute(g:netrw_sort_sequence,'\$','\\%(\t\\|\$\\)','ge')
else
@@ -2195,14 +2559,14 @@ fun! <SID>SetSort()
" call Decho("priority=".priority." spriority<".spriority."> seq<".seq."> seqlist<".seqlist.">")
if seq == '*'
- exe 'keepjumps silent '.g:netrw_bannercnt.',$v/^\d\{3}\//s/^/'.spriority.'/'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$v/^\d\{3}\//s/^/'.spriority.'/'
else
- exe 'keepjumps silent '.g:netrw_bannercnt.',$g/'.eseq.'/s/^/'.spriority.'/'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$g/'.eseq.'/s/^/'.spriority.'/'
endif
let priority = priority + 1
endwhile
- exe 'keepjumps silent '.g:netrw_bannercnt.',$s/^\(\d\{3}\/\)\%(\d\{3}\/\)\+/\1/e'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$s/^\(\d\{3}\/\)\%(\d\{3}\/\)\+/\1/e'
" call Dret("SetSort")
endfun
diff --git a/runtime/scripts.vim b/runtime/scripts.vim
index 1b506b3f6..07d04ff07 100644
--- a/runtime/scripts.vim
+++ b/runtime/scripts.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types in scripts
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last change: 2004 Apr 18
+" Last change: 2004 Sep 02
" This file is called by an autocommand for every file that has just been
" loaded into a buffer. It checks if the type of file can be recognized by
@@ -50,8 +50,8 @@ if s:line1 =~ "^#!"
let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '')
endif
- " Bourne-like shell scripts: sh ksh bash bash2
- if s:name =~ '^\(bash\|bash2\|ksh\|sh\)\>'
+ " Bourne-like shell scripts: bash bash2 ksh ksh93 sh
+ if s:name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>'
call SetFileTypeSH(s:line1) " defined in filetype.vim
" csh scripts
@@ -219,7 +219,7 @@ else
set ft=rcslog
" CVS commit
- elseif s:line2 =~ '^CVS:'
+ elseif s:line2 =~ '^CVS:' || getline("$") =~ '^CVS: '
set ft=cvs
" Send-pr
diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim
index f6e5823b3..089a6fefd 100644
--- a/runtime/synmenu.vim
+++ b/runtime/synmenu.vim
@@ -32,52 +32,53 @@ endfun
" The Start Of The Syntax Menu
an 50.10.100 &Syntax.AB.Aap :cal SetSyn("aap")<CR>
-an 50.10.110 &Syntax.AB.Abaqus :cal SetSyn("abaqus")<CR>
-an 50.10.120 &Syntax.AB.ABC\ music\ notation :cal SetSyn("abc")<CR>
-an 50.10.130 &Syntax.AB.ABEL :cal SetSyn("abel")<CR>
-an 50.10.140 &Syntax.AB.AceDB\ model :cal SetSyn("acedb")<CR>
-an 50.10.150 &Syntax.AB.Ada :cal SetSyn("ada")<CR>
-an 50.10.160 &Syntax.AB.AfLex :cal SetSyn("aflex")<CR>
-an 50.10.170 &Syntax.AB.Altera\ AHDL :cal SetSyn("ahdl")<CR>
-an 50.10.180 &Syntax.AB.Amiga\ DOS :cal SetSyn("amiga")<CR>
-an 50.10.190 &Syntax.AB.AMPL :cal SetSyn("ampl")<CR>
-an 50.10.200 &Syntax.AB.Ant\ build\ file :cal SetSyn("ant")<CR>
-an 50.10.210 &Syntax.AB.ANTLR :cal SetSyn("antlr")<CR>
-an 50.10.220 &Syntax.AB.Apache\ config :cal SetSyn("apache")<CR>
-an 50.10.230 &Syntax.AB.Apache-style\ config :cal SetSyn("apachestyle")<CR>
-an 50.10.240 &Syntax.AB.Applix\ ELF :cal SetSyn("elf")<CR>
-an 50.10.250 &Syntax.AB.Arc\ Macro\ Language :cal SetSyn("aml")<CR>
-an 50.10.260 &Syntax.AB.Arch\ inventory :cal SetSyn("arch")<CR>
-an 50.10.270 &Syntax.AB.ART :cal SetSyn("art")<CR>
-an 50.10.280 &Syntax.AB.ASP\ with\ VBScript :cal SetSyn("aspvbs")<CR>
-an 50.10.290 &Syntax.AB.ASP\ with\ Perl :cal SetSyn("aspperl")<CR>
-an 50.10.300 &Syntax.AB.Assembly.680x0 :cal SetSyn("asm68k")<CR>
-an 50.10.310 &Syntax.AB.Assembly.Flat :cal SetSyn("fasm")<CR>
-an 50.10.320 &Syntax.AB.Assembly.GNU :cal SetSyn("asm")<CR>
-an 50.10.330 &Syntax.AB.Assembly.GNU\ H-8300 :cal SetSyn("asmh8300")<CR>
-an 50.10.340 &Syntax.AB.Assembly.Intel\ IA-64 :cal SetSyn("ia64")<CR>
-an 50.10.350 &Syntax.AB.Assembly.Microsoft :cal SetSyn("masm")<CR>
-an 50.10.360 &Syntax.AB.Assembly.Netwide :cal SetSyn("nasm")<CR>
-an 50.10.370 &Syntax.AB.Assembly.PIC :cal SetSyn("pic")<CR>
-an 50.10.380 &Syntax.AB.Assembly.Turbo :cal SetSyn("tasm")<CR>
-an 50.10.390 &Syntax.AB.Assembly.VAX\ Macro\ Assembly :cal SetSyn("vmasm")<CR>
-an 50.10.400 &Syntax.AB.Assembly.Z-80 :cal SetSyn("z8a")<CR>
-an 50.10.410 &Syntax.AB.Assembly.xa\ 6502\ cross\ assember :cal SetSyn("a65")<CR>
-an 50.10.420 &Syntax.AB.ASN\.1 :cal SetSyn("asn")<CR>
-an 50.10.430 &Syntax.AB.Atlas :cal SetSyn("atlas")<CR>
-an 50.10.440 &Syntax.AB.Automake :cal SetSyn("automake")<CR>
-an 50.10.450 &Syntax.AB.Avenue :cal SetSyn("ave")<CR>
-an 50.10.460 &Syntax.AB.Awk :cal SetSyn("awk")<CR>
-an 50.10.470 &Syntax.AB.AYacc :cal SetSyn("ayacc")<CR>
-an 50.10.490 &Syntax.AB.B :cal SetSyn("b")<CR>
-an 50.10.500 &Syntax.AB.Baan :cal SetSyn("baan")<CR>
-an 50.10.510 &Syntax.AB.BASIC :cal SetSyn("basic")<CR>
-an 50.10.520 &Syntax.AB.BC\ calculator :cal SetSyn("bc")<CR>
-an 50.10.530 &Syntax.AB.BDF\ font :cal SetSyn("bdf")<CR>
-an 50.10.540 &Syntax.AB.BibTeX :cal SetSyn("bib")<CR>
-an 50.10.550 &Syntax.AB.BIND.BIND\ config :cal SetSyn("named")<CR>
-an 50.10.560 &Syntax.AB.BIND.BIND\ zone :cal SetSyn("bindzone")<CR>
-an 50.10.570 &Syntax.AB.Blank :cal SetSyn("blank")<CR>
+an 50.10.110 &Syntax.AB.ABAP/4 :cal SetSyn("abap")<CR>
+an 50.10.120 &Syntax.AB.Abaqus :cal SetSyn("abaqus")<CR>
+an 50.10.130 &Syntax.AB.ABC\ music\ notation :cal SetSyn("abc")<CR>
+an 50.10.140 &Syntax.AB.ABEL :cal SetSyn("abel")<CR>
+an 50.10.150 &Syntax.AB.AceDB\ model :cal SetSyn("acedb")<CR>
+an 50.10.160 &Syntax.AB.Ada :cal SetSyn("ada")<CR>
+an 50.10.170 &Syntax.AB.AfLex :cal SetSyn("aflex")<CR>
+an 50.10.180 &Syntax.AB.Altera\ AHDL :cal SetSyn("ahdl")<CR>
+an 50.10.190 &Syntax.AB.Amiga\ DOS :cal SetSyn("amiga")<CR>
+an 50.10.200 &Syntax.AB.AMPL :cal SetSyn("ampl")<CR>
+an 50.10.210 &Syntax.AB.Ant\ build\ file :cal SetSyn("ant")<CR>
+an 50.10.220 &Syntax.AB.ANTLR :cal SetSyn("antlr")<CR>
+an 50.10.230 &Syntax.AB.Apache\ config :cal SetSyn("apache")<CR>
+an 50.10.240 &Syntax.AB.Apache-style\ config :cal SetSyn("apachestyle")<CR>
+an 50.10.250 &Syntax.AB.Applix\ ELF :cal SetSyn("elf")<CR>
+an 50.10.260 &Syntax.AB.Arc\ Macro\ Language :cal SetSyn("aml")<CR>
+an 50.10.270 &Syntax.AB.Arch\ inventory :cal SetSyn("arch")<CR>
+an 50.10.280 &Syntax.AB.ART :cal SetSyn("art")<CR>
+an 50.10.290 &Syntax.AB.ASP\ with\ VBScript :cal SetSyn("aspvbs")<CR>
+an 50.10.300 &Syntax.AB.ASP\ with\ Perl :cal SetSyn("aspperl")<CR>
+an 50.10.310 &Syntax.AB.Assembly.680x0 :cal SetSyn("asm68k")<CR>
+an 50.10.320 &Syntax.AB.Assembly.Flat :cal SetSyn("fasm")<CR>
+an 50.10.330 &Syntax.AB.Assembly.GNU :cal SetSyn("asm")<CR>
+an 50.10.340 &Syntax.AB.Assembly.GNU\ H-8300 :cal SetSyn("asmh8300")<CR>
+an 50.10.350 &Syntax.AB.Assembly.Intel\ IA-64 :cal SetSyn("ia64")<CR>
+an 50.10.360 &Syntax.AB.Assembly.Microsoft :cal SetSyn("masm")<CR>
+an 50.10.370 &Syntax.AB.Assembly.Netwide :cal SetSyn("nasm")<CR>
+an 50.10.380 &Syntax.AB.Assembly.PIC :cal SetSyn("pic")<CR>
+an 50.10.390 &Syntax.AB.Assembly.Turbo :cal SetSyn("tasm")<CR>
+an 50.10.400 &Syntax.AB.Assembly.VAX\ Macro\ Assembly :cal SetSyn("vmasm")<CR>
+an 50.10.410 &Syntax.AB.Assembly.Z-80 :cal SetSyn("z8a")<CR>
+an 50.10.420 &Syntax.AB.Assembly.xa\ 6502\ cross\ assember :cal SetSyn("a65")<CR>
+an 50.10.430 &Syntax.AB.ASN\.1 :cal SetSyn("asn")<CR>
+an 50.10.440 &Syntax.AB.Atlas :cal SetSyn("atlas")<CR>
+an 50.10.450 &Syntax.AB.Automake :cal SetSyn("automake")<CR>
+an 50.10.460 &Syntax.AB.Avenue :cal SetSyn("ave")<CR>
+an 50.10.470 &Syntax.AB.Awk :cal SetSyn("awk")<CR>
+an 50.10.480 &Syntax.AB.AYacc :cal SetSyn("ayacc")<CR>
+an 50.10.500 &Syntax.AB.B :cal SetSyn("b")<CR>
+an 50.10.510 &Syntax.AB.Baan :cal SetSyn("baan")<CR>
+an 50.10.520 &Syntax.AB.BASIC :cal SetSyn("basic")<CR>
+an 50.10.530 &Syntax.AB.BC\ calculator :cal SetSyn("bc")<CR>
+an 50.10.540 &Syntax.AB.BDF\ font :cal SetSyn("bdf")<CR>
+an 50.10.550 &Syntax.AB.BibTeX :cal SetSyn("bib")<CR>
+an 50.10.560 &Syntax.AB.BIND.BIND\ config :cal SetSyn("named")<CR>
+an 50.10.570 &Syntax.AB.BIND.BIND\ zone :cal SetSyn("bindzone")<CR>
+an 50.10.580 &Syntax.AB.Blank :cal SetSyn("blank")<CR>
an 50.20.100 &Syntax.C.C :cal SetSyn("c")<CR>
an 50.20.110 &Syntax.C.C++ :cal SetSyn("cpp")<CR>
an 50.20.120 &Syntax.C.C# :cal SetSyn("cs")<CR>
@@ -132,12 +133,11 @@ an 50.30.320 &Syntax.DE.Elinks\ config :cal SetSyn("elinks")<CR>
an 50.30.330 &Syntax.DE.Elm\ filter\ rules :cal SetSyn("elmfilt")<CR>
an 50.30.340 &Syntax.DE.Embedix\ Component\ Description :cal SetSyn("ecd")<CR>
an 50.30.350 &Syntax.DE.ERicsson\ LANGuage :cal SetSyn("erlang")<CR>
-an 50.30.360 &Syntax.DE.ESQL-C :cal SetSyn("esqlc")<CR>
-an 50.30.370 &Syntax.DE.Essbase\ script :cal SetSyn("csc")<CR>
-an 50.30.380 &Syntax.DE.Eterm\ config :cal SetSyn("eterm")<CR>
-an 50.30.390 &Syntax.DE.Exim\ conf :cal SetSyn("exim")<CR>
-an 50.30.400 &Syntax.DE.Expect :cal SetSyn("expect")<CR>
-an 50.30.410 &Syntax.DE.Exports :cal SetSyn("exports")<CR>
+an 50.30.360 &Syntax.DE.Essbase\ script :cal SetSyn("csc")<CR>
+an 50.30.370 &Syntax.DE.Eterm\ config :cal SetSyn("eterm")<CR>
+an 50.30.380 &Syntax.DE.Exim\ conf :cal SetSyn("exim")<CR>
+an 50.30.390 &Syntax.DE.Expect :cal SetSyn("expect")<CR>
+an 50.30.400 &Syntax.DE.Exports :cal SetSyn("exports")<CR>
an 50.40.100 &Syntax.FG.Fetchmail :cal SetSyn("fetchmail")<CR>
an 50.40.110 &Syntax.FG.Focus\ Executable :cal SetSyn("focexec")<CR>
an 50.40.120 &Syntax.FG.Focus\ Master :cal SetSyn("master")<CR>
@@ -279,24 +279,23 @@ an 50.80.210 &Syntax.PQ.Pike :cal SetSyn("pike")<CR>
an 50.80.220 &Syntax.PQ.Pine\ RC :cal SetSyn("pine")<CR>
an 50.80.230 &Syntax.PQ.Pinfo\ RC :cal SetSyn("pinfo")<CR>
an 50.80.240 &Syntax.PQ.PL/M :cal SetSyn("plm")<CR>
-an 50.80.250 &Syntax.PQ.PL/SQL :cal SetSyn("plsql")<CR>
-an 50.80.260 &Syntax.PQ.PLP :cal SetSyn("plp")<CR>
-an 50.80.270 &Syntax.PQ.PO\ (GNU\ gettext) :cal SetSyn("po")<CR>
-an 50.80.280 &Syntax.PQ.Postfix\ main\ config :cal SetSyn("pfmain")<CR>
-an 50.80.290 &Syntax.PQ.PostScript.PostScript :cal SetSyn("postscr")<CR>
-an 50.80.300 &Syntax.PQ.PostScript.PostScript\ Printer\ Description :cal SetSyn("ppd")<CR>
-an 50.80.310 &Syntax.PQ.Povray.Povray\ scene\ descr :cal SetSyn("pov")<CR>
-an 50.80.320 &Syntax.PQ.Povray.Povray\ configuration :cal SetSyn("povini")<CR>
-an 50.80.330 &Syntax.PQ.Printcap :cal SetSyn("pcap")<CR>
-an 50.80.340 &Syntax.PQ.Procmail :cal SetSyn("procmail")<CR>
-an 50.80.350 &Syntax.PQ.Product\ Spec\ File :cal SetSyn("psf")<CR>
-an 50.80.360 &Syntax.PQ.Progress :cal SetSyn("progress")<CR>
-an 50.80.370 &Syntax.PQ.Prolog :cal SetSyn("prolog")<CR>
-an 50.80.380 &Syntax.PQ.Purify\ log :cal SetSyn("purifylog")<CR>
-an 50.80.390 &Syntax.PQ.Pyrex :cal SetSyn("pyrex")<CR>
-an 50.80.400 &Syntax.PQ.Python :cal SetSyn("python")<CR>
-an 50.80.420 &Syntax.PQ.Quake :cal SetSyn("quake")<CR>
-an 50.80.430 &Syntax.PQ.Quickfix\ window :cal SetSyn("qf")<CR>
+an 50.80.250 &Syntax.PQ.PLP :cal SetSyn("plp")<CR>
+an 50.80.260 &Syntax.PQ.PO\ (GNU\ gettext) :cal SetSyn("po")<CR>
+an 50.80.270 &Syntax.PQ.Postfix\ main\ config :cal SetSyn("pfmain")<CR>
+an 50.80.280 &Syntax.PQ.PostScript.PostScript :cal SetSyn("postscr")<CR>
+an 50.80.290 &Syntax.PQ.PostScript.PostScript\ Printer\ Description :cal SetSyn("ppd")<CR>
+an 50.80.300 &Syntax.PQ.Povray.Povray\ scene\ descr :cal SetSyn("pov")<CR>
+an 50.80.310 &Syntax.PQ.Povray.Povray\ configuration :cal SetSyn("povini")<CR>
+an 50.80.320 &Syntax.PQ.Printcap :cal SetSyn("pcap")<CR>
+an 50.80.330 &Syntax.PQ.Procmail :cal SetSyn("procmail")<CR>
+an 50.80.340 &Syntax.PQ.Product\ Spec\ File :cal SetSyn("psf")<CR>
+an 50.80.350 &Syntax.PQ.Progress :cal SetSyn("progress")<CR>
+an 50.80.360 &Syntax.PQ.Prolog :cal SetSyn("prolog")<CR>
+an 50.80.370 &Syntax.PQ.Purify\ log :cal SetSyn("purifylog")<CR>
+an 50.80.380 &Syntax.PQ.Pyrex :cal SetSyn("pyrex")<CR>
+an 50.80.390 &Syntax.PQ.Python :cal SetSyn("python")<CR>
+an 50.80.410 &Syntax.PQ.Quake :cal SetSyn("quake")<CR>
+an 50.80.420 &Syntax.PQ.Quickfix\ window :cal SetSyn("qf")<CR>
an 50.90.100 &Syntax.R-Sg.R :cal SetSyn("r")<CR>
an 50.90.110 &Syntax.R-Sg.Radiance :cal SetSyn("radiance")<CR>
an 50.90.120 &Syntax.R-Sg.Ratpoison :cal SetSyn("ratpoison")<CR>
@@ -363,17 +362,20 @@ an 50.100.370 &Syntax.Sh-S.Spyce :cal SetSyn("spyce")<CR>
an 50.100.380 &Syntax.Sh-S.Speedup :cal SetSyn("spup")<CR>
an 50.100.390 &Syntax.Sh-S.Splint :cal SetSyn("splint")<CR>
an 50.100.400 &Syntax.Sh-S.Squid\ config :cal SetSyn("squid")<CR>
-an 50.100.410 &Syntax.Sh-S.SQL.MySQL :cal SetSyn("mysql")<CR>
-an 50.100.420 &Syntax.Sh-S.SQL.SQL :cal SetSyn("sql")<CR>
-an 50.100.430 &Syntax.Sh-S.SQL.SQL\ Forms :cal SetSyn("sqlforms")<CR>
-an 50.100.440 &Syntax.Sh-S.SQL.SQLJ :cal SetSyn("sqlj")<CR>
-an 50.100.450 &Syntax.Sh-S.SQR :cal SetSyn("sqr")<CR>
-an 50.100.460 &Syntax.Sh-S.Ssh.ssh_config :cal SetSyn("sshconfig")<CR>
-an 50.100.470 &Syntax.Sh-S.Ssh.sshd_config :cal SetSyn("sshdconfig")<CR>
-an 50.100.480 &Syntax.Sh-S.Standard\ ML :cal SetSyn("sml")<CR>
-an 50.100.490 &Syntax.Sh-S.Stored\ Procedures :cal SetSyn("stp")<CR>
-an 50.100.500 &Syntax.Sh-S.Strace :cal SetSyn("strace")<CR>
-an 50.100.510 &Syntax.Sh-S.Subversion\ commit :cal SetSyn("svn")<CR>
+an 50.100.410 &Syntax.Sh-S.SQL.ESQL-C :cal SetSyn("esqlc")<CR>
+an 50.100.420 &Syntax.Sh-S.SQL.MySQL :cal SetSyn("mysql")<CR>
+an 50.100.430 &Syntax.Sh-S.SQL.PL/SQL :cal SetSyn("plsql")<CR>
+an 50.100.440 &Syntax.Sh-S.SQL.SQL\ (Oracle) :cal SetSyn("sql")<CR>
+an 50.100.450 &Syntax.Sh-S.SQL.SQL\ Forms :cal SetSyn("sqlforms")<CR>
+an 50.100.460 &Syntax.Sh-S.SQL.SQLJ :cal SetSyn("sqlj")<CR>
+an 50.100.470 &Syntax.Sh-S.SQL.SQL-Informix :cal SetSyn("sqlinformix")<CR>
+an 50.100.480 &Syntax.Sh-S.SQR :cal SetSyn("sqr")<CR>
+an 50.100.490 &Syntax.Sh-S.Ssh.ssh_config :cal SetSyn("sshconfig")<CR>
+an 50.100.500 &Syntax.Sh-S.Ssh.sshd_config :cal SetSyn("sshdconfig")<CR>
+an 50.100.510 &Syntax.Sh-S.Standard\ ML :cal SetSyn("sml")<CR>
+an 50.100.520 &Syntax.Sh-S.Stored\ Procedures :cal SetSyn("stp")<CR>
+an 50.100.530 &Syntax.Sh-S.Strace :cal SetSyn("strace")<CR>
+an 50.100.540 &Syntax.Sh-S.Subversion\ commit :cal SetSyn("svn")<CR>
an 50.110.100 &Syntax.TUV.TADS :cal SetSyn("tads")<CR>
an 50.110.110 &Syntax.TUV.Tags :cal SetSyn("tags")<CR>
an 50.110.120 &Syntax.TUV.TAK.TAK\ compare :cal SetSyn("takcmp")<CR>
diff --git a/runtime/syntax/abap.vim b/runtime/syntax/abap.vim
new file mode 100644
index 000000000..2b1229fa2
--- /dev/null
+++ b/runtime/syntax/abap.vim
@@ -0,0 +1,152 @@
+" Vim ABAP syntax file
+" Language: SAP - ABAP/4
+" Revision: 0.8
+" Maintainer: Marius van Wyk <marius@e.co.za>
+" Last Change: 2004 Aug 30
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" Always ignore case
+syn case ignore
+
+" Symbol Operators
+syn match abapSymbolOperator "[+\-/=<>$]"
+syn match abapSymbolOperator "\*"
+syn match abapSymbolOperator "[<>]="
+syn match abapSymbolOperator "<>"
+syn match abapSymbolOperator "\*\*"
+syn match abapSymbolOperator "[()]"
+syn match abapSymbolOperator "[:,\.]"
+
+" Literals
+syn region abapString matchgroup=abapString start="'" end="'" contains=abapStringEscape
+syn match abapStringEscape contained "''"
+
+syn match abapNumber "-\=\<\d\+\>"
+syn region abapHex matchgroup=abapHex start="X'" end="'"
+
+if version >= 600
+ setlocal iskeyword=-,48-57,_,A-Z,a-z
+else
+ set iskeyword=-,48-57,_,A-Z,a-z
+endif
+
+" ABAP statements
+syn keyword abapStatement ADD ADD-CORRESPONDING ASSIGN AT AUTHORITY-CHECK
+syn keyword abapStatement BACK BREAK-POINT
+syn keyword abapStatement CALL CASE CHECK CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY
+syn keyword abapStatement DATA DEFINE DELETE DESCRIBE DETAIL DIVIDE DIVIDE-CORRESPONDING DO
+syn keyword abapStatement EDITOR-CALL ELSE ELSEIF END-OF-DEFINITION END-OF-PAGE END-OF-SELECTION ENDAT ENDCASE ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDLOOP ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDWHILE EXEC EXPORT EXPORTING EXTRACT
+syn keyword abapStatement FETCH FIELD-GROUPS FIELD-SYMBOLS FIELDS FORM FORMAT FREE FUNCTION FUNCTION-POOL
+syn keyword abapStatement GENERATE GET
+syn keyword abapStatement HIDE
+syn keyword abapStatement IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INPUT INSERT
+syn keyword abapStatement LEAVE LIKE LOAD LOCAL LOOP
+syn keyword abapStatement MESSAGE MODIFY MODULE MOVE MOVE-CORRESPONDING MULTIPLY MULTIPLY-CORRESPONDING
+syn keyword abapStatement NEW-LINE NEW-PAGE NEW-SECTION
+syn keyword abapStatement ON OVERLAY
+syn keyword abapStatement PACK PARAMETERS PERFORM POSITION PRINT-CONTROL PROGRAM PROVIDE PUT
+syn keyword abapStatement RAISE RANGES READ RECEIVE REFRESH REJECT REPLACE REPORT RESERVE RESTORE ROLLBACK
+syn keyword abapStatement SCAN SCROLL SEARCH SELECT SELECT-OPTIONS SELECTION-SCREEN SET SHIFT SKIP SORT SPLIT START-OF-SELECTION STATICS STOP SUBMIT SUBTRACT SUBTRACT-CORRESPONDING SUM SUMMARY SUPPRESS SYNTAX-CHECK SYNTAX-TRACE
+syn keyword abapStatement TABLES TOP-OF-PAGE TRANSFER TRANSLATE TYPE TYPE-POOL TYPE-POOLS TYPES
+syn keyword abapStatement UNPACK UPDATE
+syn keyword abapStatement WHEN WHILE WINDOW WRITE
+
+" More statemets
+syn keyword abapStatement OCCURS STRUCTURE OBJECT PROPERTY
+syn keyword abapStatement CASTING APPEND RAISING VALUE COLOR
+syn keyword abapStatement LINE-SIZE LINE-COUNT MESSAGE-ID
+syn keyword abapStatement CHANGING EXCEPTIONS DEFAULT CHECKBOX COMMENT
+syn keyword abapStatement ID NUMBER FOR DISPLAY-MODE TITLE OUTPUT
+
+" More multi-word statements
+syn match abapStatement "\(\W\|^\)\(WITH\W\+\(HEADER\W\+LINE\|FRAME\|KEY\)\|WITH\)\(\W\|$\)"ms=s+1,me=e-1
+syn match abapStatement "\(\W\|^\)NO\W\+STANDARD\W\+PAGE\W\+HEADING\(\W\|$\)"ms=s+1,me=e-1
+syn match abapStatement "\(\W\|^\)\(EXIT\W\+FROM\W\+STEP\W\+LOOP\|EXIT\)\(\W\|$\)"ms=s+1,me=e-1
+syn match abapStatement "\(\W\|^\)\(BEGIN\W\+OF\W\+\(BLOCK\|LINE\)\|BEGIN\W\+OF\)\(\W\|$\)"ms=s+1,me=e-1
+syn match abapStatement "\(\W\|^\)\(END\W\+OF\W\+\(BLOCK\|LINE\)\|END\W\+OF\)\(\W\|$\)"ms=s+1,me=e-1
+syn match abapStatement "\(\W\|^\)IS\W\+INITIAL\(\W\|$\)"ms=s+1,me=e-1
+syn match abapStatement "\(\W\|^\)NO\W\+INTERVALS\(\W\|$\)"ms=s+1,me=e-1
+syn match abapStatement "\(\W\|^\)SEPARATED\W\+BY\(\W\|$\)"ms=s+1,me=e-1
+syn match abapStatement "\(\W\|^\)\(USING\W\+\(EDIT\W\+MASK\)\|USING\)\(\W\|$\)"ms=s+1,me=e-1
+syn match abapStatement "\(\W\|^\)\(WHERE\W\+\(LINE\)\)\(\W\|$\)"ms=s+1,me=e-1
+syn match abapStatement "\(\W\|^\)RADIOBUTTON\W\+GROUP\(\W\|$\)"ms=s+1,me=e-1
+syn match abapStatement "\(\W\|^\)REF\W\+TO\(\W\|$\)"ms=s+1,me=e-1
+
+" Special ABAP specific tables:
+syn match abapSpecial "\(\W\|^\)\(sy\|\(p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)\(\W\|$\)"ms=s+1,me=e-1
+syn match abapSpecialTables "\(sy\|\(p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)-"me=e-1 contained
+syn match abapSpecial "\(\W\|^\)\w\+-\w\+"ms=s+1 contains=abapSpecialTables
+
+" Pointer
+syn match abapSpecial "<\w\+>"
+
+" Abap constants:
+syn keyword abapSpecial TRUE FALSE NULL SPACE
+
+" Includes
+syn region abapInclude start="include" end="." contains=abapComment
+
+" Types
+syn keyword abapTypes c n i p f d t x
+
+" Atritmitic operators
+syn keyword abapOperator abs sign ceil floor trunc frac acos asin atan cos sin tan
+syn keyword abapOperator cosh sinh tanh exp log log10 sqrt
+
+" String operators
+syn keyword abapOperator strlen xstrlen charlen numofchar dbmaxlen
+
+" Table operators
+syn keyword abapOperator lines
+
+" Table operators (SELECT operators)
+syn keyword abapOperator INTO FROM WHERE GROUP BY HAVING ORDER BY SINGLE
+syn keyword abapOperator APPENDING CORRESPONDING FIELDS OF TABLE
+syn keyword abapOperator LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING
+syn keyword abapOperator EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN
+
+" An error? Not strictly... but cannot think of reason this is intended.
+syn match abapError "\.\."
+
+" Comments
+syn region abapComment start="^\*" end="$" contains=abapTodo
+syn match abapComment "\".*" contains=abapTodo
+syn keyword abapTodo contained TODO NOTE
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_abap_syntax_inits")
+ if version < 508
+ let did_abap_syntax_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ HiLink abapError Error
+ HiLink abapComment Comment
+ HiLink abapInclude Include
+ HiLink abapSpecial Special
+ HiLink abapSpecialTables PreProc
+ HiLink abapSymbolOperator abapOperator
+ HiLink abapOperator Operator
+ HiLink abapStatement Statement
+ HiLink abapString String
+ HiLink abapFloat Float
+ HiLink abapNumber Number
+ HiLink abapHex Number
+
+ delcommand HiLink
+endif
+
+let b:current_syntax = "abap"
+
+" vim: ts=8 sw=2
diff --git a/runtime/syntax/aspvbs.vim b/runtime/syntax/aspvbs.vim
index 502791c75..74bf2a15e 100644
--- a/runtime/syntax/aspvbs.vim
+++ b/runtime/syntax/aspvbs.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Microsoft VBScript Web Content (ASP)
-" Maintainer: Devin Weaver <ktohg@tritarget.com>
-" URL: http://tritarget.com/pub/vim/syntax/aspvbs.vim
-" Last Change: 2003 Apr 25
+" Maintainer: Devin Weaver <ktohg@tritarget.com> (non-functional)
+" URL: http://tritarget.com/pub/vim/syntax/aspvbs.vim (broken)
+" Last Change: 2004 Jul 29
" Version: $Revision$
" Thanks to Jay-Jay <vim@jay-jay.net> for a syntax sync hack, hungarian
" notation, and extra highlighting.
@@ -108,7 +108,7 @@ syn keyword AspVBSMethods contained MoveFile MoveFolder OpenAsTextStream
syn keyword AspVBSMethods contained OpenTextFile Raise Read ReadAll ReadLine Remove
syn keyword AspVBSMethods contained RemoveAll Skip SkipLine Write WriteBlankLines
syn keyword AspVBSMethods contained WriteLine
-syn match AspVBSMethods contained "Response\.\S*"
+syn match AspVBSMethods contained "Response\.\w*"
" Colorize boolean constants:
syn keyword AspVBSMethods contained true false
diff --git a/runtime/syntax/ch.vim b/runtime/syntax/ch.vim
index 2e787c8cc..add739509 100644
--- a/runtime/syntax/ch.vim
+++ b/runtime/syntax/ch.vim
@@ -2,7 +2,7 @@
" Language: Ch
" Maintainer: SoftIntegration, Inc. <info@softintegration.com>
" URL: http://www.softintegration.com/download/vim/syntax/ch.vim
-" Last change: 2004 May 16
+" Last change: 2004 Sep 01
" Created based on cpp.vim
"
" Ch is a C/C++ interpreter with many high level extensions
@@ -26,7 +26,7 @@ endif
" Ch extentions
-syn keyword chStatement new delete this
+syn keyword chStatement new delete this foreach
syn keyword chAccess public private
syn keyword chStorageClass __declspec(global) __declspec(local)
syn keyword chStructure class
diff --git a/runtime/syntax/lex.vim b/runtime/syntax/lex.vim
index 25c423ef5..6c6121efc 100644
--- a/runtime/syntax/lex.vim
+++ b/runtime/syntax/lex.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Lex
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Sep 02, 2003
-" Version: 4
+" Last Change: Jul 28, 2004
+" Version: 5
" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax
"
" Option:
@@ -32,19 +32,22 @@ else
endif
endif
+" --- ========= ---
" --- Lex stuff ---
+" --- ========= ---
"I'd prefer to use lex.* , but it doesn't handle forward definitions yet
syn cluster lexListGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatString,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,lexPatCode,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError
syn cluster lexListPatCodeGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError
" Abbreviations Section
-syn region lexAbbrvBlock start="^\([a-zA-Z_]\+\t\|%{\)" end="^%%$"me=e-2 skipnl nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment
+syn region lexAbbrvBlock start="^\(\h\+\s\|%{\)" end="^\ze%%$" skipnl nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment,lexStartState
syn match lexAbbrv "^\I\i*\s"me=e-1 skipwhite contained nextgroup=lexAbbrvRegExp
syn match lexAbbrv "^%[sx]" contained
syn match lexAbbrvRegExp "\s\S.*$"lc=1 contained nextgroup=lexAbbrv,lexInclude
syn region lexInclude matchgroup=lexSep start="^%{" end="%}" contained contains=ALLBUT,@lexListGroup
syn region lexAbbrvComment start="^\s\+/\*" end="\*/" contains=@Spell
+syn region lexStartState matchgroup=lexAbbrv start="^%\a\+" end="$" contained
"%% : Patterns {Actions}
syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPat,lexPatTag,lexPatComment
@@ -81,15 +84,16 @@ hi def link lexSlashQuote lexPat
hi def link lexBrace lexPat
hi def link lexAbbrvComment lexPatComment
-hi def link lexAbbrv SpecialChar
hi def link lexAbbrvRegExp Macro
+hi def link lexAbbrv SpecialChar
hi def link lexCFunctions Function
hi def link lexMorePat SpecialChar
-hi def link lexPat Function
hi def link lexPatComment Comment
+hi def link lexPat Function
hi def link lexPatString Function
hi def link lexPatTag Special
hi def link lexSep Delimiter
+hi def link lexStartState Statement
let b:current_syntax = "lex"
diff --git a/runtime/syntax/lhaskell.vim b/runtime/syntax/lhaskell.vim
index 250ccfaf2..d6f21ae7c 100644
--- a/runtime/syntax/lhaskell.vim
+++ b/runtime/syntax/lhaskell.vim
@@ -4,7 +4,7 @@
" \begin{code} \end{code} blocks
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
" Original Author: Arthur van Leeuwen <arthurvl@cs.uu.nl>
-" Last Change: 2004 May 16
+" Last Change: 2004 Aug 31
" Version: 1.01
"
" Thanks to Ian Lynagh for thoughtful comments on initial versions and
@@ -82,9 +82,12 @@ endif
if b:lhs_markup == "tex"
if version < 600
source <sfile>:p:h/tex.vim
+ set isk+=_
else
runtime! syntax/tex.vim
unlet b:current_syntax
+ " Tex.vim removes "_" from 'iskeyword', but we need it for Haskell.
+ setlocal isk+=_
endif
endif
diff --git a/runtime/syntax/lua.vim b/runtime/syntax/lua.vim
index 0bcda6202..555372836 100644
--- a/runtime/syntax/lua.vim
+++ b/runtime/syntax/lua.vim
@@ -1,12 +1,10 @@
" Vim syntax file
" Language: Lua 4.0 and Lua 5.0
-" Maintainer: Marcus Aurelius Farias <marcuscf@vant.com.br>
-" First Author: Carlos Augusto Teixeira Mendes <cmendes@inf.puc-rio.br>
-" Last Change: 2003 May 04
+" Maintainer: Marcus Aurelius Farias <marcus.cf 'at' bol.com.br>
+" First Author: Carlos Augusto Teixeira Mendes <cmendes 'at' inf puc-rio br>
+" Last Change: 2004 Aug 29
" Options: lua_version = 4 or 5 [default]
"
-" Still has some syncing problems (long [[strings]])...
-
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
@@ -37,7 +35,7 @@ syn match luaComment "\%^#!.*"
syn region luaParen transparent start='(' end=')' contains=ALLBUT,luaError,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaCondStart,luaBlock,luaRepeatBlock,luaRepeat,luaStatement
syn match luaError ")"
syn match luaError "}"
-syn match luaError "\<\(end\|else\|elseif\|then\|until\|in\)\>"
+syn match luaError "\<\%(end\|else\|elseif\|then\|until\|in\)\>"
" Function declaration
@@ -80,7 +78,7 @@ if lua_version > 4
endif
" Pre processor doesn't exist since Lua 4.0
-" syn match luaPreProc "^\s*$\(debug\|nodebug\|if\|ifnot\|end\|else\|endinput\)\>"
+" syn match luaPreProc "^\s*$\%(debug\|nodebug\|if\|ifnot\|end\|else\|endinput\)\>"
" Strings
syn match luaSpecial contained "\\[\\abfnrtv\'\"[\]]\|\\\d\{,3}"
@@ -92,9 +90,9 @@ syn region luaString2 matchgroup=luaString start=+\[\[+ end=+\]\]+ contains=lu
" integer number
syn match luaNumber "\<[0-9]\+\>"
" floating point number, with dot, optional exponent
-syn match luaFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=\>"
+syn match luaFloat "\<[0-9]\+\.[0-9]*\%(e[-+]\=[0-9]\+\)\=\>"
" floating point number, starting with a dot, optional exponent
-syn match luaFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>"
+syn match luaFloat "\.[0-9]\+\%(e[-+]\=[0-9]\+\)\=\>"
" floating point number, without dot, with exponent
syn match luaFloat "\<[0-9]\+e[-+]\=[0-9]\+\>"
@@ -129,7 +127,7 @@ else
syn keyword luaFunc loadlib loadstring pairs pcall rawequal
syn keyword luaFunc require setfenv setmetatable unpack xpcall
syn keyword luaFunc LUA_PATH _LOADED _REQUIREDNAME
-" Not sure if all these functions need to be highlighted...
+ " Not sure if all these functions need to be highlighted...
syn match luaFunc /coroutine\.create/
syn match luaFunc /coroutine\.resume/
syn match luaFunc /coroutine\.status/
diff --git a/runtime/syntax/maple.vim b/runtime/syntax/maple.vim
index cda7c7516..2fa04577b 100644
--- a/runtime/syntax/maple.vim
+++ b/runtime/syntax/maple.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Maple V (based on release 4)
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Mar 10, 2004
-" Version: 4
+" Last Change: Aug 19, 2004
+" Version: 5
" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax
"
" Package Function Selection: {{{1
@@ -17,6 +17,9 @@
"
" *OR* let mvpkg_all=1
+" This syntax file contains all the keywords and top-level packages of Maple 9.5
+" but only the contents of packages of Maple V Release 4, and the top-level
+" routines of Release 4. <Jacques Carette - carette@mcmaster.ca>
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -70,6 +73,9 @@ if exists("mvpkg_all")
endif
" Parenthesis/curly/brace sanity checker: {{{1
+syn case match
+
+" parenthesis/curly/brace sanity checker
syn region mvZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,mvError,mvBraceError,mvCurlyError
syn region mvZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,mvError,mvBraceError,mvParenError
syn region mvZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,mvError,mvCurlyError,mvParenError
@@ -79,21 +85,47 @@ syn match mvCurlyError "[)\]]" contained
syn match mvParenError "[\]}]" contained
syn match mvComma "[,;:]"
syn match mvSemiError "[;:]" contained
-
-" Maple V Packages, circa Release 4: {{{1
-syn keyword mvPackage DEtools difforms group networks plots stats
-syn keyword mvPackage Galois finance inttrans numapprox plottools student
-syn keyword mvPackage GaussInt genfunc liesymm numtheory powseries sumtools
-syn keyword mvPackage LREtools geometry linalg orthopoly process tensor
-syn keyword mvPackage combinat grobner logic padic simplex totorder
-syn keyword mvPackage combstruct
+syn match mvDcolon "::"
+
+" Maple Packages, updated for Maple 9.5
+syn keyword mvPackage algcurves ArrayTools Cache codegen
+syn keyword mvPackage CodeGeneration CodeTools combinat combstruct
+syn keyword mvPackage ContextMenu CurveFitting DEtools diffalg
+syn keyword mvPackage difforms DiscreteTransforms Domains ExternalCalling
+syn keyword mvPackage FileTools finance GaussInt genfunc
+syn keyword mvPackage geom3d geometry gfun Groebner
+syn keyword mvPackage group hashmset IntegerRelations inttrans
+syn keyword mvPackage LargeExpressions LibraryTools liesymm linalg
+syn keyword mvPackage LinearAlgebra LinearFunctionalSystems LinearOperators
+syn keyword mvPackage ListTools Logic LREtools Maplets
+syn keyword mvPackage MathematicalFunctions MathML Matlab
+syn keyword mvPackage MatrixPolynomialAlgebra MmaTranslator networks
+syn keyword mvPackage numapprox numtheory Optimization OreTools
+syn keyword mvPackage Ore_algebra OrthogonalSeries orthopoly padic
+syn keyword mvPackage PDEtools plots plottools PolynomialIdeals
+syn keyword mvPackage PolynomialTools powseries process QDifferenceEquations
+syn keyword mvPackage RandomTools RationalNormalForms RealDomain RootFinding
+syn keyword mvPackage ScientificConstants ScientificErrorAnalysis simplex
+syn keyword mvPackage Slode SNAP Sockets SoftwareMetrics
+syn keyword mvPackage SolveTools Spread stats StringTools
+syn keyword mvPackage Student student sumtools SumTools
+syn keyword mvPackage tensor TypeTools Units VariationalCalculus
+syn keyword mvPackage VectorCalculus Worksheet XMLTools
" Language Support: {{{1
syn keyword mvTodo contained TODO
-syn region mvString start=+`+ skip=+``+ end=+`+ keepend contains=mvTodo
-syn region mvDelayEval start=+'+ end=+'+ keepend contains=ALLBUT,mvError,mvBraceError,mvCurlyError,mvParenError,mvSemiError
-syn match mvVarAssign "[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:=" contains=mvAssign
-syn match mvAssign ":=" contained
+if exists("g:mapleversion") && g:mapleversion < 9
+ syn region mvString start=+`+ skip=+``+ end=+`+ keepend contains=mvTodo
+ syn region mvDelayEval start=+'+ end=+'+ keepend contains=ALLBUT,mvError,mvBraceError,mvCurlyError,mvParenError,mvSemiError
+ syn match mvVarAssign "[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:=" contains=mvAssign
+ syn match mvAssign ":=" contained
+else
+ syn region mvName start=+`+ skip=+``+ end=+`+ keepend contains=mvTodo
+ syn region mvString start=+"+ skip=+""+ end=+"+ keepend
+ syn region mvDelayEval start=+'+ end=+'+ keepend contains=ALLBUT,mvError,mvBraceError,mvCurlyError,mvParenError
+ syn match mvDelim "[;:]" display
+ syn match mvAssign ":="
+endif
" Lower-Priority Operators: {{{1
syn match mvOper "\."
@@ -120,14 +152,16 @@ syn match mvNumber "[-+]\d\+\.\d*e[-+]\=\d\+" " integer . [integer] e [-+] integ
syn match mvRange "\.\."
" Operators: {{{1
-syn keyword mvOper and not or
+syn keyword mvOper and not or xor implies union intersect subset minus mod
syn match mvOper "<>\|[<>]=\|[<>]\|="
syn match mvOper "&+\|&-\|&\*\|&\/\|&"
syn match mvError "\.\.\."
" MapleV Statements: ? statement {{{1
+
+" MapleV Statements: ? statement
" Split into booleans, conditionals, operators, repeat-logic, etc
-syn keyword mvBool true false
+syn keyword mvBool true false FAIL
syn keyword mvCond elif else fi if then
syn keyword mvRepeat by for in to
@@ -136,15 +170,25 @@ syn keyword mvRepeat do from od while
syn keyword mvSpecial NULL
syn match mvSpecial "\[\]\|{}"
-syn keyword mvStatement Order fail options read save
-syn keyword mvStatement break local point remember stop
-syn keyword mvStatement done mod proc restart with
-syn keyword mvStatement end mods quit return
-syn keyword mvStatement error next
+if exists("g:mapleversion") && g:mapleversion < 9
+ syn keyword mvStatement Order fail options read save
+ syn keyword mvStatement break local point remember stop
+ syn keyword mvStatement done mod proc restart with
+ syn keyword mvStatement end mods quit return
+ syn keyword mvStatement error next
+else
+ syn keyword mvStatement option options read save
+ syn keyword mvStatement break local remember stop
+ syn keyword mvStatement done mod proc restart
+ syn keyword mvStatement end mods quit return
+ syn keyword mvStatement error next try catch
+ syn keyword mvStatement finally assuming global export
+ syn keyword mvStatement module description use
+endif
" Builtin Constants: ? constants {{{1
syn keyword mvConstant Catalan I gamma infinity
-syn keyword mvConstant FAIL Pi
+syn keyword mvConstant Pi
" Comments: DEBUG, if in a comment, is specially highlighted. {{{1
syn keyword mvDebug contained DEBUG
@@ -552,6 +596,7 @@ if version >= 508 || !exists("did_maplev_syntax_inits")
HiLink mvPkg_totorder mvPkgFunc
HiLink mvRange mvOper
HiLink mvSemiError mvError
+ HiLink mvDelim Delimiter
" Maple->Standard Links {{{2
HiLink mvAssign Delimiter
@@ -561,16 +606,19 @@ if version >= 508 || !exists("did_maplev_syntax_inits")
HiLink mvCond Conditional
HiLink mvConstant Number
HiLink mvDelayEval Label
+ HiLink mvDcolon Delimiter
HiLink mvError Error
HiLink mvLibrary Statement
HiLink mvNumber Number
HiLink mvOper Operator
+ HiLink mvAssign Delimiter
HiLink mvPackage Type
HiLink mvPkgFunc Function
HiLink mvPktOption Special
HiLink mvRepeat Repeat
HiLink mvSpecial Special
HiLink mvStatement Statement
+ HiLink mvName String
HiLink mvString String
HiLink mvTodo Todo
diff --git a/runtime/syntax/netrwlist.vim b/runtime/syntax/netrwlist.vim
index 8f3091d06..ae68c91b7 100644
--- a/runtime/syntax/netrwlist.vim
+++ b/runtime/syntax/netrwlist.vim
@@ -1,7 +1,8 @@
" Language : Netrw Remote-Directory Listing Syntax
" Maintainer : Charles E. Campbell, Jr.
-" Last change: Jul 06, 2004
-" Version : 2
+" Last change: Aug 20, 2004
+" Version : 4
+" ---------------------------------------------------------------------
" Syntax Clearing: {{{1
if version < 600
@@ -10,28 +11,39 @@ elseif exists("b:current_syntax")
finish
endif
+" ---------------------------------------------------------------------
" Directory List Syntax Highlighting: {{{1
-syn match netrwDir "^.*/\%(\t\|$\)" contains=netrwClassify
-syn match netrwClassify "[*=|@/]\%(\t\|$\)"
-syn match netrwSymLink "^.*@\%(\t\|$\)" contains=netrwClassify
-syn match netrwComment '".*\%(\t\|$\)' contains=netrwHide,netrwSortBy,netrwSortSeq
-syn match netrwHide '^"\s*Hiding:' skipwhite nextgroup=netrwHidePat
-syn match netrwSlash contained "/"
-syn match netrwHidePat contained "[^,]\+" skipwhite nextgroup=netrwHideSep
-syn match netrwHideSep contained transparent "," skipwhite nextgroup=netrwHidePat
-syn match netrwSortBy contained transparent "Sorted by" skipwhite nextgroup=netrwList
-syn match netrwSortSeq contained transparent "Sort sequence:" skipwhite nextgroup=netrwList
-syn match netrwList contained ".*$" contains=netrwComma
-syn match netrwComma contained ","
+syn cluster NetrwGroup contains=netrwHide,netrwSortBy,netrwSortSeq,netrwQuickHelp,netrwVersion
+syn match netrwDir "^.*/\%(\t\|$\)" contains=netrwClassify
+syn match netrwClassify "[*=|@/]\%(\t\|$\)"
+syn match netrwSymLink "^.*@\%(\t\|$\)" contains=netrwClassify
+syn match netrwComment '".*\%(\t\|$\)' contains=@NetrwGroup
+syn match netrwHide '^"\s*Hiding:' skipwhite nextgroup=netrwHidePat
+syn match netrwSlash contained "/"
+syn match netrwHidePat contained "[^,]\+" skipwhite nextgroup=netrwHideSep
+syn match netrwHideSep contained transparent "," skipwhite nextgroup=netrwHidePat
+syn match netrwSortBy contained transparent "Sorted by" skipwhite nextgroup=netrwList
+syn match netrwSortSeq contained transparent "Sort sequence:" skipwhite nextgroup=netrwList
+syn match netrwList contained ".*$" contains=netrwComma
+syn match netrwComma contained ","
+syn region netrwQuickHelp contained matchgroup=Comment start="Quick Help:\s\+" end="$" contains=netrwHelpCmd keepend
+syn match netrwHelpCmd contained "\S\ze:" skipwhite nextgroup=netrwCmdSep
+syn match netrwCmdSep contained ":" nextgroup=netrwCmdNote
+syn match netrwCmdNote contained ".\{-}\ze "
+syn match netrwVersion contained "(netrw.*)"
+" ---------------------------------------------------------------------
" Highlighting Links: {{{1
if !exists("did_drchip_dbg_syntax")
let did_drchip_netrwlist_syntax= 1
hi link netrwClassify Function
+ hi link netrwCmdSep Delimiter
hi link netrwComment Comment
hi link netrwDir Directory
- hi link netrwHidePat String
- hi link netrwList String
+ hi link netrwHelpCmd Function
+ hi link netrwHidePat Statement
+ hi link netrwList Statement
+ hi link netrwVersion Identifier
hi link netrwSymLink Special
hi link netrwComma netrwComment
@@ -40,4 +52,5 @@ endif
" Current Syntax: {{{1
let b:current_syntax = "netrwlist"
+" ---------------------------------------------------------------------
" vim: ts=8 fdm=marker
diff --git a/runtime/syntax/perl.vim b/runtime/syntax/perl.vim
index 438872918..327cc11fd 100644
--- a/runtime/syntax/perl.vim
+++ b/runtime/syntax/perl.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Perl
" Maintainer: Nick Hibma <n_hibma@van-laarhoven.org>
-" Last Change: 2004 May 16
+" Last Change: 2004 Aug 29
" Location: http://www.van-laarhoven.org/vim/syntax/perl.vim
"
" Please download most recent version first before mailing
@@ -17,8 +17,8 @@
" perl syntax highlighting, with defaults given:
"
" unlet perl_include_pod
-" unlet perl_want_scope_in_variables
-" unlet perl_extended_vars
+" unlet perl_no_scope_in_variables
+" unlet perl_no_extended_vars
" unlet perl_string_as_statement
" unlet perl_no_sync_on_sub
" unlet perl_no_sync_on_global_var
@@ -147,16 +147,11 @@ syn match perlVarSlash "$/"
" And plain identifiers
syn match perlPackageRef "\(\h\w*\)\=\(::\|'\)\I"me=e-1 contained
-" To highlight packages in variables as a scope reference - i.e. in $pack::var,
-" pack:: is a scope, just set "perl_want_scope_in_variables"
-" If you *want* complex things like @{${"foo"}} to be processed,
-" just set the variable "perl_extended_vars"...
-
" FIXME value between {} should be marked as string. is treated as such by Perl.
" At the moment it is marked as something greyish instead of read. Probably todo
" with transparency. Or maybe we should handle the bare word in that case. or make it into
-if exists("perl_want_scope_in_variables")
+if !exists("perl_no_scope_in_variables")
syn match perlVarPlain "\\\=\([@%$]\|\$#\)\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
syn match perlFunctionName "\\\=&\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember
else
@@ -164,7 +159,7 @@ else
syn match perlFunctionName "\\\=&\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" nextgroup=perlVarMember,perlVarSimpleMember
endif
-if exists("perl_extended_vars")
+if !exists("perl_no_extended_vars")
syn cluster perlExpr contains=perlStatementScalar,perlStatementRegexp,perlStatementNumeric,perlStatementList,perlStatementHash,perlStatementFiles,perlStatementTime,perlStatementMisc,perlVarPlain,perlVarNotInMatches,perlVarSlash,perlVarBlock,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ
syn region perlVarBlock matchgroup=perlVarPlain start="\($#\|[@%$]\)\$*{" skip="\\}" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember
syn region perlVarBlock matchgroup=perlVarPlain start="&\$*{" skip="\\}" end="}" contains=@perlExpr
@@ -359,7 +354,7 @@ syn region perlFunction start="\s*\<sub\>" end="[;{]"he=e-1 contains=perlStatem
syn keyword perlStatementSub sub contained
syn match perlFunctionPrototype "([^)]*)" contained
-if exists("perl_want_scope_in_variables")
+if !exists("perl_no_scope_in_variables")
syn match perlFunctionPRef "\h\w*::" contained
syn match perlFunctionName "\h\w*[^:]" contained
else
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index c8f6ee0ac..f8624aec4 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -2,11 +2,11 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
-" Last Change: Apr 28, 2004
-" Version: 68
+" Last Change: Jul 26, 2004
+" Version: 69
" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax
"
-" Using the following VIM variables:
+" Using the following VIM variables: {{{1
" b:is_kornshell if defined, enhance with kornshell syntax
" b:is_bash if defined, enhance with bash syntax
" is_kornshell if neither b:is_kornshell or b:is_bash is
@@ -20,7 +20,7 @@
"
" This file includes many ideas from Éric Brunet (eric.brunet@ens.fr)
-" For version 5.x: Clear all syntax items
+" For version 5.x: Clear all syntax items {{{1
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
@@ -28,6 +28,7 @@ elseif exists("b:current_syntax")
finish
endif
+" handling /bin/sh with is_kornshell/is_sh {{{1
" b:is_sh is set when "#! /bin/sh" is found;
" However, it often is just a masquerade by bash (typically Linux)
" or kornshell (typically workstations with Posix "sh").
@@ -57,7 +58,7 @@ endif
" sh syntax is case sensitive
syn case match
-" Clusters: contains=@... clusters
+" Clusters: contains=@... clusters {{{1
"==================================
syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseSingleQuote,shCaseDoubleQuote,shSpecial
syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,bkshFunction,shSpecial
@@ -79,7 +80,7 @@ syn cluster shSubShList contains=@shCaseList
syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shDoubleQuote,shExpr,shExpr,shNumber,shOperator,shSingleQuote,shSpecial,shTestOpr
-" Echo:
+" Echo: {{{1
" ====
" This one is needed INSIDE a CommandSub, so that `echo bla` be correct
syn region shEcho matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList
@@ -88,7 +89,7 @@ syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup
" This must be after the strings, so that bla \" be correct
syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=shNumber,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shSpecial,shOperator,shDoubleQuote,shCharClass
-" Alias:
+" Alias: {{{1
" =====
if exists("b:is_kornshell") || exists("b:is_bash")
syn match shStatement "\<alias\>"
@@ -96,8 +97,8 @@ if exists("b:is_kornshell") || exists("b:is_bash")
syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\w\+=\)\@=" skip="\\$" end="="
endif
-" Error Codes
-" ===========
+" Error Codes: {{{1
+" ============
syn match shDoError "\<done\>"
syn match shIfError "\<fi\>"
syn match shInError "\<in\>"
@@ -110,25 +111,25 @@ if exists("b:is_kornshell")
endif
syn match shTestError "]"
-" Options interceptor
-" ===================
+" Options Interceptor: {{{1
+" ====================
syn match shOption "\s[\-+][a-zA-Z0-9]\+\>"ms=s+1
syn match shOption "\s--\S\+"ms=s+1
-" Operators:
-" =========
+" Operators: {{{1
+" ==========
syn match shOperator "[!&;|]"
syn match shOperator "\[[[^:]\|\]]"
syn match shOperator "!\==" skipwhite nextgroup=shPattern
syn match shPattern "\<\S\+\())\)\@=" contained contains=shSingleQuote,shDoubleQuote,shDeref
-" Subshells:
-" =========
+" Subshells: {{{1
+" ==========
syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2
syn region shSubSh transparent matchgroup=shSubShRegion start="(" end=")" contains=@shSubShList
-" Tests
-"======
+" Tests: {{{1
+"=======
"syn region shExpr transparent matchgroup=shRange start="\[" skip=+\\\\\|\\$+ end="\]" contains=@shTestList
syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$+ end="\]" contains=@shTestList
syn region shExpr transparent matchgroup=shStatement start="\<test\>" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1
@@ -138,12 +139,12 @@ if exists("b:is_kornshell") || exists("b:is_bash")
syn region shDblParen matchgroup=Delimiter start="((" skip=+\\\\\|\\$+ end="))" contains=@shTestList
endif
-" Character Class in Range
-" ========================
+" Character Class In Range: {{{1
+" =========================
syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|tab\):\]"
-" Loops: do, if, while, until
-" =====
+" Loops: do, if, while, until {{{1
+" ======
syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
syn region shIf transparent matchgroup=shConditional start="\<if\>" matchgroup=shConditional end="\<;\_s*then\>" end="\<fi\>" contains=@shLoopList,shDblBrace,shDblParen
syn region shFor matchgroup=shLoop start="\<for\>" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen
@@ -157,7 +158,7 @@ else
syn region shRepeat matchgroup=shLoop start="\<until\>" end="\<do\>"me=e-2 contains=@shLoopList
endif
-" Case: case...esac
+" Case: case...esac {{{1
" ====
syn match shCaseBar contained skipwhite "[^|"`'()]\{-}|"hs=e nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseSingleQuote,shCaseDoubleQuote
syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar
@@ -168,11 +169,12 @@ syn region shCaseSingleQuote matchgroup=shOperator start=+'+ skip=+\\\\\|\\.+ e
syn region shCaseDoubleQuote matchgroup=shOperator start=+"+ skip=+\\\\\|\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
syn region shCaseCommandSub start=+`+ skip=+\\\\\|\\.+ end=+`+ contains=@shCommandSubList skipwhite skipnl nextgroup=shCaseBar contained
-" Misc
-"=====
+" Misc: {{{1
+"======
syn match shWrapLineOperator "\\$"
syn region shCommandSub start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList
+" $() and $(()): {{{1
" $(..) is not supported by sh (Bourne shell). However, apparently
" some systems (HP?) have as their /bin/sh a (link to) Korn shell
" (ie. Posix compliant shell). /bin/ksh should work for those
@@ -205,8 +207,8 @@ syn match shSource "^\.\s"
syn match shSource "\s\.\s"
syn region shColon start="^\s*:" end="$\|" end="#"me=e-1 contains=@shColonList
-" String and Character constants
-"===============================
+" String And Character Constants: {{{1
+"================================
syn match shNumber "-\=\<\d\+\>"
syn match shSpecial "\\\d\d\d\|\\[abcfnrtv0]" contained
syn region shSingleQuote matchgroup=shOperator start=+'+ end=+'+ contains=shStringSpecial
@@ -214,20 +216,21 @@ syn region shDoubleQuote matchgroup=shOperator start=+"+ skip=+\\"+ end=+"+ con
syn match shStringSpecial "[^[:print:]]" contained
syn match shSpecial "\\[\\\"\'`$()#]"
-" Comments
-"=========
+" Comments: {{{1
+"==========
syn cluster shCommentGroup contains=shTodo,@Spell
syn keyword shTodo contained TODO
syn match shComment "#.*$" contains=@shCommentGroup
-" File redirection highlighted as operators
-"==========================================
+" File Redirection Highlighted As Operators: {{{1
+"===========================================
syn match shRedir "\d\=>\(&[-0-9]\)\="
syn match shRedir "\d\=>>-\="
syn match shRedir "\d\=<\(&[-0-9]\)\="
syn match shRedir "\d<<-\="
-" Shell Input Redirection (Here Documents)
+" Here Documents: {{{1
+" =========================================
if version < 600
syn region shHereDoc matchgroup=shRedir start="<<\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir end="^END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shRedir start="<<-\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir end="^\s*END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
@@ -298,13 +301,16 @@ else
syn match shBeginLine ".*$" contained skipnl nextgroup=shHerePayload contains=@shCommandSubList
syn match shBeginHere "<<-\=\s*\S\+" contained nextgroup=shBeginLine
endif
- if exists("b:is_bash")
- syn match shRedir "<<<"
- endif
endif
-" Identifiers
-"============
+" Here Strings: {{{1
+" =============
+if exists("b:is_bash")
+ syn match shRedir "<<<"
+endif
+
+" Identifiers: {{{1
+"=============
syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shSetIdentifier
syn match shIdWhiteSpace contained "\s"
syn match shSetIdentifier contained "=" nextgroup=shPattern,shDeref,shDerefSimple,shDoubleQuote,shSingleQuote
@@ -321,6 +327,7 @@ else
syn match shStatement "\<\(set\|export\|unset\)$"
endif
+" Functions: {{{1
" handles functions which start: Function () {
" Apparently Bourne shell accepts functions too,
" even though it isn't documented by my man pages
@@ -335,8 +342,8 @@ syn match bkshFunction "^\s*\<\h\w*\>\s*()" skipwhite skipnl contains=bkshFuncti
syn match bkshFunctionParen "[()]" contained
syn match bkshFunctionDelim "[{}]" contained
-" Parameter Dereferencing
-" =======================
+" Parameter Dereferencing: {{{1
+" ========================
syn match shDerefSimple "\$\w\+"
syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray
syn match shDerefWordError "[^}$[]" contained
@@ -346,8 +353,8 @@ if exists("b:is_bash") || exists("b:is_kornshell")
syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList
endif
-" bash : ${!prefix*}
-" bash : ${#parameter}
+" bash: ${!prefix*} and ${#parameter}: {{{1
+" ====================================
if exists("b:is_bash")
syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOp
syn match shDerefVar contained "{\@<=!\w\+" nextgroup=@shDerefVarList
@@ -357,9 +364,10 @@ syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefO
syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp
syn match shDerefVar contained "{\@<=\w\+" nextgroup=@shDerefVarList
-" sh ksh bash : ${var[... ]...} array reference
+" sh ksh bash : ${var[... ]...} array reference: {{{1
syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError
+" Special ${parameter OPERATOR word} handling: {{{1
" sh ksh bash : ${parameter:-word} word is default value
" sh ksh bash : ${parameter:=word} assign word as default value
" sh ksh bash : ${parameter:?word} display word if parameter is null
@@ -395,15 +403,20 @@ if exists("b:is_bash")
syn match shDerefPatString contained "[^}]\{1,}"
endif
-" A bunch of useful sh keywords
+" Useful sh Keywords: {{{1
+" ===================
syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly return shift test trap ulimit umask wait
syn keyword shConditional contained elif else then
syn keyword shCondError elif else then
+" Useful ksh Keywords: {{{1
+" ====================
if exists("b:is_kornshell") || exists("b:is_bash")
syn keyword shFunction function
syn keyword shStatement autoload bg false fc fg functions getopts hash history integer jobs let nohup print printf r stop suspend time times true type unalias whence
+" Useful bash Keywords: {{{1
+" =====================
if exists("b:is_bash")
syn keyword shStatement bind builtin dirs disown enable help local logout popd pushd shopt source
else
@@ -411,8 +424,8 @@ if exists("b:is_kornshell") || exists("b:is_bash")
endif
endif
-" Syncs
-" =====
+" Synchronization: {{{1
+" ================
if !exists("sh_minlines")
let sh_minlines = 200
endif
@@ -431,7 +444,8 @@ syn sync match shIfSync groupthere shIf "\<fi\>"
syn sync match shUntilSync grouphere shRepeat "\<until\>"
syn sync match shWhileSync grouphere shRepeat "\<while\>"
-" The default highlighting.
+" Default Highlighting: {{{1
+" =====================
hi def link shArithRegion shShellVariables
hi def link shCaseBar shConditional
hi def link shCaseIn shConditional
@@ -525,8 +539,8 @@ hi def link shString String
hi def link shTodo Todo
hi def link shAlias Identifier
-" Current Syntax
-" ==============
+" Set Current Syntax: {{{1
+" ===================
if exists("b:is_bash")
let b:current_syntax = "bash"
elseif exists("b:is_kornshell")
@@ -535,4 +549,4 @@ else
let b:current_syntax = "sh"
endif
-" vim: ts=16
+" vim: ts=16 fdm=marker
diff --git a/runtime/syntax/sqlinformix.vim b/runtime/syntax/sqlinformix.vim
new file mode 100644
index 000000000..b4d023600
--- /dev/null
+++ b/runtime/syntax/sqlinformix.vim
@@ -0,0 +1,196 @@
+" Vim syntax file
+" Informix Structured Query Language (SQL) and Stored Procedure Language (SPL)
+" Language: SQL, SPL (Informix Dynamic Server 2000 v9.2)
+" Maintainer: Dean Hill <dhill@hotmail.com>
+" Last Change: 2004 Aug 30
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+syn case ignore
+
+
+
+" === Comment syntax group ===
+syn region sqlComment start="{" end="}" contains=sqlTodo
+syn match sqlComment "--.*$" contains=sqlTodo
+syn sync ccomment sqlComment
+
+
+
+" === Constant syntax group ===
+" = Boolean subgroup =
+syn keyword sqlBoolean true false
+syn keyword sqlBoolean null
+syn keyword sqlBoolean public user
+syn keyword sqlBoolean current today
+syn keyword sqlBoolean year month day hour minute second fraction
+
+" = String subgroup =
+syn region sqlString start=+"+ end=+"+
+syn region sqlString start=+'+ end=+'+
+
+" = Numbers subgroup =
+syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>"
+
+
+
+" === Statement syntax group ===
+" SQL
+syn keyword sqlStatement allocate alter
+syn keyword sqlStatement begin
+syn keyword sqlStatement close commit connect create
+syn keyword sqlStatement database deallocate declare delete describe disconnect drop
+syn keyword sqlStatement execute fetch flush free get grant info insert
+syn keyword sqlStatement load lock open output
+syn keyword sqlStatement prepare put
+syn keyword sqlStatement rename revoke rollback select set start stop
+syn keyword sqlStatement truncate unload unlock update
+syn keyword sqlStatement whenever
+" SPL
+syn keyword sqlStatement call continue define
+syn keyword sqlStatement exit
+syn keyword sqlStatement let
+syn keyword sqlStatement return system trace
+
+" = Conditional subgroup =
+" SPL
+syn keyword sqlConditional elif else if then
+syn keyword sqlConditional case
+" Highlight "end if" with one or more separating spaces
+syn match sqlConditional "end \+if"
+
+" = Repeat subgroup =
+" SQL/SPL
+" Handle SQL triggers' "for each row" clause and SPL "for" loop
+syn match sqlRepeat "for\( \+each \+row\)\="
+" SPL
+syn keyword sqlRepeat foreach while
+" Highlight "end for", etc. with one or more separating spaces
+syn match sqlRepeat "end \+for"
+syn match sqlRepeat "end \+foreach"
+syn match sqlRepeat "end \+while"
+
+" = Exception subgroup =
+" SPL
+syn match sqlException "on \+exception"
+syn match sqlException "end \+exception"
+syn match sqlException "end \+exception \+with \+resume"
+syn match sqlException "raise \+exception"
+
+" = Keyword subgroup =
+" SQL
+syn keyword sqlKeyword aggregate add as authorization autofree by
+syn keyword sqlKeyword cache cascade check cluster collation
+syn keyword sqlKeyword column connection constraint cross
+syn keyword sqlKeyword dataskip debug default deferred_prepare
+syn keyword sqlKeyword descriptor diagnostics
+syn keyword sqlKeyword each escape explain external
+syn keyword sqlKeyword file foreign fragment from function
+syn keyword sqlKeyword group having
+syn keyword sqlKeyword immediate index inner into isolation
+syn keyword sqlKeyword join key
+syn keyword sqlKeyword left level log
+syn keyword sqlKeyword mode modify mounting new no
+syn keyword sqlKeyword object of old optical option
+syn keyword sqlKeyword optimization order outer
+syn keyword sqlKeyword pdqpriority pload primary procedure
+syn keyword sqlKeyword references referencing release reserve
+syn keyword sqlKeyword residency right role routine row
+syn keyword sqlKeyword schedule schema scratch session set
+syn keyword sqlKeyword statement statistics synonym
+syn keyword sqlKeyword table temp temporary timeout to transaction trigger
+syn keyword sqlKeyword using values view violations
+syn keyword sqlKeyword where with work
+" Highlight "on" (if it's not followed by some words we've already handled)
+syn match sqlKeyword "on \+\(exception\)\@!"
+" SPL
+" Highlight "end" (if it's not followed by some words we've already handled)
+syn match sqlKeyword "end \+\(if\|for\|foreach\|while\|exception\)\@!"
+syn keyword sqlKeyword resume returning
+
+" = Operator subgroup =
+" SQL
+syn keyword sqlOperator not and or
+syn keyword sqlOperator in is any some all between exists
+syn keyword sqlOperator like matches
+syn keyword sqlOperator union intersect
+syn keyword sqlOperator distinct unique
+
+
+
+" === Identifier syntax group ===
+" = Function subgroup =
+" SQL
+syn keyword sqlFunction abs acos asin atan atan2 avg
+syn keyword sqlFunction cardinality cast char_length character_length cos count
+syn keyword sqlFunction exp filetoblob filetoclob hex
+syn keyword sqlFunction initcap length logn log10 lower lpad
+syn keyword sqlFunction min max mod octet_length pow range replace root round rpad
+syn keyword sqlFunction sin sqrt stdev substr substring sum
+syn keyword sqlFunction to_char tan to_date trim trunc upper variance
+
+
+
+" === Type syntax group ===
+" SQL
+syn keyword sqlType blob boolean byte char character clob
+syn keyword sqlType date datetime dec decimal double
+syn keyword sqlType float int int8 integer interval list lvarchar
+syn keyword sqlType money multiset nchar numeric nvarchar
+syn keyword sqlType real serial serial8 smallfloat smallint
+syn keyword sqlType text varchar varying
+
+
+
+" === Todo syntax group ===
+syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE
+
+
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_sql_syn_inits")
+ if version < 508
+ let did_sql_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+
+ " === Comment syntax group ===
+ HiLink sqlComment Comment
+
+ " === Constant syntax group ===
+ HiLink sqlNumber Number
+ HiLink sqlBoolean Boolean
+ HiLink sqlString String
+
+ " === Statment syntax group ===
+ HiLink sqlStatement Statement
+ HiLink sqlConditional Conditional
+ HiLink sqlRepeat Repeat
+ HiLink sqlKeyword Keyword
+ HiLink sqlOperator Operator
+ HiLink sqlException Exception
+
+ " === Identifier syntax group ===
+ HiLink sqlFunction Function
+
+ " === Type syntax group ===
+ HiLink sqlType Type
+
+ " === Todo syntax group ===
+ HiLink sqlTodo Todo
+
+ delcommand HiLink
+endif
+
+let b:current_syntax = "sqlinformix"
diff --git a/runtime/syntax/synload.vim b/runtime/syntax/synload.vim
index f816bc2d2..652cdba82 100644
--- a/runtime/syntax/synload.vim
+++ b/runtime/syntax/synload.vim
@@ -1,6 +1,6 @@
" Vim syntax support file
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2001 May 21
+" Last Change: 2004 Aug 28
" This file sets up for syntax highlighting.
" It is loaded from "syntax.vim" and "manual.vim".
@@ -50,15 +50,25 @@ fun! s:SynSet()
if s != ""
" Load the syntax file(s)
-" if has("mac")
-" exe "runtime! syntax:" . s . ".vim"
-" else
- exe "runtime! syntax/" . s . ".vim"
-" endif
+ exe "runtime! syntax/" . s . ".vim"
endif
endfun
+" Handle adding doxygen to other languages (C, C++, IDL)
+au Syntax cpp,c,idl
+ \ if (exists('b:load_doxygen_syntax') && b:load_doxygen_syntax)
+ \ || (exists('g:load_doxygen_syntax') && g:load_doxygen_syntax)
+ \ | runtime syntax/doxygen.vim
+ \ | endif
+
+au Syntax *doxygen
+ \ if exists("b:current_syntax") | finish | endif
+ \ | let syn = substitute(expand("<amatch>"), 'doxygen$', '', '')
+ \ | if syn != '' | exe 'runtime syntax/'.syn.'.vim' | endif
+ \ | if b:current_syntax !~ 'doxygen' | runtime syntax/doxygen.vim | endif
+
+
" Source the user-specified syntax highlighting file
if exists("mysyntaxfile") && filereadable(expand(mysyntaxfile))
execute "source " . mysyntaxfile