summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Filelist1
-rw-r--r--runtime/compiler/checkstyle.vim6
-rw-r--r--runtime/compiler/javac.vim6
-rw-r--r--runtime/compiler/php.vim6
-rw-r--r--runtime/compiler/ruby.vim2
-rw-r--r--runtime/compiler/se.vim6
-rw-r--r--runtime/compiler/tcl.vim6
-rw-r--r--runtime/compiler/tidy.vim6
-rw-r--r--runtime/compiler/xmllint.vim6
-rw-r--r--runtime/doc/Makefile2
-rw-r--r--runtime/doc/change.txt29
-rwxr-xr-xruntime/doc/evim-it.154
-rw-r--r--runtime/doc/if_ole.txt38
-rw-r--r--runtime/doc/index.txt7
-rw-r--r--runtime/doc/insert.txt5
-rw-r--r--runtime/doc/intro.txt4
-rw-r--r--runtime/doc/map.txt4
-rw-r--r--runtime/doc/motion.txt8
-rw-r--r--runtime/doc/options.txt39
-rw-r--r--runtime/doc/pi_netrw.txt62
-rw-r--r--runtime/doc/syntax.txt9
-rw-r--r--runtime/doc/tags15
-rw-r--r--runtime/doc/term.txt17
-rw-r--r--runtime/doc/todo.txt148
-rw-r--r--runtime/doc/version7.txt78
-rwxr-xr-xruntime/doc/vim-it.1558
-rw-r--r--runtime/doc/vim.man51
-rwxr-xr-xruntime/doc/vimdi-it.148
-rwxr-xr-xruntime/doc/vimtu-it.154
-rwxr-xr-xruntime/doc/xxd-it.1402
-rw-r--r--runtime/doc/xxd.153
-rw-r--r--runtime/doc/xxd.man393
-rw-r--r--runtime/filetype.vim5
-rw-r--r--runtime/ftplugin.vim4
-rw-r--r--runtime/ftplugin/lisp.vim16
-rw-r--r--runtime/ftplugin/perl.vim4
-rw-r--r--runtime/ftplugin/scheme.vim27
-rw-r--r--runtime/indent/GenericIndent.vim644
-rw-r--r--runtime/indent/ada.vim22
-rw-r--r--runtime/indent/eiffel.vim2
-rw-r--r--runtime/keymap/sinhala-phonetic_utf-8.vim15
-rw-r--r--runtime/keymap/sinhala.vim3
-rw-r--r--runtime/makemenu.vim4
-rw-r--r--runtime/menu.vim36
-rw-r--r--runtime/optwin.vim4
-rw-r--r--runtime/plugin/NetrwFileHandlers.vim14
-rw-r--r--runtime/plugin/netrw.vim314
-rw-r--r--runtime/synmenu.vim197
-rw-r--r--runtime/syntax/c.vim16
-rw-r--r--runtime/syntax/css.vim4
-rw-r--r--runtime/syntax/debcontrol.vim19
-rw-r--r--runtime/syntax/java.vim11
-rw-r--r--runtime/syntax/javascript.vim65
-rw-r--r--runtime/syntax/lex.vim6
-rw-r--r--runtime/syntax/lynx.vim6
-rw-r--r--runtime/syntax/mailcap.vim6
-rw-r--r--runtime/syntax/maple.vim7
-rw-r--r--runtime/syntax/ratpoison.vim6
-rw-r--r--runtime/syntax/ruby.vim6
-rw-r--r--runtime/syntax/scheme.vim24
-rw-r--r--runtime/syntax/sh.vim9
-rw-r--r--runtime/syntax/sieve.vim70
-rw-r--r--runtime/syntax/tex.vim27
-rw-r--r--runtime/syntax/tidy.vim6
-rw-r--r--runtime/syntax/tpp.vim8
-rw-r--r--runtime/syntax/vim.vim19
-rw-r--r--runtime/syntax/wget.vim6
-rw-r--r--runtime/tutor/tutor.de28
-rw-r--r--src/Make_ro.mak59
-rw-r--r--src/buffer.c19
-rw-r--r--src/eval.c9
-rw-r--r--src/ex_docmd.c70
-rw-r--r--src/ex_eval.c55
-rw-r--r--src/fileio.c5
-rw-r--r--src/fold.c4
-rw-r--r--src/getchar.c20
-rw-r--r--src/gui_gtk_x11.c11
-rw-r--r--src/gui_mac.c37
-rw-r--r--src/gui_w32.c17
-rw-r--r--src/gui_w48.c80
-rw-r--r--src/if_cscope.c2
-rw-r--r--src/if_python.c14
-rw-r--r--src/keymap.h2
-rw-r--r--src/main.c6
-rw-r--r--src/menu.c22
-rw-r--r--src/message.c2
-rw-r--r--src/misc1.c6
-rw-r--r--src/move.c5
-rw-r--r--src/netbeans.c2
-rw-r--r--src/normal.c5
-rw-r--r--src/ops.c9
-rw-r--r--src/option.c47
-rw-r--r--src/option.h21
-rw-r--r--src/os_msdos.c12
-rw-r--r--src/os_unix.c40
-rw-r--r--src/os_win32.c32
-rw-r--r--src/proto/ex_docmd.pro1
-rw-r--r--src/proto/os_unix.pro1
-rw-r--r--src/proto/term.pro1
-rw-r--r--src/screen.c94
-rw-r--r--src/search.c2
-rw-r--r--src/syntax.c9
-rw-r--r--src/tag.c8
-rw-r--r--src/term.c26
-rw-r--r--src/term.h4
-rw-r--r--src/ui.c9
-rw-r--r--src/version.h4
-rw-r--r--src/vim.h25
-rw-r--r--src/window.c6
109 files changed, 3217 insertions, 1369 deletions
diff --git a/Filelist b/Filelist
index 407046472..04fcd25c8 100644
--- a/Filelist
+++ b/Filelist
@@ -449,6 +449,7 @@ RT_ALL = \
runtime/doc/vimdiff.1 \
runtime/doc/vimtutor.1 \
runtime/doc/xxd.1 \
+ runtime/doc/*-it.1 \
runtime/ftoff.vim \
runtime/gvimrc_example.vim \
runtime/macros/README.txt \
diff --git a/runtime/compiler/checkstyle.vim b/runtime/compiler/checkstyle.vim
index 8d696f050..74ab3e421 100644
--- a/runtime/compiler/checkstyle.vim
+++ b/runtime/compiler/checkstyle.vim
@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: Checkstyle
-" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
-" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/checkstyle.vim
-" Last Change: 2004 Mar 27
+" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/checkstyle.vim
+" Last Change: 2004 Nov 27
if exists("current_compiler")
finish
diff --git a/runtime/compiler/javac.vim b/runtime/compiler/javac.vim
index 296f766d6..234e28b62 100644
--- a/runtime/compiler/javac.vim
+++ b/runtime/compiler/javac.vim
@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: javac
-" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
-" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/javac.vim
-" Last Change: 2004 Apr 15
+" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/javac.vim
+" Last Change: 2004 Nov 27
if exists("current_compiler")
finish
diff --git a/runtime/compiler/php.vim b/runtime/compiler/php.vim
index 5dad2710a..2f4f032b9 100644
--- a/runtime/compiler/php.vim
+++ b/runtime/compiler/php.vim
@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: PHP
-" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
-" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/php.vim
-" Last Change: 2004 Sep 05
+" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/php.vim
+" Last Change: 2004 Nov 27
if exists("current_compiler")
finish
diff --git a/runtime/compiler/ruby.vim b/runtime/compiler/ruby.vim
index f124ed3a3..bfb83707a 100644
--- a/runtime/compiler/ruby.vim
+++ b/runtime/compiler/ruby.vim
@@ -10,7 +10,7 @@
"
" Contributors:
" Hugh Sasse <hgs@dmu.ac.uk>
-" Doug Kearns <djkea2@mugca.its.monash.edu.au>
+" Doug Kearns <djkea2@gus.gscit.monash.edu.au>
"
" Todo:
" match error type %m
diff --git a/runtime/compiler/se.vim b/runtime/compiler/se.vim
index ac0aab805..fbfa62da6 100644
--- a/runtime/compiler/se.vim
+++ b/runtime/compiler/se.vim
@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: se (SmartEiffel Compiler)
-" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
-" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/se.vim
-" Last Change: 2004 May 16
+" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/se.vim
+" Last Change: 2004 Nov 27
if exists("current_compiler")
finish
diff --git a/runtime/compiler/tcl.vim b/runtime/compiler/tcl.vim
index 76d3edf12..8bd6de688 100644
--- a/runtime/compiler/tcl.vim
+++ b/runtime/compiler/tcl.vim
@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: tcl
-" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
-" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/tcl.vim
-" Last Change: 2004 Mar 27
+" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/tcl.vim
+" Last Change: 2004 Nov 27
if exists("current_compiler")
finish
diff --git a/runtime/compiler/tidy.vim b/runtime/compiler/tidy.vim
index 36416ebfc..52bc52625 100644
--- a/runtime/compiler/tidy.vim
+++ b/runtime/compiler/tidy.vim
@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: HTML Tidy
-" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
-" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/tidy.vim
-" Last Change: 2004 Mar 27
+" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/tidy.vim
+" Last Change: 2004 Nov 27
" NOTE: set 'tidy_compiler_040800' if you are using the 4th August 2000 release
" of HTML Tidy.
diff --git a/runtime/compiler/xmllint.vim b/runtime/compiler/xmllint.vim
index b7110c719..8fde4e10f 100644
--- a/runtime/compiler/xmllint.vim
+++ b/runtime/compiler/xmllint.vim
@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: xmllint
-" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
-" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/xmllint.vim
-" Last Change: 2004 Mar 27
+" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/xmllint.vim
+" Last Change: 2004 Nov 27
if exists("current_compiler")
finish
diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile
index 8da592c79..94bf805fe 100644
--- a/runtime/doc/Makefile
+++ b/runtime/doc/Makefile
@@ -36,6 +36,7 @@ DOCS = \
help.txt \
howto.txt \
if_cscop.txt \
+ if_mzsch.txt \
if_ole.txt \
if_perl.txt \
if_pyth.txt \
@@ -156,6 +157,7 @@ HTMLS = \
help.html \
howto.html \
if_cscop.html \
+ if_mzsch.html \
if_ole.html \
if_perl.html \
if_pyth.html \
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 4f371f9de..5e45ec7ac 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -1,4 +1,4 @@
-*change.txt* For Vim version 7.0aa. Last change: 2004 Oct 11
+*change.txt* For Vim version 7.0aa. Last change: 2004 Nov 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -350,23 +350,24 @@ CTRL-X Subtract [count] from the number or alphabetic
The CTRL-A and CTRL-X commands work for (signed) decimal numbers, unsigned
octal and hexadecimal numbers and alphabetic characters. This depends on the
'nrformats' option.
-- When 'nrformats' includes "alpha", Vim will change the alphabetic character
- under or after the cursor. This is useful to make lists with an alphabetic
- index.
-- When 'nrformats' includes "hex", Vim assumes numbers starting with '0x' or
- '0X' are hexadecimal. The case of the rightmost letter in the number
- determines the case of the resulting hexadecimal number. If there is no
- letter in the current number, Vim uses the previously detected case.
- When 'nrformats' includes "octal", Vim considers numbers starting with a '0'
to be octal. Other numbers are decimal and may have a preceding minus sign.
If the cursor is on a number, the commands apply to that number; otherwise
Vim uses the number to the right of the cursor.
+- When 'nrformats' includes "hex", Vim assumes numbers starting with '0x' or
+ '0X' are hexadecimal. The case of the rightmost letter in the number
+ determines the case of the resulting hexadecimal number. If there is no
+ letter in the current number, Vim uses the previously detected case.
+- When 'nrformats' includes "alpha", Vim will change the alphabetic character
+ under or after the cursor. This is useful to make lists with an alphabetic
+ index.
For numbers with leading zeros (including all octal and hexadecimal numbers),
Vim preserves the number of characters in the number when possible. CTRL-A on
-"0077" results in "0100", CTRL-X on "0x100" results in "0x0ff". Note that
-when 'nrformats' includes "octal", decimal numbers with leading zeros are
-impossible because they are indistinguishable from octal numbers.
+"0077" results in "0100", CTRL-X on "0x100" results in "0x0ff".
+
+Note that when 'nrformats' includes "octal", decimal numbers with leading
+zeros are impossible because they are indistinguishable from octal numbers.
The CTRL-A command is very useful in a macro. Example: Use the following
steps to make a numbered list.
@@ -863,8 +864,10 @@ inside of strings can change! Also see 'softtabstop' option. >
*<MiddleMouse>*
["x]<MiddleMouse> Put the text from a register before the cursor [count]
times. Uses the "* register, unless another is
- specified. Using the mouse only works when 'mouse'
- contains 'n' or 'a'.
+ specified.
+ Leaves the cursor at the end of the new text.
+ Using the mouse only works when 'mouse' contains 'n'
+ or 'a'.
{not in Vi}
If you have a scrollwheel and often accidentally paste
text, you can use these mappings to disable the
diff --git a/runtime/doc/evim-it.1 b/runtime/doc/evim-it.1
new file mode 100755
index 000000000..644f793bb
--- /dev/null
+++ b/runtime/doc/evim-it.1
@@ -0,0 +1,54 @@
+.TH EVIM 1 "16 febbraio 2002 "
+.SH NOME
+evim \- Vim "facile", Vim impostato in modo da poter essere usato
+facilmente per modificare file, anche da chi non abbia familiarità
+con i comandi.
+.SH SINTASSI
+.br
+.B evim
+[opzioni] [file ..]
+.br
+.B eview
+.SH DESCRIZIONE
+.B evim
+Inizia
+.B Vim
+e imposta le opzioni per farlo comportare come un editore "modeless".
+State sempre usando Vim, ma come un editore "posizionati-e-clicca".
+Simile all'uso di Notepad in MS-Windows.
+.B evim
+richiede la presenza della GUI, per avere a disposizione menu e barra
+strumenti.
+.PP
+Da usarsi solo da parte di chi non è in grado di lavorare con Vim nella
+maniera usuale.
+La modifica file sarà molto meno efficiente.
+.PP
+.B eview
+come sopra, ma parte in modalità "Sola Lettura". Funziona come evim -R.
+.PP
+Vedere vim(1) per dettagli riguardo a Vim, opzioni, etc.
+.PP
+L'opzione 'insertmode' è impostata per poter immettere del testo direttamente.
+.br
+Sono definite delle mappature che consentono di usare COPIA e INCOLLA con i
+familiari tasti usati sotto MS-Windows.
+CTRL-X taglia testo, CTRL-C copia testo e CTRL-V incolla testo.
+Usate CTRL-Q per ottenere quello chs si ottierrebbe con CTRL-V in Vim nativo.
+.SH OPZIONI
+Vedere vim(1).
+.SH FILE
+.TP 15
+/usr/local/lib/vim/evim.vim
+Lo script caricato per inizializzare eVim.
+.SH NAC [NOTO ANCHE COME]
+Noto Anche Come "Vim per semplici".
+Quando usate evim si suppone che prendiate un fazzoletto,
+facciate un nodo ad ogni angolo e ve lo mettiate in testa.
+.SH VEDERE ANCHE
+vim(1)
+.SH AUTORE
+Buona parte di
+.B Vim
+è stato scritto da Bram Moolenaar, con molto aiuto da altri.
+Vedere il Menu "Aiuto/Crediti".
diff --git a/runtime/doc/if_ole.txt b/runtime/doc/if_ole.txt
index 9ced34eca..06e5b42cd 100644
--- a/runtime/doc/if_ole.txt
+++ b/runtime/doc/if_ole.txt
@@ -1,4 +1,4 @@
-*if_ole.txt* For Vim version 7.0aa. Last change: 2003 Jun 19
+*if_ole.txt* For Vim version 7.0aa. Last change: 2004 Dec 09
VIM REFERENCE MANUAL by Paul Moore
@@ -158,5 +158,41 @@ Studio. This is called "VisVim". It is included in the archive that contains
the OLE version. The documentation can be found in the runtime directory, the
README_VisVim.txt file.
+
+Using Vim with Visual Studio .Net~
+
+With .Net you no longer really need VisVim, since .Net studio has support for
+external editors. Follow these directions:
+
+In .Net Studio choose from the menu Tools->External Tools...
+Add
+ Title - Vim
+ Command - c:\vim\vim63\gvim.exe
+ Arguments - --servername VS_NET --remote-silent "+call cursor($(CurLine), $(CurCol))" $(ItemPath)
+ Init Dir - Empty
+
+Now, when you open a file in .Net, you can choose from the .Net menu:
+Tools->Vim
+
+That will open the file in Vim.
+You can then add this external command as an icon and place it anywhere you
+like. You might also be able to set this as your default editor.
+
+If you refine this further, please post back to the Vim maillist so we have a
+record of it.
+
+--servername VS_NET
+This will create a new instance of vim called VS_NET. So if you open multiple
+files from VS, they will use the same instance of Vim. This allows you to
+have multiple copies of Vim running, but you can control which one has VS
+files in it.
+
+--remote-silent "+call cursor(10, 27)"
+ - Places the cursor on line 10 column 27
+In Vim >
+ :h --remote-silent for mor details
+
+[.Net remarks provided by Dave Fishburn and Brian Sturk]
+
==============================================================================
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 62574d4c8..86721d535 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1,4 +1,4 @@
-*index.txt* For Vim version 7.0aa. Last change: 2004 Sep 07
+*index.txt* For Vim version 7.0aa. Last change: 2004 Nov 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -328,8 +328,7 @@ tag char note action in Normal mode ~
characters, repeat the entered text N-1
times
|S| ["x]S 2 delete N lines [into buffer x] and start
- insert; synonym for "^cc" or "0cc",
- depending on autoindent
+ insert; synonym for "cc".
|T| T{char} 1 cursor till after Nth occurrence of {char}
to the left
|U| U 2 undo all latest changes on one line
@@ -425,7 +424,7 @@ tag char note action in Normal mode ~
|<Insert>| <Insert> 2 same as "i"
|<Left>| <Left> 1 same as "h"
|<LeftMouse>| <LeftMouse> 1 move cursor to the mouse click position
-|<MiddleMouse>| <MiddleMouse> 2 same as "P" at the mouse click position
+|<MiddleMouse>| <MiddleMouse> 2 same as "gP" at the mouse click position
|<PageDown>| <PageDown> same as CTRL-F
|<PageUp>| <PageUp> same as CTRL-B
|<Right>| <Right> 1 same as "l"
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index 1b7044801..0bbf86804 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -1,4 +1,4 @@
-*insert.txt* For Vim version 7.0aa. Last change: 2004 Jul 04
+*insert.txt* For Vim version 7.0aa. Last change: 2004 Nov 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -124,6 +124,9 @@ CTRL-R {0-9a-z"%#*+:.-=} *i_CTRL-R*
'-' the last small (less than a line) delete
'=' the expression register: you are prompted to
enter an expression (see |expression|)
+ Note that 0x80 (128 decimal) is used for
+ special keys, use CTRL-R CTRL-R to insert it
+ literally.
See |registers| about registers. {not in Vi}
CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R*
diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt
index 03f7315ba..0d3627c2f 100644
--- a/runtime/doc/intro.txt
+++ b/runtime/doc/intro.txt
@@ -1,4 +1,4 @@
-*intro.txt* For Vim version 7.0aa. Last change: 2004 Oct 08
+*intro.txt* For Vim version 7.0aa. Last change: 2004 Nov 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -350,7 +350,7 @@ and <> are part of what you type, the context should make this clear.
concatenated. For example, {a-zA-Z0-9} is any alphanumeric
character.
- *{motion}*
+ *{motion}* *movement*
{motion} A command that moves the cursor. These are explained in
|motion.txt|. Examples:
w to start of next word
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 8c05ddc76..8cd88549c 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1,4 +1,4 @@
-*map.txt* For Vim version 7.0aa. Last change: 2004 May 21
+*map.txt* For Vim version 7.0aa. Last change: 2004 Dec 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -232,8 +232,6 @@ command line (not a search pattern) the mappings are disabled until a CTRL-^
is typed. The state last used is remembered for Insert mode and Search
patterns separately. The state for Insert mode is also used when typing a
character as an argument to command like "f" or "t".
- When adding a ":lmap" mapping the use of these mappings in Insert mode and
-for Search patterns will be switched on.
Language mappings will never be applied to already mapped characters. They
are only used for typed characters. This assumes that the language mapping
was already done when typing the mapping.
diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt
index 9d149e07f..4f9405fef 100644
--- a/runtime/doc/motion.txt
+++ b/runtime/doc/motion.txt
@@ -1,4 +1,4 @@
-*motion.txt* For Vim version 7.0aa. Last change: 2004 Sep 07
+*motion.txt* For Vim version 7.0aa. Last change: 2004 Nov 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -814,8 +814,8 @@ was made yet in the current file.
area in the current buffer. {not in Vi}.
*''* *``*
-'' `` To the position before latest jump, or where the last
- "m'" or "m`" command was given. Not set when the
+'' `` To the position before the latest jump, or where the
+ last "m'" or "m`" command was given. Not set when the
|:keepjumps| command modifier was used.
Also see |restore-position|.
@@ -1240,7 +1240,7 @@ L To line [count] from bottom of window (default: Last
Cursor is adjusted for 'scrolloff' option.
<LeftMouse> Moves to the position on the screen where the mouse
- click is |inclusive|. See also |<LeftMouse>|. If the
+ click is |exclusive|. See also |<LeftMouse>|. If the
position is in a status line, that window is made the
active window and the cursor is not moved. {not in Vi}
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 769a45c70..a888d92ae 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 Oct 21
+*options.txt* For Vim version 7.0aa. Last change: 2004 Dec 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -139,6 +139,9 @@ example, if Alt-b produces <Esc>b, use this: >
(the ^[ is a real <Esc> here, use CTRL-V <Esc> to enter it)
The advantage over a mapping is that it works in all situations.
+The t_xx options cannot be set from a |modeline| or in the |sandbox|, for
+security reasons.
+
The listing from ":set" looks different from Vi. Long string options are put
at the end of the list. The number of options is quite large. The output of
"set all" probably does not fit on the screen, causing Vim to give the
@@ -953,6 +956,7 @@ A jump table for the options with a short description can be found at |Q_op|.
accidentally overwriting existing files with a backup file. You might
prefer using ".bak", but make sure that you don't have files with
".bak" that you want to keep.
+ Only normal file name characters can be used, "/\*?[|<>" are illegal.
If you like to keep a lot of backups, you could use a BufWritePre
autocommand to change 'backupext' just before writing the file to
@@ -1835,7 +1839,9 @@ A jump table for the options with a short description can be found at |Q_op|.
everything inside quotes is ignored. When matching a
paren inside quotes, it will find the matching one (if
there is one). This works very well for C programs.
- *cpo-star*
+ This flag is also used for other features, such as
+ C-indenting.
+ cpo-star*
* Use ":*" in the same way as ":@". When not included,
":*" is an alias for ":'<,'>", select the Visual area.
*cpo-<*
@@ -2479,6 +2485,7 @@ A jump table for the options with a short description can be found at |Q_op|.
type that is actually stored with the file.
This option is not copied to another buffer, independent of the 's' or
'S' flag in 'cpoptions'.
+ Only normal file name characters can be used, "/\*?[|<>" are illegal.
*'fillchars'* *'fcs'*
'fillchars' 'fcs' string (default "vert:|,fold:-")
@@ -2725,6 +2732,20 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
+ *'fsync'* *'fs'*
+'fsync' 'fs' boolean (default on)
+ global
+ {not in Vi}
+ When on, the library function fsync() will be called after writing a
+ file. This will flush a file to disk, ensuring that it is safely
+ written even on filesystems which do metadata-only journaling. This
+ will force the harddrive to spin up on Linux systems running in laptop
+ mode, so it may be undesirable in some situations. Be warned that
+ turning this off increases the chances of data loss after a crash. On
+ systems without an fsync() implementation, this variable is always
+ off.
+ Also see 'swapsync' for controlling fsync() on swap files.
+
*'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
'gdefault' 'gd' boolean (default off)
global
@@ -2791,6 +2812,7 @@ A jump table for the options with a short description can be found at |Q_op|.
the height of the cursor can be changed. This can be done by
specifying a block cursor, or a percentage for a vertical or
horizontal cursor.
+ For a console the 't_SI' and 't_EI' escape sequences are used.
The option is a comma separated list of parts. Each part consist of a
mode-list and an argument-list:
@@ -3686,6 +3708,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Setting this option to a valid keymap name has the side effect of
setting 'iminsert' to one, so that the keymap becomes effective.
'imsearch' is also set to one, unless it was -1
+ Only normal file name characters can be used, "/\*?[|<>" are illegal.
*'keymodel'* *'km'*
'keymodel' 'km' string (default "")
@@ -3777,6 +3800,7 @@ A jump table for the options with a short description can be found at |Q_op|.
matter what $LANG is set to: >
:set langmenu=nl_NL.ISO_8859-1
< When 'langmenu' is empty, |v:lang| is used.
+ Only normal file name characters can be used, "/\*?[|<>" are illegal.
If your $LANG is set to a non-English language but you do want to use
the English menus: >
:set langmenu=none
@@ -4427,6 +4451,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Using 'patchmode' for compressed files appends the extension at the
end (e.g., "file.gz.orig"), thus the resulting name isn't always
recognized as a compressed file.
+ Only normal file name characters can be used, "/\*?[|<>" are illegal.
*'path'* *'pa'* *E343* *E345* *E347*
'path' 'pa' string (default on Unix: ".,/usr/include,,"
@@ -4537,6 +4562,8 @@ A jump table for the options with a short description can be found at |Q_op|.
feature}
The name of the printer to be used for |:hardcopy|.
See |pdev-option|.
+ This option cannot be set from a |modeline| or in the |sandbox|, for
+ security reasons.
*'printencoding'* *'penc'*
'printencoding' 'penc' String (default empty, except for some systems)
@@ -5647,6 +5674,7 @@ A jump table for the options with a short description can be found at |Q_op|.
systems the swap file will not be written at all. For a unix system
setting it to "sync" will use the sync() call instead of the default
fsync(), which may work better on some systems.
+ The 'fsync' option is used for the actual file.
*'switchbuf'* *'swb'*
'switchbuf' 'swb' string (default "")
@@ -5687,6 +5715,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Syntax autocommand event is triggered with the value as argument.
This option is not copied to another buffer, independent of the 's' or
'S' flag in 'cpoptions'.
+ Only normal file name characters can be used, "/\*?[|<>" are illegal.
*'tabstop'* *'ts'*
'tabstop' 'ts' number (default 8)
@@ -6065,6 +6094,8 @@ A jump table for the options with a short description can be found at |Q_op|.
This option will be used for the window title when exiting Vim if the
original title cannot be restored. Only happens if 'title' is on or
'titlestring' is not empty.
+ This option cannot be set from a |modeline| or in the |sandbox|, for
+ security reasons.
*'titlestring'*
'titlestring' string (default "")
global
@@ -6649,8 +6680,8 @@ A jump table for the options with a short description can be found at |Q_op|.
keys can be mapped.
If the menu is disabled by excluding 'm' from 'guioptions', the ALT
key is never used for the menu.
- In the Win32 version, the <F10> key is handled like this too, since
- Windows uses it to select a menu.
+ This option is not used for <F10>; on Win32 and with GTK <F10> will
+ select the menu, unless it has been mapped.
*'winheight'* *'wh'* *E591*
'winheight' 'wh' number (default 1)
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index 47d0d7e7e..4e8243dcd 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: Sep 13, 2004
+*pi_netrw.txt* For Vim version 6.3. Last change: Oct 08, 2004
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
@@ -536,11 +536,13 @@ from <netrw.vim> itself:
<c-l>......Refreshing the Listing..................|netrw-ctrl-l|
o..........Browsing with a Horizontal Split........|netrw-o|
p..........Preview Window..........................|netrw-p|
- q..........Listing Bookmarks.......................|netrw-q|
+ q..........Listing Bookmarks and History...........|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|
+ u..........Changing to a Predecessor Directory.....|netrw-u|
+ U..........Changing to a Successor Directory.......|netrw-U|
v..........Browsing with a Vertical Split..........|netrw-v|
x..........Customizing Browsing....................|netrw-x|
@@ -751,7 +753,7 @@ EDIT FILE OR DIRECTORY HIDING LIST *netrw-h*
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).
+either be hidden (ie. not shown) or be the only ones displayed (see |netrw-a|).
BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o*
@@ -802,6 +804,22 @@ One may toggle between normal and reverse sorting order by pressing the
"r" key.
+CHANGING TO A PREDECESSOR DIRECTORY *netrw-u*
+
+Every time you change to a new directory (new for the current session),
+netrw will save the directory in a recently-visited directory history
+list (unless g:netrw_dirhistmax is zero; by default, its ten). With the
+"u" map, one can change to an earlier directory (predecessor). To do
+the opposite, see |netrw-U|.
+
+
+CHANGING TO A SUCCESSOR DIRECTORY *netrw-U*
+
+With the "U" map, one can change to a later directory (successor).
+This map is the opposite of the "u" map. (see |netrw-u|) Use the
+q map to list both the bookmarks and history. (see |netrw-q|)
+
+
BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v*
Normally one enters a file or directory using the <cr>. However, the "v"
@@ -854,7 +872,8 @@ One may easily "bookmark" a directory by using
{cnt}b
Any count may be used. One may use viminfo's "!" option to retain bookmarks
-between vim sessions.
+between vim sessions. See |netrw-B| for how to return to a bookmark and
+|netrw-q| for how to list them.
CHANGING TO A BOOKMARKED DIRECTORY *netrw-B*
@@ -863,12 +882,14 @@ To change directory back to a bookmarked directory, use
{cnt}B
-Any count may be used.
+Any count may be used to reference any of the bookmarks. See |netrw-b|
+for how to bookmark a directory and |netrw-q| for how to list them.
-LISTING BOOKMARKS *netrw-q*
+LISTING BOOKMARKS AND HISTORY *netrw-q*
-Pressing "q" will list the bookmarked directories. (query)
+Pressing "q" will list the bookmarked directories and directory traversal
+history (query). (see |netrw-b|, |netrw-B|, |netrw-u|, and |netrw-U|)
IMPROVING DIRECTORY BROWSING *netrw-list-hack*
@@ -991,11 +1012,26 @@ which is loaded automatically at startup (assuming :set nocp).
attempting to read/write your file over the network. Please
send that information to <netrw.vim>'s maintainer,
- drchipNOSPAM at campbellfamily.biz - NOSPAM
+ NdrOchip at ScampbellPfamily.AbizM - NOSPAM
==============================================================================
10. History *netrw-history*
+ v52: * nonumber'ing now set for browsing buffers
+ * when the hiding list hid all files, error messages ensued. Fixed
+ * when browsing, swf is set, but directory is not set, when netrw
+ was attempting to restore options, vim wanted to save a swapfile
+ to a local directory using an url-style path. Fixed
+ v51: * cygwin detection now automated (using windows and &shell is bash)
+ * customizable browser "file" rejection patterns
+ * directory history
+ * :[range]w url now supported (ie. netrw has a FileWriteCmd event)
+ * error messages have a "Press <cr> to continue" to allow them
+ to be seen
+ * directory browser displays no longer bother the swapfile
+ * u/U commands to go up and down the history stack
+ * history stack may be saved with viminfo with its "!" option
+ * bugfixes associated with unwanted [No Files] entries
v50: * directories now displayed using buftype=nofile; should keep the
directory names as-is
* attempts to remove empty "[No File]" buffers leftover
@@ -1003,8 +1039,8 @@ which is loaded automatically at startup (assuming :set nocp).
* bugfix: a "caps-lock" editing difficulty left in v49 was fixed
* syntax highlighting for "Showing:" the hiding list included
* bookmarks can now be retained if "!" is in the viminfo option
- v49: * will use ftp for http://.../ browsing v48: * One may use ftp to
- do remote host file browsing
+ v49: * will use ftp for http://.../ browsing v48:
+ * One may use ftp to do remote host file browsing
* (windows and !cygwin) remote browsing with ftp can now use
the "dir" command internally to provide listings
* g:netrw_keepdir now allows one to keep the initial current
@@ -1032,9 +1068,9 @@ which is loaded automatically at startup (assuming :set nocp).
listings
* improved unusual file and directory name handling preview
* window support
- v47: * now handles local directory browsing. v46: * now handles
- remote directory browsing
- * g:netrw_silent (if 1) will cause all transfers to be silent'd
+ v47: * now handles local directory browsing.
+ v46: * now handles remote directory browsing
+ * g:netrw_silent (if 1) will cause all transfers to be silent
v45: * made the [user@]hostname:path form a bit more restrictive to
better handle errors in using protocols (e.g. scp:usr@host:file
was being recognized as an rcp request) v44: * changed from
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 0e147b57a..583a784e4 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 Oct 12
+*syntax.txt* For Vim version 7.0aa. Last change: 2004 Dec 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -640,6 +640,10 @@ c_no_if0 don't highlight "#if 0" blocks as comments
c_no_cformat don't highlight %-formats in strings
c_no_c99 don't highlight C99 standard items
+When 'foldmethod' is set to "syntax" then /* */ comments and { } blocks will
+become a fold. If you don't want comments to become a fold use: >
+ :let c_no_comment_fold = 1
+
If you notice highlighting errors while scrolling backwards, which are fixed
when redrawing with CTRL-L, try setting the "c_minlines" internal variable
to a larger number: >
@@ -2128,6 +2132,9 @@ By default only R5RS keywords are highlighted and properly indented.
MzScheme-specific stuff will be used if b:is_mzscheme or g:is_mzscheme
variables are defined.
+
+Also scheme.vim supports keywords of the Chicken Scheme->C compiler. Define
+b:is_chicken or g:is_chicken, if you need them.
SDL *sdl.vim* *sdl-syntax*
diff --git a/runtime/doc/tags b/runtime/doc/tags
index b3ea0e839..4c020a1eb 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -229,6 +229,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'formatoptions' options.txt /*'formatoptions'*
'formatprg' options.txt /*'formatprg'*
'fp' options.txt /*'fp'*
+'fs' options.txt /*'fs'*
+'fsync' options.txt /*'fsync'*
'ft' options.txt /*'ft'*
'gcr' options.txt /*'gcr'*
'gd' options.txt /*'gd'*
@@ -756,6 +758,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
't_CV' term.txt /*'t_CV'*
't_Co' term.txt /*'t_Co'*
't_DL' term.txt /*'t_DL'*
+'t_EI' term.txt /*'t_EI'*
't_F1' term.txt /*'t_F1'*
't_F2' term.txt /*'t_F2'*
't_F3' term.txt /*'t_F3'*
@@ -789,6 +792,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
't_KL' term.txt /*'t_KL'*
't_RI' term.txt /*'t_RI'*
't_RV' term.txt /*'t_RV'*
+'t_SI' term.txt /*'t_SI'*
't_Sb' term.txt /*'t_Sb'*
't_Sf' term.txt /*'t_Sf'*
't_WP' term.txt /*'t_WP'*
@@ -4298,7 +4302,6 @@ cpo-o options.txt /*cpo-o*
cpo-p options.txt /*cpo-p*
cpo-r options.txt /*cpo-r*
cpo-s options.txt /*cpo-s*
-cpo-star options.txt /*cpo-star*
cpo-t options.txt /*cpo-t*
cpo-u options.txt /*cpo-u*
cpo-v options.txt /*cpo-v*
@@ -4929,7 +4932,6 @@ hebrew hebrew.txt /*hebrew*
hebrew.txt hebrew.txt /*hebrew.txt*
help various.txt /*help*
help-context help.txt /*help-context*
-help-tags tags 1
help-translated various.txt /*help-translated*
help-xterm-window various.txt /*help-xterm-window*
help.txt help.txt /*help.txt*
@@ -5391,6 +5393,7 @@ mouse-mode-table term.txt /*mouse-mode-table*
mouse-overview term.txt /*mouse-overview*
mouse-swap-buttons term.txt /*mouse-swap-buttons*
mouse-using term.txt /*mouse-using*
+movement intro.txt /*movement*
ms-dos os_msdos.txt /*ms-dos*
msdos os_msdos.txt /*msdos*
msdos-arrows os_msdos.txt /*msdos-arrows*
@@ -5462,6 +5465,7 @@ netrw-B pi_netrw.txt /*netrw-B*
netrw-D pi_netrw.txt /*netrw-D*
netrw-R pi_netrw.txt /*netrw-R*
netrw-S pi_netrw.txt /*netrw-S*
+netrw-U pi_netrw.txt /*netrw-U*
netrw-activate pi_netrw.txt /*netrw-activate*
netrw-b pi_netrw.txt /*netrw-b*
netrw-bookmark pi_netrw.txt /*netrw-bookmark*
@@ -5507,6 +5511,7 @@ netrw-ref pi_netrw.txt /*netrw-ref*
netrw-rename pi_netrw.txt /*netrw-rename*
netrw-s pi_netrw.txt /*netrw-s*
netrw-transparent pi_netrw.txt /*netrw-transparent*
+netrw-u pi_netrw.txt /*netrw-u*
netrw-uidpass pi_netrw.txt /*netrw-uidpass*
netrw-urls pi_netrw.txt /*netrw-urls*
netrw-v pi_netrw.txt /*netrw-v*
@@ -5553,6 +5558,7 @@ new-indent-flex version6.txt /*new-indent-flex*
new-items-6 version6.txt /*new-items-6*
new-items-7 version7.txt /*new-items-7*
new-line-continuation version5.txt /*new-line-continuation*
+new-manpage-trans version7.txt /*new-manpage-trans*
new-multi-byte version5.txt /*new-multi-byte*
new-multi-lang version6.txt /*new-multi-lang*
new-network-files version6.txt /*new-network-files*
@@ -5690,6 +5696,7 @@ phtml-syntax syntax.txt /*phtml-syntax*
phtml.vim syntax.txt /*phtml.vim*
pi_expl.txt pi_expl.txt /*pi_expl.txt*
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
+pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
pi_spec.txt pi_spec.txt /*pi_spec.txt*
plugin usr_05.txt /*plugin*
plugin-details filetype.txt /*plugin-details*
@@ -6084,6 +6091,7 @@ t_CS term.txt /*t_CS*
t_CV term.txt /*t_CV*
t_Co term.txt /*t_Co*
t_DL term.txt /*t_DL*
+t_EI term.txt /*t_EI*
t_F1 term.txt /*t_F1*
t_F2 term.txt /*t_F2*
t_F3 term.txt /*t_F3*
@@ -6117,6 +6125,7 @@ t_KK term.txt /*t_KK*
t_KL term.txt /*t_KL*
t_RI term.txt /*t_RI*
t_RV term.txt /*t_RV*
+t_SI term.txt /*t_SI*
t_Sb term.txt /*t_Sb*
t_Sf term.txt /*t_Sf*
t_WP term.txt /*t_WP*
@@ -6299,6 +6308,8 @@ term.txt term.txt /*term.txt*
termcap term.txt /*termcap*
termcap-changed version4.txt /*termcap-changed*
termcap-colors term.txt /*termcap-colors*
+termcap-cursor-color term.txt /*termcap-cursor-color*
+termcap-cursor-shape term.txt /*termcap-cursor-shape*
termcap-syntax syntax.txt /*termcap-syntax*
termcap-title term.txt /*termcap-title*
terminal-colors os_unix.txt /*terminal-colors*
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index b418e4c53..b9252a93d 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -1,4 +1,4 @@
-*term.txt* For Vim version 7.0aa. Last change: 2004 Oct 20
+*term.txt* For Vim version 7.0aa. Last change: 2004 Dec 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -275,6 +275,8 @@ Added by Vim (there are no standard codes for these):
t_IE set icon text end *t_IE* *'t_IE'*
t_WP set window position (Y, X) in pixels *t_WP* *'t_WP'*
t_WS set window size (height, width) in characters *t_WS* *'t_WS'*
+ t_SI start insert mode (bar cursor shape) *t_SI* *'t_SI'*
+ t_EI end insert mode (block cursor shape) *t_EI* *'t_EI'*
t_RV request terminal version string (for xterm) *t_RV* *'t_RV'*
|xterm-8bit| |v:termresponse| |'ttymouse'| |xterm-codes|
@@ -395,6 +397,19 @@ When it is non-zero, the 't_AB' and 't_AF' options are used to set the color.
If one of these is not available, 't_Sb' and 't_Sf' are used. 't_me' is used
to reset to the default colors.
+ *termcap-cursor-shape* *termcap-cursor-color*
+When Vim enters Insert mode the 't_SI' escape sequence is sent. When leaving
+Insert mode 't_EI' is used. But only if both are defined. This can be used
+to change the shape or color of the cursor in Insert mode. These are not
+standard termcap/terminfo entries, you need to set them yourself.
+Example for an xterm, this changes the color of the cursor: >
+ if &term =~ "xterm"
+ let &t_SI = "\<Esc>]12;purple\x7"
+ let &t_EI = "\<Esc>]12;blue\x7"
+ endif
+NOTE: When Vim exits the shape for Normal mode will remain. The shape from
+before Vim started will not be restored.
+
*termcap-title*
The 't_ts' and 't_fs' options are used to set the window title if the terminal
allows title setting via sending strings. They are sent before and after the
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index ad5209aee..d6da62fd7 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 Oct 24
+*todo.txt* For Vim version 7.0aa. Last change: 2004 Dec 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,65 +30,38 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Include NetBeans patches (Gordon Prieur, Oct 20)
- See two messages for list of changed files. Additionally:
- doc/eval.txt
- Docs for message E680.
-
-Line number not updated when inserting a line in anothe window. (Hitier
-Sylvain, Oct 24)
-
-Aborting at the ATTENTION prompt causes trouble:
- buffer remains active, nwindows isn't closed (fixed in buffer.c)
- alternate buffer gets "read error" flag.
- ":sbuf" and ":ball" leave an empty window behind.
-Change in handle_swap_exists() also in 6.3?
-Add enter_cleanup() and leave_cleanup() also in 6.3?
- buffer.c
- ex_eval.c
- proto/ex_eval.pro
- structs.h
- vim.h
-
-Win32: When the path to a file has Russian characters, ":cd %:p:h" doesn't
-work. (Valery Kondakoff)
-Solved in os_mswin.c. Add to 6.3?
-
-Patch for Win32 textdomain: NAKADAIRA Yukihiro, Sept 17.
-
-Handling decimal point on keypad: use MapVirtualKey. (Vince Negri, Oct 20)
-
-Valencia: executable("xxd.exe") returns true while "!xxd" doesn't work.
-Works fine for me. Only in specific environment?
-
-netrw plugin: When coming back to the same directory a scratch buffer appears.
-Only on Win32. (Charles Campbell, Sept 15)
-
-New Eiffel indent script from Jocelyn Fiat. OK with David Clarke.
+Add a function to test if a font name actually works.
-Win32: not using 'tenc' in GUI causes problems on Win 98? (Jiri Jezdinsky)
-Try out with Russian input method.
+When using "set laststatus=2 cmdheight=2" in the .gvimrc you only get one line
+for the cmdline. (Christian Robinson) When the Vim window is resized (e.g.,
+xterm with many lines) it's OK.
-After "Y" '[ and '] are not at start/end of the yanked text. (Ken Clark)
+":e <cfile>" does not expand ~/file, very confusing compared to ":e ~/file".
-Patch for adding 'fsync' option: disable using fsync() on file write. (Sept.
-26, Ciaran McCreesh)
+SIGHUP is delayed until waiting for a character. Can the same thing be done
+for SIGINT? Then also check when waiting for a short time.
-Folding for C syntax: (Olaf Dabrunz 27 sept 2004)
+When no termcap/termlib library is found, check that compiling Vim works in
+configure. Give an clear error message ("install termcap or ncurses-dev
+package") when it doesn't.
-Add remark about using Vim with VS .net to Visvim docs. (David Fishburn, Sept
-27)
+When doing ":w file" 'modified' is reset, but "u" sets it, while the file is
+actually unchanged. Don't reset 'modified' when 'nocp' is set.
-Vim icon for documents associated with Vim? (Rahul Kulkarni, sept 28)
+Win32: "gvim -V100" should use dialog with scrollbar.
-Add a function to test if a font name actually works.
+Using CTRL-A on "08" should not work like octal. (Matthew Duggan)
-When using "set laststatus=2 cmdheight=2" in the .gvimrc you only get one line
-for the cmdline. (Christian Robinson) When the Vim window is resized (e.g.,
-xterm with many lines) it's OK.
-
-":e <cfile>" does not expand ~/file, very confusing compared to ":e ~/file".
+Cursor onder laatste regel na ":g/pat/s//>" commando waardoor regels niet meer
+wrappen. (Adri Verhoef, Dec 1)
+Included NetBeans patches (Gordon Prieur, Oct 20)
+ See two messages for list of changed files. Additionally:
+ doc/eval.txt
+ Docs for message E680.
+ Docs for ":nbkey".
+ Asked Gordon to send the differences again, some parts apparently are
+ missing.
For version 7.0:
@@ -172,6 +145,8 @@ For version 7.0:
Tcl implementation ~/vim/HierAssist/ )
7 Add patch from Benoit Cerrina to integrate Vim and Perl functions
better. Now also works for Ruby (2001 Nov 10)
+ - Patch from Herculano de Lima Einloft Neto for better formatting of the
+ quickfix window (2004 dec 2)
7 Motif: use the menu font consistently. Patch from Martin Dalecki 2002
Jan 11.
- Motif: add 3D shading for the menu entries? Patch from Martin Dalecki.
@@ -204,13 +179,32 @@ For version 7.0:
runtime files?
Also: when the environment variable exists, use it. If it doesn't
exist, set it. Requires good names: $VIM_USER_VIMRC $VIM_USER_DIR
+ - Add the ":cbuffer" command: read list of errors from a buffer instead
+ of from a file. (Yegappan Lakshmanan, Oct 31, but avoid the temp file)
+ Perhaps ":cexpr" could read from a list?
+ Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
+ Govindachar)
+ - The Replace dialog takes "\r" literal, unless "replace all" is used.
+ Need to escape backslashes.
+ Win32: the text to replace with isn't remembered.
+ - For GUI Find/Replace dialog support using a regexp. Patch for Motif
+ and GTK by degreneir (nov 10 and nov 18).
+- Use a builtin grep command for ":grep"? Makes it possible to add the
+ column number. Can use the code of ":helpgrep".
+ Patch from Yegappan Lakshmanan, Nov 4. Or use ":grep" and set 'grepprg'
+ to something special? Could also do both.
+ Also support using "**" in filename, so that a directory tree can be
+ searched.
+ Also see the "minigrep.vim" script on www.vim.org.
- Edit same file on Unix and from MS-Windows: no warning for swap file.
+- Drop the kvim support? There is no maintenance and "yzis" is supposed to
+ replace it.
- In the kvim/KDE source files fix the formatting.
- KDE version is called "kvim". Make it "gvim", like the others?
- Better configure check for KDE include files from Dan Sharp.
-- KDE Input method patch. (Yasuhiro Matsumoto)
+- KDE GUI Input method patch. (Yasuhiro Matsumoto) (upd. Oct 25 2004)
- Change ga_room into ga_maxlen, so that it doesn't need to be
incremented/decremented each time.
- For string variables, use length instead of NUL termination.
@@ -279,9 +273,11 @@ For version 7.0:
Should store the values in block 0 of the swap file, but that is an
incompatible change.
7 Support WINDOW TABS. Works like several pages, each with their own
- split windows. Patch for GTK 1.2 from Christian Michon, 2004 Jan 6.
- Also for the console! In Emacs these are called frames.
+ split windows. Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6.
+ Also for the console!
+ In Emacs these are called frames. Could also call them "pages".
Use "1gt" - "99gt" to switch to a tab?
+ Simple patch for GTK by Luis M (nov 7).
- EMBEDDING: Make it possible to run Vim inside a window of another program.
For Xwindows this can be done with XReparentWindow().
For GTK Neil Bird has a patch to use Vim like a widget.
@@ -337,14 +333,18 @@ For version 7.0:
- "onemore" flag in 'virtualedit': move cursor past end of line. Patch by
Mattias Flodin (2004 Jul 30)
-The fsync() in buf_write() causes laptop harddisk spinup. Add an option to
-avoid it?
+Win32: When setting 'encoding' in a Vim server to "utf-8", and using "vim
+--remote russian" in a console, "russian" should be converted from the console
+encoding to utf-8. Send all remote messages in utf-8? Only on Win32?
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 Sep 13)
+Smilauer, 2004 Sep 13, fix Oct 31)
+
+":bufdo g/something/p" has the last match overwritten by the file info.
+Example by Cesar Andalou (Nov 3).
Win32: In 'fileencodings' allow using "acp" for the active codepage. Useful
value: "ucs-bom,utf-8,acp,latin1"
@@ -375,7 +375,13 @@ name. (Charles Campbell)
Add gui_mch_browsedir() for Motif, KDE and Mac OS/X.
-Install vim-it.1 manual page in .../man/it/man1/vim.1
+Add Makefile code to install *-it.1 manual pages in .../man/it/man1/*.1
+
+HTML indenting can be slow, find out why. Any way to do some kind of
+profiling for Vim script?
+
+Mac: problem with Xcode, Vim doesn't continue until the next click.
+Apparently hanges in handle_drop(). A PostEvent() avoids it. (Da Woon Jung)
Vi incompatibility:
@@ -1218,6 +1224,8 @@ Problems that will (probably) not be solved:
*extensions-improvements*
Documentation:
+8 The GUI help should explain the Find and Find/Replace dialogs. Add a link
+ to it from ":promptrepl" and ":promptfind".
8 List of options should mention whether environment variables are expanded
or not.
8 Extend usr_27.txt a bit. (Adam Seyfarth)
@@ -1308,8 +1316,10 @@ Folding:
8 "H" and "L" count buffer lines instead of window lines. (Servatius Brandt)
8 Add a way to add fold-plugins. Johannes Zellner has one for VB.
7 When using manual folding, the undo command should also restore folds.
-- Allow completely hiding a closed fold. Require showing a character in
- 'foldcolumn' to avoid the missing line goes unnoticed.
+- Allow completely hiding a closed fold. E.g., by setting 'foldtext' to an
+ empty string. Require showing a character in 'foldcolumn' to avoid the
+ missing line goes unnoticed.
+ How to implement this?
- When pressing the down arrow of a scrollbar, a closed fold doesn't scroll
until after a long time. How to make scrolling with closed folds
smoother?
@@ -1317,15 +1327,14 @@ Folding:
using the wininfo in wi_folds.
- 'foldmethod' "textobject": fold on sections and paragraph text objects.
- Add 'hidecomment' option: don't display comments in /* */ and after //.
+ Or is the conceal patch from Vince Negri a more generic solution?
- "zu": undo change in manual fold. "zU" redo change in manual fold. How to
implement this?
- "zJ" command: add the line or fold below the fold in the fold under the
cursor.
- 'foldmethod' "syntax": "fold=3": set fold level for a region.
-- Can set 'foldtext' to empty string: don't display any line. How to
- implement this?
- Apply a new foldlevel to a range of lines. (Steve Litt)
-- Have some way to restrict commands to not folded text. Also commands like
+8 Have some way to restrict commands to not folded text. Also commands like
searches.
@@ -1344,7 +1353,7 @@ Multi-byte characters:
the encoding. <?xml version="1.0" encoding="UTF-8"?> Or "charset=UTF-8"?
8 The quickfix file is read without conversion, thus in 'encoding'. Add an
option to specify the encoding of the errorfile and convert it. Also for
- ":grep".
+ ":grep" and ":helpgrep".
8 When a file was converted from 'fileencoding' to 'encoding', a tag search
should also do this on the search pattern. (Andrzej M. Ostruszka)
7 When converting a file fails, mention which byte could not be converted,
@@ -1717,8 +1726,8 @@ Performance:
this be improved?
8 Set default for 'ttyscroll' to half a screen height? Should speed up
MS-DOS version. (Negri)
-7 C syntax highlighting gets a lot slower when adding a region for folding
- from { to }. (Charles Campbell) Inserting a "{" is very slow. (dman)
+7 C syntax highlighting gets a lot slower after ":set foldmethod=syntax".
+ (Charles Campbell) Inserting a "{" is very slow. (dman)
7 HTML syntax highlighting is slow for long lines. Try displaying
http://www.theregister.co.uk/content/4/22908.html. (Andre Pang)
7 Check how performance of loading the wordlist can be improved (adding a
@@ -2064,7 +2073,7 @@ GUI:
7 Motif: For a confirm() dialog <Enter> should be ignored when no default
button selected, <Esc> should close the dialog.
- Motif steals <F10> from us, to pop up menus with the keyboard. How do we
- get it back if we want it?
+ get it back if we want it? It's already solved for GTK.
- Paste in Insert mode should not do autowrap etc. Or maybe this should be
changeable with an option?
- Put a nice picture in the icon (but how do we do that?).
@@ -3340,11 +3349,6 @@ Various improvements:
sufficient. ":setflush" resets the option stack?
How to handle an aborted mapping? Remember position in tag stack when
mapping starts, restore it when an error aborts the mapping?
-- Use a builtin grep command for ":grep"? Makes it possible to add the
- column number. Can use the code of ":helpgrep".
- Also support using "**" in filename, so that a directory tree can be
- searched.
- Also see the "minigrep.vim" script on www.vim.org.
- Change ":fixdel" into option 'fixdel', t_del will be adjusted each time
t_bs is set? (Webb)
- "gc": goto character, move absolute character positions forward, also
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index 3b0a06c8f..cdfb1a0a0 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 Oct 12
+*version7.txt* For Vim version 7.0aa. Last change: 2004 Dec 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -19,6 +19,7 @@ NEW FEATURES |new-7|
New data types |new-data-types|
KDE support |new-KDE|
+Translated manual pages |new-manpage-trans|
Various new items |new-items-7|
IMPROVEMENTS |improvements-7|
@@ -56,6 +57,10 @@ looks like its displayed, with the same folds open and closed. Use "zR" if no
folds should appear in the HTML. (partly by Carl Osterwisch)
Diff mode now is also converted as it is displayed.
+Win32: The effect of the <F10> key depended on 'winaltkeys'. Now it depends
+on whether <F10> has been mapped or not. This allows mapping <F10> without
+changing 'winaltkeys'.
+
==============================================================================
NEW FEATURES *new-7*
@@ -95,6 +100,13 @@ The 'printmbcharset' and 'printmbfont' options are used for this.
Also see |postscript-cjk-printing|. (Mike Williams)
+Translated manual pages *new-manpage-trans*
+-----------------------
+
+The manual page of Vim and associated programs is now also available in
+Italian (translated by Antonio Colombo). More languages will follow.
+
+
Various new items *new-items-7*
-----------------
@@ -115,6 +127,8 @@ Options: ~
'mzquantum' Time in msec to schedule MzScheme threads.
'printmbcharset' CJK character set to be used for :hardcopy
'printmbfont' font names to be used for CJK output of :hardcopy
+'fsync' Whether fsync() is called after writing a file.
+ (Ciaran McCreesh)
Ex commands: ~
@@ -187,6 +201,8 @@ SQL-Informix syntax file. (Dean L Hill)
PHP compiler plugin. (Doug Kearns)
+Sive syntax file. (Nikolai Weibull)
+
New Keymaps: ~
@@ -210,6 +226,10 @@ Mac: GUI font selector. (Peter "Rain Dog" Cucka)
The netrw plugin now also supports viewing a directory, when "scp://" is used.
Deleting and renaming files is possible. (Charles Campbell)
+Added the t_SI and t_EI escape sequences for starting and ending Insert mode.
+To be used to set the cursor shape to a bar or a block. No default values,
+they are not supported by termcap/terminfo.
+
==============================================================================
IMPROVEMENTS *improvements-7*
@@ -267,6 +287,17 @@ the tcl interpreter. (suggested by Alexios Zavras)
Support conversion between utf-8 and latin9 (iso-8859-15) internally, so that
digraphs still work when iconv is not available.
+When a session file is loaded while editing an unnamed, empty buffer that
+buffer is wiped out. Avoids that there is an unused buffer in the buffer
+list.
+
+Win32: When libintl.dll supports bind_textdomain_codeset(), use it.
+(NAKADAIRA Yukihiro)
+
+When foldtext() finds no text after removing the comment leader, use the
+second line of the fold. Helps for C-style /* */ comments where the first
+line is just "/*".
+
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
@@ -421,4 +452,49 @@ directory for the library early in the link flags.
With the GUI find/replace dialog a replace only worked if the pattern was
literal text. Now it works for any pattern.
+When 'equalalways' is set and 'eadirection' is "hor", ":quit" would still
+cause equalizing window heights in the vertical direction.
+
+When ":emenu" is used in a startup script the command was put in the typeahead
+buffer, causing a prompt for the crypt key to be messed up.
+
+Mac OS/X: The default for 'isprint' included characters 128-160, causes
+problems for Terminal.app.
+
+When a syntax item with "containedin" is used, it may match in the start or
+end of a region with a matchgroup, while this doesn't happen for a "contains"
+argument.
+
+When a transparent syntax items matches in another item where the highlighting
+has already stopped (because of a he= argument), the highlighting would come
+back.
+
+When cscope is used to set the quickfix error list, it didn't get set if there
+was only one match. (Sergey Khorev)
+
+When 'confirm' is set and using ":bdel" in a modified buffer, then selecting
+"cancel", would still give an error message.
+
+The PopUp menu items that started Visual mode didn't work when not in Normal
+mode. Switching between selecting a word and a line was not possible.
+
+Win32: The keypad decimal point always resulted in a '.', while on some
+keyboards it's a ','. Use MapVirtualKey(VK_DECIMAL, 2).
+
+Removed unused function DisplayCompStringOpaque() from gui_w32.c
+
+In Visual mode there is not always an indication whether the line break is
+selected or not. Highlight the character after the line when the line break
+is included, e.g., after "v$o".
+
+GTK: The <F10> key can't be mapped, it selects the menu. Disable that with a
+GTK setting and do select the menu when <F10> isn't mapped. (David Necas)
+
+After "Y" '[ and '] were not at start/end of the yanked text.
+
+When a telnet connection is dropped Vim preserves files and exits. While
+doing that a SIGHUP may arrive and disturbe us, thus ignore it. (Scott
+Anderson) Also postpone SIGHUP until it's safe to handle. Added
+handle_sighup().
+
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/vim-it.1 b/runtime/doc/vim-it.1
new file mode 100755
index 000000000..60fb8ac22
--- /dev/null
+++ b/runtime/doc/vim-it.1
@@ -0,0 +1,558 @@
+.TH VIM 1 "22 febbraio 2002"
+.SH NOME
+vim \- VI Migliorato, un editor di testi per programmatori
+.SH SINTASSI
+.br
+.B vim
+[opzioni] [file ..]
+.br
+.B vim
+[opzioni] -
+.br
+.B vim
+[opzioni] \-t tag
+.br
+.B vim
+[opzioni] \-q [file_errori]
+.PP
+.br
+.B ex
+.br
+.B view
+.br
+.B gvim
+.B gview
+.B evim
+.B eview
+.br
+.B rvim
+.B rview
+.B rgvim
+.B rgview
+.SH DESCRIZIONE
+.B Vim
+Un editore di testi, compatibile con, e migliore di, Vi.
+Può essere usato per editare qualsiasi file di testo.
+Particolarmente utile per editare programmi.
+.PP
+Ci sono parecchi miglioramenti rispetto a Vi: undo multipli,
+finestre e buffer multipli, evidenziazione sintattica, possibilità
+di modificare la linea di comando, completamento nomi file, help
+in linea, selezione testi in modalità visuale, etc..
+Vedere ":help vi_diff.txt" per un sommario delle differenze fra
+.B Vim
+e Vi.
+.PP
+Mentre usate
+.B Vim
+potete ricevere molto aiuto dal sistema di help online, col comando ":help".
+Vedere qui sotto la sezione AIUTO ONLINE.
+.PP
+Quasi sempre
+.B Vim
+viene invocato, per modificare un file, col comando
+.PP
+ vim file
+.PP
+Più in generale
+.B Vim
+viene invocato con:
+.PP
+ vim [opzioni] [lista_file]
+.PP
+Se lista_file non è presente, l'editor inizia aprendo un buffer vuoto.
+Altrimenti, una e una sola delle quattro maniere indicate qui sotto può
+essere usata per scegliere uno o più file da modificare.
+.TP 12
+file ..
+Una lista di nomi di file.
+Il primo di questi sarà il file corrente, e verrà letto nel buffer.
+Il cursore sarà posizionato sulla prima linea del buffer.
+Potete arrivare agli altri file col comando ":next".
+Per editare un file il cui nome inizia per "-" premettete "--" alla
+lista_file.
+.TP
+-
+Il file da editare è letto dallo "stdin" [di solito, ma non
+necessriamente, il terminale - NdT]. I comandi sono letti da "stderr",
+che dovrebbe essere un terminale [tty].
+.TP
+-t {tag}
+Il file da editare e la posizione iniziale del cursore dipendono da "tag",
+una specie di "etichetta" a cui saltare.
+{tag} viene cercata nel file tags, ed il file ad essa associato diventa
+quello corrente, ed il comando ad essa associato viene eseguito.
+Di solito si usa per programmi C, nel qual caso {tag} potrebbe essere un
+nome di funzione.
+L'effetto è che il file contenente quella funzione diventa il file corrente
+e il cursore è posizionato all'inizio della funzione.
+Vedere ":help tag-commands".
+.TP
+-q [file_errori]
+Inizia nella modalità quickFix [correzione veloce].
+Il file [file_errori] è letto e il primo errore è visualizzato.
+Se [file_errori] non è indicato, il suo nome è ottenuto dal valore
+dell'opzione 'errorfile' (che, se non specificata, vale "AztecC.Err"
+per l'Amiga, "errors.err" su altri sistemi).
+Si può saltare all'errore successivo col comando ":cn".
+Vedere ":help quickfix".
+.PP
+.B Vim
+si comporta in modo diverso se invocato con nomi differenti (il programma
+eseguibile "sottostante" può essere sempre lo stesso).
+.TP 10
+vim
+Modalità "Normal", comportamento normale.
+.TP
+ex
+Inizia in modalità "Ex".
+Si può passare in modalità "Normal" col comandi ":vi".
+Si può invocare la modalità "Ex" anche con l'argomento "-e".
+.TP
+view
+Inizia in modalità "Sola Lettura". Non potete modificare i file.
+Si può invocare la modalità "Sola Lettura" anche con l'argomento "-R".
+.TP
+gvim gview
+La versione GUI [Graphical User Interface].
+Apre una nuova finestra.
+Si può invocare la modalità "GUI" anche con l'argomento "-g".
+.TP
+evim eview
+La versione GUI in modalità "Facile" (semplificata).
+Apre una nuova finestra.
+Si può invocare la modalità "Facile" anche con l'argomento "-y".
+.TP
+rvim rview rgvim rgview
+Come sopra, ma con restrizioni ai comandi. Non si potrnno eseguire comandi
+dello shell o sospendere
+.B Vim.
+Si può invocare la modalità "Ristretta" anche con l'argomento "-Z".
+.SH OPZIONI
+Le opzioni possono essere in un ordine qualsiasi, prima o dopo i nomi di
+file. Opzioni che non necessitano un argomento possono essere raggruppate
+dietro a un solo "-".
+.TP 12
++[numero]
+Per il primo file il cursore sarà posizionato sulla linea "numero".
+Se "numero" manca, il cursore sarà posizionato sull'ultima linea del file.
+.TP
++/{espressione}
+Per il primo file il cursore sarà posizionato alla
+prima occorrenza di {espressione}.
+Vedere ":help search-pattern" per come specificare l'espressione.
+.TP
++{comando}
+.TP
+-c {comando}
+{comando} sarà eseguito dopo che il
+primo file è stato letto.
+{comando} è interpretato come un comando Ex.
+Se il {comando} contiene spazi deve essere incluso fra doppi apici
+(o altro delimitatore, a seconda dello shell che si sta usando).
+Esempio: Vim "+set si" main.c
+.br
+Note: Si possono avere fino a 10 comandi "+" o "-c".
+.TP
+-S {file}
+I comandi contenuti in {file} sono eseguiti dopo la lettura del primo file.
+Equivalente a -c "source {file}".
+{file} non può avere un nome che inizia per '-'.
+Se {file} è omesso si usa "Session.vim" (funziona solo se -S è l'ultimo
+argomento specificato).
+.TP
+--cmd {comando}
+Come "-c", ma il comando è eseguito PRIMA
+di eseguire qualsiasi file vimrc.
+Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi
+"-c".
+.TP
+-A
+Se
+.B Vim
+è stato compilato con supporto ARABIC per editare file con orientamento
+destra-sinistra e tastiera con mappatura Araba, questa opzione inizia
+.B Vim
+in modalità "Arabic", cioè impostando 'arabic'.
+Altrimenti viene dato un messaggio di errore e
+.B Vim
+termina in modo anormale.
+.TP
+-b
+Modalità "Binaria".
+Vengono impostate alcune opzioni che permettono di modificare un file
+binario o un programma eseguibile.
+.TP
+-C
+Compatibile. Imposta l'opzione 'compatible'.
+In questo modo
+.B Vim
+ha quasi lo stesso comportamento di Vi, anche in presenza di un file
+di configurazione .vimrc [proprio di Vim - NdT].
+.TP
+-d
+Inizia in modalità "Diff" [differenze].
+Dovrebbero esserci come argomenti due o tre nomi di file.
+.B Vim
+aprirà tutti i file evidenziando le differenze fra gli stessi.
+Funziona come vimdiff(1).
+.TP
+-d {dispositivo}
+Apre {dispositivo} per usarlo come terminale.
+Solo per l'Amiga.
+Esempio:
+"\-d con:20/30/600/150".
+.TP
+-D
+Debugging. Vim si mette in modalità "debugging" a partire
+dall'esecuzione del primo comando da uno script.
+.TP
+-e
+Eseguire
+.B Vim
+in modalità "Ex", come se il programma eseguito sia "ex".
+.TP
+-E
+Eseguire
+.B Vim
+in modalità "Ex" migliorata, come se il programma eseguito sia "exim".
+.TP
+-f
+Direttamente [Foreground]. Per la versione GUI,
+.B Vim
+non crea [fork] una nuova finestra, indipendente dallo shell di invocazione.
+Per l'Amiga,
+.B Vim
+non è fatto ripartire per aprire una nuova finestra.
+Opzione da usare quando
+.B Vim
+è eseguito da un programma che attende la fine della
+sessione di edit (ad es. mail).
+Sull'Amiga i comandi ":sh" e ":!" non sono disponibili.
+.TP
+--nofork
+Direttamente [Foreground]. Per la versione GUI,
+.B Vim
+non crea [fork] una nuova finestra, indipendente dallo shell di invocazione.
+.TP
+-F
+Se
+.B Vim
+è stato compilato con supporto FKMAP per editare file con orientamento
+destra-sinistra e tastiera con mappatura Farsi, questa opzione inizia
+.B Vim
+in modalità "Farsi", cioè impostando 'fkmap' e 'rightleft'.
+Altrimenti viene dato un messaggio di errore e
+.B Vim
+termina in modo anormale.
+.TP
+-g
+Se
+.B Vim
+è stato compilato con supporto GUI, questa opzione chiede di usarla.
+Se Vim è stato compilato senza supporto GUI viene dato un messaggio di errore e
+.B Vim
+termina in modo anormale.
+.TP
+-h
+Un po' di aiuto su opzioni e argomenti che si possono dare invocando Vim.
+Subito dopo
+.B Vim
+esce.
+.TP
+-H
+Se
+.B Vim
+è stato compilato col supporto RIGHTLEFT per editare file con orientamento
+destra-sinistra e tastiera con mappatura Ebraica, questa opzione inizia
+.B Vim
+in modalità "Ebraica", cioè impostando 'hkmap' e 'rightleft'.
+Altrimenti viene dato un messaggio di errore e
+.B Vim
+termina in modo anormale.
+.TP
+-i {viminfo}
+Se è abilitato l'uso di un file viminfo, questa opzione indica il nome
+del file da usare invece di quello predefinito "~/.viminfo".
+Si può anche evitare l'uso di un file .viminfo, dando come nome "NONE".
+.TP
+-L
+Equivalente a -r.
+.TP
+-l
+Modalità Lisp.
+Imposta le opzini 'lisp' e 'showmatch'.
+.TP
+-m
+Inibisce modifica file.
+Annulla l'opzione 'write'.
+E' ancora possibile modificare un buffer [in memoria - Ndt], ma non scriverlo.
+.TP
+-M
+Modifiche non permesse. Le opzioni 'modifiable' e 'write' sono annullate,
+in modo da impedire sia modifiche che riscritture. Da notare che queste
+opzioni possono essere abilitate in seguito, permettendo così modifiche.
+.TP
+-N
+Modalità "Non-compatibile". Annulla l'opzione 'compatible'.
+Così
+.B Vim
+va un po' meglio, ma è meno compatibile con Vi, anche in assenza di un
+file .vimrc.
+.TP
+-n
+Inibisce l'uso di un file di swap.
+Il recupero dopo una caduta di macchina diventa impossibile.
+Utile per editare un file su un supporto molto lento (ad es. floppy).
+Il comando ":set uc=0" ha lo stesso effetto.
+Per abilitare il recupero usare ":set uc=200".
+.TP
+-nb
+Diviene un Editor server per NetBeans. Vedere la documentazione per dettagli.
+.TP
+-o[N]
+Apri N finestre in orizzontale.
+Se N manca, apri una finestra per ciascun file.
+.TP
+-O[N]
+Apri N finestre, in verticale.
+Se N manca, apri una finestra per ciascun file.
+.TP
+-R
+Modalità "Sola Lettura".
+Imposta l'opzione 'readonly'.
+Si può ancora modificare il buffer, ma siete protetti da una riscrittura
+involontaria.
+Se volete davvero riscrivere il file, aggiungete un punto esclamativo
+al comando "Ex", come in ":w!".
+L'opzione -R implica anche l'opzione -n (vedere sotto).
+L'opzione 'readonly' può essere annullata con ":set noro".
+Vedere ":help 'readonly'".
+.TP
+-r
+Lista file di swap, assieme a dati utili per un recupero.
+.TP
+-r {file}
+Modalità "Recovery".
+Il file di swap è usato per recuperare una sessione di edit finita male.
+Il file di swap è un file con lo stesso nome file del file di testo
+editato, col suffisso ".swp".
+Vedere ":help recovery".
+.TP
+-s
+Modalità silenziosa. Solo quando invocato come "Ex" o quando l'opzione
+"-e" è stata data prima dell'opzione "-s".
+.TP
+-s {scriptin}
+Lo script file {scriptin} è letto.
+I caratteri nel file sono interpretati come se immessi da voi.
+Lo stesso si può ottenere col comando ":source! {scriptin}".
+Se la fine del file di input viene raggiunta prima che Vim termini,
+l'ulteriore input viene preso dalla tastiera.
+.TP
+-T {terminale}
+Dice a
+.B Vim
+quale tipo di terminale state usando.
+Utile solo se il terminale non viene riconosciuto correttamente da Vim.
+Dovrebbe essere un terminale noto a
+.B Vim
+(internamente) o definito nel file termcap o terminfo.
+.TP
+-u {vimrc}
+Usa i comandi nel file {vimrc} per inizializzazioni.
+Tutte le altre inizializzazioni non sono eseguite.
+Usate questa opzione per editare qualche file di tipo speciale.
+Può anche essere usato per non fare alcuna inizializzazione dando
+come nome "NONE".
+Vedere ":help initialization" da vim per ulteriori dettagli.
+.TP
+-U {gvimrc}
+Usa i comandi nel file {gvimrc} per inizializzazioni GUI.
+Tutte le altre inizializzazioni GUI non sono eseguite.
+Può anche essere usata per non fare alcuna inizializzazione GUI dando
+come nome "NONE".
+Vedere ":help gui-init" da vim per ulteriori dettagli.
+.TP
+-V[N]
+Verboso. Vim manda messaggi relativi agli script file che esegue
+e quando legge o scrive un file viminfo. Il numero opzionale N è il valore
+dell'opzione 'verbose'.
+Il valore predefinito è 10.
+.TP
+-v
+Inizia
+.B Vim
+in modalità "Vi", come se il programma eseguibile fosse "vi". Questo ha
+effetto solo quando Vim viene invocato con il nome "ex".
+.TP
+-w {scriptout}
+Ogni carattere immesso viene registrato nel file {scriptout},
+finché non uscite da
+.B Vim.
+Utile se si vuole creare uno script file da usare con "vim -s" o
+":source!".
+Se il file {scriptout} esiste, quel che immettete viene aggiunto in fondo.
+.TP
+-W {scriptout}
+Come -w, ma uno script file esistente viene sovrascritto.
+.TP
+-x
+Uso di cifratura nella scrittura dei file. E' necessario immettere
+una chiave di cifratura.
+.TP
+-X
+Non connetterti al server X. Vim parte più rapidamente,
+ma il titolo della finestra e la clipboard non sono disponibili.
+.TP
+-y
+Eseguire
+.B Vim
+in modalità "Facile" (semplificata), come se l'eseguibile invocato
+sia "evim" o "eview".
+Fa sì che
+.B Vim
+si comporti come un editor che usa solo il mouse e i caratteri.
+.TP
+-Z
+Modalità "Ristretta". Vim si comporta come se invocato con un nome
+che inizia per "r".
+.TP
+--
+Specifica la fine delle opzioni.
+Argomenti specificati dopo questo sono considerati nomi file.
+Si può usare per editare un file il cui nome inizi per '-'.
+.TP
+--echo-wid
+Solo con GUI GTK: Visualizza Window ID su "stdout".
+.TP
+--help
+Vim dà un messaggio ed esce, come con l'argomento "-h".
+.TP
+--literal
+Considera i nomi passati come argomenti letterai, senza espandere
+metacaratteri. Non necessario in Unix, lo shell espande i metacaratteri.
+.TP
+--noplugin
+Non caricare plugin. Implicito se si specifica -u NONE.
+.TP
+--remote
+Connettersi a un server Vim e chiedere di editare i file elencati come altri
+argomenti. Se non si trova un server viene dato un messaggio e i file sono
+editati nel Vim corrente.
+.TP
+--remote-expr {expr}
+Connettersi a un server Vim, valutare ivi {expr} e stampare il risultatoi
+su "stdout".
+.TP
+--remote-send {chiavi}
+Connettersi a un server Vim e spedirgli {chiavi}.
+.TP
+--remote-silent
+Come --remote, ma senza avvisare se non si trova un server.
+.TP
+--remote-wait
+Come --remote, ma Vim non termina finché i file non sono stati editati.
+.TP
+--remote-wait-silent
+Come --remote-wait, ma senza avvisare se non si trova un server.
+.TP
+--serverlist
+Lista i nomi di tutti i server Vim disponibili.
+.TP
+--servername {nome}
+Usa {nome} come nome server. Usato per il Vim corrente, a meno che sia
+usato con l'argomento --remote, nel qual caso indica il server a cui
+connettersi.
+.TP
+--socketid {id}
+Solo con GUI GTK: Usa il meccanismo GtkPlug per eseguire gvim in un'altra
+finestra.
+.TP
+--version
+Stampa la versione di Vim ed esci.
+.SH AIUTO ONLINE
+Battere ":help" in
+.B Vim
+per iniziare.
+Battere ":help argomento" per ricevere aiuto su uno specifico argomento.
+Per esempio: ":help ZZ" per ricevere aiuto sul comando "ZZ".
+Usare <Tab> e CTRL-D per completare gli argomenti
+(":help cmdline-completion").
+Ci sono "tag" nei file di help per saltare da un argomento a un altro
+(simili a legami ipertestuali, vedere ":help").
+Tutti i file di documentazione possono essere navigati così. Ad es.:
+":help syntax.txt".
+.SH FILE
+.TP 15
+/usr/local/lib/vim/doc/*.txt
+I file di cocumentaziona di
+.B Vim
+.
+Usate ":help doc-file-list" per avere la lista completa.
+.TP
+/usr/local/lib/vim/doc/tags
+Il file di tags usato per trovare informazioni nei file di documentazione.
+.TP
+/usr/local/lib/vim/syntax/syntax.vim
+Inizializzazioni sintattiche a livello di sistema.
+.TP
+/usr/local/lib/vim/syntax/*.vim
+File di colorazione sintattica per vari linguaggi.
+.TP
+/usr/local/lib/vim/vimrc
+Inizializzazioni
+.B Vim
+a livello di sistema.
+.TP
+/usr/local/lib/vim/gvimrc
+Inizializzazioni gvim a livello di sistema.
+.TP
+/usr/local/lib/vim/optwin.vim
+Script Vim usato dal comando ":options", un modo semplice
+per visualizzare e impostare opzioni.
+.TP
+/usr/local/lib/vim/menu.vim
+Inzializzazioni del menu gvim a livello di sistema.
+.TP
+/usr/local/lib/vim/bugreport.vim
+Script Vim per generare una segnalazione di errore. Vedere ":help bugs".
+.TP
+/usr/local/lib/vim/filetype.vim
+Script Vim per determinare il tipo di un file a partire dal suo nome.
+Vedere ":help 'filetype'".
+.TP
+/usr/local/lib/vim/scripts.vim
+Script Vim per determinare il tipo di un file a partire dal suo contenuto.
+Vedere ":help 'filetype'".
+.TP
+/usr/local/lib/vim/*.ps
+File usati per stampa PostScript.
+.PP
+Per informazioni aggiornate [in inglese - NdT] vedere la home page di Vim:
+.br
+<URL:http://www.vim.org/>
+.SH VEDERE ANCHE
+vimtutor(1)
+.SH AUTORE
+Buona parte di
+.B Vim
+è stato scritto da Bram Moolenaar, con molto aiuto da altri.
+Vedere ":help credits" in
+.B Vim.
+.br
+.B Vim
+è basato su Stevie, scritto da: Tim Thompson,
+Tony Andrews e G.R. (Fred) Walter.
+In verità, poco o nulla è rimasto del loro codice originale.
+.SH BACHI
+Probabili.
+Vedere ":help todo" per una lista di problemi noti.
+.PP
+Si noti che un certo numero di comportamenti che possono essere considerati
+errori da qualcuno, sono in effetti causati da una riproduzione fin troppo
+fedele del comportamento di Vi.
+Se ritenete che altre cose siano errori "perché Vi si comporta diversamente",
+date prima un'occhiata al file vi_diff.txt
+(o battere :help vi_diff.txt da Vim).
+Date anche un'occhiata alle opzioni 'compatible' e 'cpoptions.
diff --git a/runtime/doc/vim.man b/runtime/doc/vim.man
index 593926d51..ff925c66f 100644
--- a/runtime/doc/vim.man
+++ b/runtime/doc/vim.man
@@ -279,8 +279,8 @@ OPTIONS
-W {scriptout}
Like -w, but an existing file is overwritten.
- -x Use encryption when writing files. Will prompt for a
- crypt key.
+ -x Use encryption when writing files. Will prompt for a crypt
+ key.
-X Don't connect to the X server. Shortens startup time in a
terminal, but the window title and clipboard will not be
@@ -297,12 +297,13 @@ OPTIONS
be handled as a file name. This can be used to edit a
filename that starts with a '-'.
- --echo-wid GTK GUI only: Echo the Window ID on stdout
+ --echo-wid GTK GUI only: Echo the Window ID on stdout.
--help Give a help message and exit, just like "-h".
--literal Take file name arguments literally, do not expand wild-
- cards. Not needed on Unix, the shell expand wildcards.
+ cards. This has no effect on Unix where the shell expands
+ wildcards.
--noplugin Skip loading plugins. Implied by -u NONE.
@@ -311,18 +312,18 @@ OPTIONS
is given and the files are edited in the current Vim.
--remote-expr {expr}
- Connect to a Vim server, evaluate {expr} in it and print
+ Connect to a Vim server, evaluate {expr} in it and print
the result on stdout.
--remote-send {keys}
Connect to a Vim server and send {keys} to it.
--remote-silent
- As --remote, but without the warning when no server is
+ As --remote, but without the warning when no server is
found.
--remote-wait
- As --remote, but Vim does not exit until the files have
+ As --remote, but Vim does not exit until the files have
been edited.
--remote-wait-silent
@@ -333,31 +334,31 @@ OPTIONS
List the names of all Vim servers that can be found.
--servername {name}
- Use {name} as the server name. Used for the current Vim,
+ Use {name} as the server name. Used for the current Vim,
unless used with a --remote argument, then it's the name of
the server to connect to.
--socketid {id}
- GTK GUI only: Use the GtkPlug mechanism to run gvim in
+ GTK GUI only: Use the GtkPlug mechanism to run gvim in
another window.
--version Print version information and exit.
ON-LINE HELP
- Type ":help" in Vim to get started. Type ":help subject" to get help
- on a specific subject. For example: ":help ZZ" to get help for the
- "ZZ" command. Use <Tab> and CTRL-D to complete subjects (":help cmd-
- line-completion"). Tags are present to jump from one place to another
+ Type ":help" in Vim to get started. Type ":help subject" to get help
+ on a specific subject. For example: ":help ZZ" to get help for the
+ "ZZ" command. Use <Tab> and CTRL-D to complete subjects (":help cmd-
+ line-completion"). Tags are present to jump from one place to another
(sort of hypertext links, see ":help"). All documentation files can be
viewed in this way, for example ":help syntax.txt".
FILES
/usr/local/lib/vim/doc/*.txt
- The Vim documentation files. Use ":help doc-file-list"
+ The Vim documentation files. Use ":help doc-file-list"
to get the complete list.
/usr/local/lib/vim/doc/tags
- The tags file used for finding information in the docu-
+ The tags file used for finding information in the docu-
mentation files.
/usr/local/lib/vim/syntax/syntax.vim
@@ -373,7 +374,7 @@ FILES
System wide gvim initializations.
/usr/local/lib/vim/optwin.vim
- Script used for the ":options" command, a nice way to
+ Script used for the ":options" command, a nice way to
view and set options.
/usr/local/lib/vim/menu.vim
@@ -383,11 +384,11 @@ FILES
Script to generate a bug report. See ":help bugs".
/usr/local/lib/vim/filetype.vim
- Script to detect the type of a file by its name. See
+ Script to detect the type of a file by its name. See
":help 'filetype'".
/usr/local/lib/vim/scripts.vim
- Script to detect the type of a file by its contents.
+ Script to detect the type of a file by its contents.
See ":help 'filetype'".
/usr/local/lib/vim/*.ps
@@ -402,17 +403,17 @@ SEE ALSO
AUTHOR
Most of Vim was made by Bram Moolenaar, with a lot of help from others.
See ":help credits" in Vim.
- Vim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and
- G.R. (Fred) Walter. Although hardly any of the original code remains.
+ Vim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and
+ G.R. (Fred) Walter. Although hardly any of the original code remains.
BUGS
Probably. See ":help todo" for a list of known problems.
- Note that a number of things that may be regarded as bugs by some, are
- in fact caused by a too-faithful reproduction of Vi's behaviour. And
- if you think other things are bugs "because Vi does it differently",
- you should take a closer look at the vi_diff.txt file (or type :help
- vi_diff.txt when in Vim). Also have a look at the 'compatible' and
+ Note that a number of things that may be regarded as bugs by some, are
+ in fact caused by a too-faithful reproduction of Vi's behaviour. And
+ if you think other things are bugs "because Vi does it differently",
+ you should take a closer look at the vi_diff.txt file (or type :help
+ vi_diff.txt when in Vim). Also have a look at the 'compatible' and
'cpoptions' options.
diff --git a/runtime/doc/vimdi-it.1 b/runtime/doc/vimdi-it.1
new file mode 100755
index 000000000..9417b904c
--- /dev/null
+++ b/runtime/doc/vimdi-it.1
@@ -0,0 +1,48 @@
+.TH VIMDIFF 1 "30 marzo 2001"
+.SH NOME
+vimdiff \- modifica due o tre versioni di un file con Vim, visualizzando le
+differenze
+.SH SINTASSI
+.br
+.B vimdiff
+[opzioni] file1 file2 [file3]
+.PP
+.B gvimdiff
+.SH DESCRIZIONE
+.B Vimdiff
+inizia
+.B Vim
+per due (o tre) file.
+Ogni file ha una sua finestra.
+Le differenze fra file sono evidenziate.
+E' una maniera elegante per controllare modifiche e portare modifiche
+verso un'altra versione dello stesso file.
+.PP
+Vedere vim(1) per dettagli su Vim in generale.
+.PP
+Se iniziato con
+.B gvimdiff
+la GUI sarà utilizzata, se disponibile.
+.PP
+In ogni finestra l'opzione 'diff' è impostata, evidenziando così le
+differenze.
+.br
+Le opzioni 'wrap' e 'scrollbind' sono impostate per migliorare la
+visibilità del testo.
+.br
+L'opzione 'foldmethod' è impostata al valore "diff", che mette gruppi di
+linee uguali fra i diversi file in una piegatura. 'foldcolumn' è impostato
+a due per poter facilmente visualizzare le piegature, aprirle e chiuderle.
+.SH OPZIONI
+Lo schermo è diviso verticalmente, come se aveste usato l'opzione "-O".
+Per dividerlo orizzontalmente, usare l'opzione "-o".
+.PP
+Per tutte le altre opzioni, vedere vim(1).
+.SH VEDERE ANCHE
+vim(1)
+.SH AUTORE
+Buona parte di
+.B Vim
+è stato scritto da Bram Moolenaar, con molto aiuto da altri.
+Vedere ":help credits" in
+.B Vim.
diff --git a/runtime/doc/vimtu-it.1 b/runtime/doc/vimtu-it.1
new file mode 100755
index 000000000..1a2868876
--- /dev/null
+++ b/runtime/doc/vimtu-it.1
@@ -0,0 +1,54 @@
+.TH VIMTUTOR 1 "2001 April 2"
+.SH NOME
+vimtutor \- the Vim tutor
+.SH SINTASSI
+.br
+.B vimtutor [lingua]
+.SH DESCRIZIONE
+.B Vimtutor
+inizia il
+.B Vim
+tutor.
+It copies the tutor file first, so that it can be modified without changing
+the original file.
+.PP
+The
+.B Vimtutor
+is useful for people that want to learn their first
+.B Vim
+commands.
+.PP
+The optional [language] argument is the two-letter name of a language, like
+"it" or "es".
+If the [language] argument is missing, the language of the current locale will
+be used.
+If a tutor in this language is available, it will be used.
+Otherwise the English version will be used.
+.PP
+.B Vim
+is always started in Vi compatible mode.
+.SH FILE
+.TP 15
+/usr/local/lib/vim/tutor/tutor[.language]
+The
+.B Vimtutor
+text file(s).
+.TP 15
+/usr/local/lib/vim/tutor/tutor.vim
+The Vim script used to copy the
+.B Vimtutor
+text file.
+.SH AUTORE
+The
+.B Vimtutor
+è stato scritto in origine per Vi da Michael C. Pierce e Robert K. Ware,
+Colorado School of Mines, usando idee fornite da Charles Smith,
+Colorado State University.
+E-mail: bware@mines.colorado.edu.
+.br
+E' stato modificato per
+.B Vim
+da Bram Moolenaar.
+Per i nomi dei traduttori, vedere i file usati nelle rispettive lingue.
+.SH VEDERE ANCHE
+vim(1)
diff --git a/runtime/doc/xxd-it.1 b/runtime/doc/xxd-it.1
new file mode 100755
index 000000000..9e6bc5fe7
--- /dev/null
+++ b/runtime/doc/xxd-it.1
@@ -0,0 +1,402 @@
+.TH XXD 1 "Agosto 1996" "Pagina di manuale per xxd"
+.\"
+.\" 21 Maggio 1996
+.\" Autore della pagina di manuale:
+.\" Tony Nugent <tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
+.\" Modificato da Bram Moolenaar <Bram@vim.org>
+.SH NOME
+.I xxd
+\- Produce esadecimale da un file binario o viceversa.
+.SH SINTASSI
+.B xxd
+\-h[elp]
+.br
+.B xxd
+[opzioni] [input_file [output_file]]
+.br
+.B xxd
+\-r[evert] [opzioni] [input_file [output_file]]
+.SH DESCRIZIONE
+.I xxd
+crea un'immagine esadecimale di un dato file o dello "standard input".
+Può anche ottenere da un'immagine esadecimale il file binario originale.
+Come
+.BR uuencode(1)
+e
+.BR uudecode(1)
+permette di trasmettere dati binari in una rapresentazione ASCII "a prova
+di email", ma ha anche il vantaggio di poter decodificare sullo "standard
+output". Inoltre, può essere usato per effettuare delle modifiche (patch)
+a file binari.
+.SH OPZIONI
+Se non si specifica un
+.I input_file
+il programma legge dallo "standard input".
+Se
+.I input_file
+è specificato come il carattere
+.RB \` \- '
+, l'input è letto dallo "standard input".
+Se non si specifica un
+.I output_file
+(o si mette al suo posto il carattere
+.RB \` \- '
+), i risultati sono inviati allo "standard output".
+.PP
+Si noti che la scansione dei caratteri è "pigra", e non controlla oltre
+la prima lettera dell'opzione, a meno che l'opzione sia seguita da un
+parametro.
+Gli spazi fra una singola lettera di opzione e il corrispondente parametro
+dopo di essa sono facoltativi.
+I parametri delle opzioni possono essere specificati usando la notazione
+decimale, esadecimale oppure ottale.
+Pertanto
+.BR \-c8 ,
+.BR "\-c 8" ,
+.B \-c 010
+e
+.B \-cols 8
+sono notazioni equivalenti fra loro.
+.PP
+.TP
+.IR \-a " | " \-autoskip
+Richiesta di autoskip: Un singolo '*' rimpiazza linee di zeri binari.
+Valore predefinito: off.
+.TP
+.IR \-b " | " \-bits
+Richiesta di una immagine binaria (cifre binarie), invece che esadecimale.
+Questa opzione scrive un byte come otto cifre "1" e "0" invece di usare i
+numeri esadecimali. Ogni linea è preceduta da un indirizzo in esadecimale e
+seguita da una decodifica ascii (o ebcdic). Le opzioni specificabili dalla
+linea comando \-r, \-p, \-i non funzionano in questo modo.
+.TP
+.IR "\-c colonne " | " \-cols colonne"
+.IR "\-c colonne " | " \-cols colonne"
+In ogni linea sono formattate
+.RI < colonne >
+colonne. Valore predefinito 16 (\-i: 12, \-ps: 30, \-b: 6).
+Valore massimo 256.
+.TP
+.IR \-E " | " \-EBCDIC
+Cambia la codifica della colonna di destra da ASCII a EBCDIC.
+Questo non modifica la rappresentazione esadecimale. Non ha senso
+specificare questa opzione in combinazione con \-r, \-p o \-i.
+.TP
+.IR "\-g bytes " | " \-groupsize bytes"
+Inserisci ogni
+.RI < bytes >
+bytes di output (di due caratteri esadecimali o otto numeri binari ognuno)
+uno spazio bianco.
+Specificando
+.I \-g 0
+i bytes di output non sono separati da alcuno spazio.
+.RI < Bytes "> ha come valore predefinito " 2
+in modalità normale [esadecimale] e \fI1\fP in modalità binaria.
+Il raggruppamento non si applica agli stili "PostScript" e "include".
+.TP
+.IR \-h " | " \-help
+stampa un sommario dei comandi disponibili ed esce. Non viene fatto
+null'altro.
+.TP
+.IR \-i " | " \-include
+L'output è nello stile dei file "include" in C. Viene preparata la
+definizione completa di un "array" [vettore], dandogli il nome del
+file di input), tranne che nel caso in cui xxd legga dallo "standard input".
+.TP
+.IR "\-l lunghezza " | " \-len lunghezza"
+Il programma esce dopo aver scritto
+.RI < lunghezza >
+bytes.
+.TP
+.IR \-p " | " \-ps " | " \-postscript " | " \-plain
+L'output è nello stile di un dump continuo sotto postscript.
+Noto anche come stile esadecimale semplice [plain].
+.TP
+.IR \-r " | " \-revert
+ricostruzione: converte (o mette una patch) a partire dall'immagine
+esadecimale, creando [o modificando] il file binario.
+Se non diretto allo "standard output", xxd scrive nel suo file di output
+in maniera continua, senza interruzioni. Usare la combinazione
+.I \-r \-p
+per leggere dump in stile esadecimale semplice [plain], senza l'informazione
+di numero di linea e senza un particolare tracciato di colonna. Degli spazi
+o delle linee vuote possono essere inserite a piacere [e vengono ingorate].
+.TP
+.I \-seek distanza
+Usato con l'opzione
+.I \-r
+: (ricostruzione),
+.RI < distanza >
+viene aggiunta alla posizione nel file trovata nella immagine
+esadecimale.
+.TP
+.I \-s [\+][\-]seek
+Inizia a
+.RI < seek >
+bytes assoluti (o relativi) di distanza all'interno di input_file.
+\fI\+ \fRindica che il "seek" è relativo alla posizione corrente nel file
+"standard input" (non significativa quando non si legge da "standard input").
+\fI\- \fRindica che il "seek" dovrebbe posizionarsi ad quel numero di
+caratteri dalla fine dell'input (o se in combinazione con
+\fI \+ \fR: prime della posizione corrente nel file "standard input").
+Se non si specifica una opzione \-s option, xxd inizia alla posizione
+corrente all'interno del file.
+.TP
+.I \-u
+usa lettere esadecimali maiuscole. Il valore predefinito è di usare
+lettere minuscole.
+.TP
+.IR \-v " | " \-version
+visualizza la stringa contenente la versione del programma.
+.SH ATTENZIONE
+.PP
+.I xxd \-r
+è capace di operare "magie" nell'utilizzare l'informazione "numero di linea".
+Se sul file di output ci si può posizionare usando la "seek", il numero di
+linea all'inizio di ogni riga esadecimale può essere non ordinato, delle
+linee possono mancare delle linee, oppure esserci delle sovrapposizioni.
+In simili casi xxd userà lseek(2) per raggiungere la posizione d'inizio.
+Se il file di output non consente di usare "seek", sono permessi solo dei
+"buchi", che saranno riempiti con zeri binari.
+.PP
+.I xxd \-r
+non genera mai errori di specifica parametri. I parametri non riconosciuti
+sono silenziosamente ignorati.
+.PP
+Nel modificare immagini esadecimali, tenete conto che
+.I xxd \-r
+salta il resto della linea, dopo aver letto abbastanza caratteri contenenti
+dati esadecimali (vedere opzione \-c). Ciò implica pure che le modifiche alle
+colonne di caratteri stampabili ascii (o ebcdic) sono sempre ignorate.
+La ricostruzione da un file immagine esadecimale in stile semplice
+(postscript) con xxd \-r \-p non dipende dal numero corrretto di colonne.
+IN questo caso, qualsiasi cosa assomigli a una coppia di cifre esadecimali
+è interpretata [e utilizzata].
+.PP
+Notare la differenza fra
+.br
+\fI% xxd \-i file\fR
+.br
+e
+.br
+\fI% xxd \-i \< file\fR
+.PP
+.I xxd \-s \+seek
+può comportarsi in modo diverso da
+.I xxd \-s seek
+, perché lseek(2) è usata per tornare indietro nel file di input. Il '+'
+fa differenza se il file di input è lo "standard input", e se la pozione nel
+file di "standard input" non è all'inizio del file quando xxd è eseguito,
+con questo input.
+I seguenti esempi possono contribuire a chiarire il concetto
+(o ad oscurarlo!)...
+.PP
+Riavvolge lo "standard input" prima di leggere; necessario perché `cat'
+ha già letto lo stesso file ["file"] fino alla fine dello "standard input".
+.br
+\fI% sh \-c 'cat > copia_normale; xxd \-s 0 > copia_esadecimale' < file
+.PP
+Stampa immagine esadecimale dalla posizione file 0x480 (=1024+128) in poi.
+Il segno `+' vuol dire "rispetto alla posizione corrente", quindi il `128'
+si aggiunge a 1k (1024) dove `dd' si era fermato.
+.br
+\fI% sh \-c 'dd of=normale bs=1k count=1; xxd \-s +128 > esadecimale' < file
+.PP
+Immagine esadecimale dalla posizione 0x100 ( = 1024-768 ) del file in avanti.
+.br
+\fI% sh \-c 'dd of=normale bs=1k count=1; xxd \-s +-768 > esadecimale' < file
+.PP
+Comunque, questo capita raramente, e l'uso del `+' di rado.
+L'autore preferisce monitorare il comportamento di xxd con strace(1) o
+truss(1), quando si usa l'opzione \-s.
+.SH ESEMPI
+.PP
+.br
+Stampa tutto tranne le prime tre linee (0x30 bytes esadecimali) di
+.B file
+\.
+.br
+\fI% xxd \-s 0x30 file
+.PP
+.br
+Stampa 3 linee (0x30 bytes esadecimali) alla fine di
+.B file
+\.
+.br
+\fI% xxd \-s \-0x30 file
+.PP
+.br
+Stampa 120 bytes come immagine esadecimale continua con 40 bytes per linea.
+.br
+\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
+
+.br
+2e54482058584420312022417567757374203139
+.br
+39362220224d616e75616c207061676520666f72
+.br
+20787864220a2e5c220a2e5c222032317374204d
+.br
+617920313939360a2e5c22204d616e2070616765
+.br
+20617574686f723a0a2e5c2220202020546f6e79
+.br
+204e7567656e74203c746f6e79407363746e7567
+.br
+
+.br
+Stampa i primi 120 bytes della pagina di manuale vim.1 a 12 bytes per linea.
+.br
+\fI% xxd \-l 120 \-c 12 xxd.1\fR
+
+
+.br
+0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A
+.br
+000000c: 7567 7573 7420 3139 3936 2220 ugust 1996"
+.br
+0000018: 224d 616e 7561 6c20 7061 6765 "Manual page
+.br
+0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\
+.br
+0000030: 220a 2e5c 2220 3231 7374 204d "..\" 21st M
+.br
+000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\"
+.br
+0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut
+.br
+0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\"
+.br
+0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent
+.br
+000006c: 3c74 6f6e 7940 7363 746e 7567 <tony@sctnug
+.PP
+.br
+Visualizza la data dal file xxd.1
+.br
+\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
+.br
+0000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996
+.PP
+.br
+Copiare
+.B input_file
+su
+.B output_file
+premettendogli 100 bytes a 0x00.
+.br
+\fI% xxd input_file | xxd \-r \-s 100 \> output_file\fR
+.br
+
+.br
+Modificare (patch) la data nel file xxd.1
+.br
+\fI% echo '0000037: 3574 68' | xxd \-r \- xxd.1\fR
+.br
+\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
+.br
+0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996
+.PP
+.br
+Creare un file di 65537 tutto a 0x00,
+tranne che l'ultimo carattere che è una 'A' (esadecimale 0x41).
+.br
+\fI% echo '010000: 41' | xxd \-r \> file\fR
+.PP
+.br
+Stampa una immagine esadecimale del file di cui sopra con opzione autoskip.
+.br
+\fI% xxd \-a \-c 12 file\fR
+.br
+0000000: 0000 0000 0000 0000 0000 0000 ............
+.br
+*
+.br
+000fffc: 0000 0000 40 ....A
+.PP
+Crea un file di 1 byte che contiene il solo carattere 'A'.
+Il numero dopo '\-r \-s' viene aggiunto a quello trovato nel file;
+in pratica, i bytes precedenti non sono stampati.
+.br
+\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> file\fR
+.PP
+Usare xxd come filtro all'interno di un editor come
+.B vim(1)
+per ottenere una immagine esadecimale di una parte di file
+delimitata dai mark `a' e `z'.
+.br
+\fI:'a,'z!xxd\fR
+.PP
+Usare xxd come filtro all'interno di un editor come
+.B vim(1)
+per ricostruire un pezzo di file binario da una immagine esadecimale
+delimitata dai mark `a' e `z'.
+.br
+\fI:'a,'z!xxd \-r\fR
+.PP
+Usare xxd come filtro all'interno di un editor come
+.B vim(1)
+per ricostruire una sola linea di file binario da una immagine esadecimale,
+Portare il cursore sopra la linea e battere:
+.br
+\fI!!xxd \-r\fR
+.PP
+Per leggere singoli charatteri da una linea seriale
+.br
+\fI% xxd \-c1 < /dev/term/b &\fR
+.br
+\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR
+.br
+\fI% echo \-n foo > /dev/term/b\fR
+.PP
+.SH CODICI DI RITORNO
+Il programma può restituire questi codici di errore:
+.TP
+0
+nessun errore rilevato.
+.TP
+\-1
+operazione non supportata (
+.I xxd \-r \-i
+non ancora possible).
+.TP
+1
+errore durante la scansione parametri.
+.TP
+2
+problemi con il file di input.
+.TP
+3
+problemi con il file di output.
+.TP
+4,5
+posizione "seek" specificata non raggiungibile all'interno del file.
+.SH VEDERE ANCHE
+uuencode(1), uudecode(1), patch(1)
+.br
+.SH AVVERTIMENTI
+La stranezza dello strumento rispecchia la mente del suo creatore.
+Usate a vostro rischio e pericolo. Copiate i file. Tracciate l'esecuzione.
+Diventate un mago.
+.br
+.SH VERSIONE
+Questa pagina di manuale documenta la versione 1.7 di xxd.
+.SH AUTORE
+.br
+(c) 1990-1997 Juergen Weigert
+.br
+<jnweiger@informatik.uni-erlangen.de>
+.LP
+Distribuite liberamente ed attribuitemi il credito,
+.br
+fate soldi e condivideteli con me
+.br
+perdete soldi e non venite a chiederli a me.
+.PP
+Pagina di manuale messa in piedi da Tony Nugent
+.br
+<tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
+.br
+Piccole modifiche di Bram Moolenaar.
+Modificato da Juergen Weigert.
+.PP
diff --git a/runtime/doc/xxd.1 b/runtime/doc/xxd.1
index fba0521d6..ccaeb2279 100644
--- a/runtime/doc/xxd.1
+++ b/runtime/doc/xxd.1
@@ -62,12 +62,11 @@ toggle autoskip: A single '*' replaces nul-lines. Default off.
.IR \-b " | " \-bits
Switch to bits (binary digits) dump, rather than hexdump.
This option writes octets as eight digits "1"s and "0"s instead of a normal
-hexacecimal dump. Each line is preceded by a line number in hexadecimal and
+hexadecimal dump. Each line is preceded by a line number in hexadecimal and
followed by an ascii (or ebcdic) representation. The command line switches
\-r, \-p, \-i do not work with this mode.
.TP
.IR "\-c cols " | " \-cols cols"
-.IR "\-c cols " | " \-cols cols"
format
.RI < cols >
octets per line. Default 16 (\-i: 12, \-ps: 30, \-b: 6). Max 256.
@@ -78,7 +77,7 @@ This does not change the hexadecimal representation. The option is
meaningless in combinations with \-r, \-p or \-i.
.TP
.IR "\-g bytes " | " \-groupsize bytes"
-seperate the output of every
+separate the output of every
.RI < bytes >
bytes (two hex characters or eight bit-digits each) by a whitespace.
Specify
@@ -139,7 +138,7 @@ show version string.
.PP
.I xxd \-r
has some builtin magic while evaluating line number information.
-If the ouput file is seekable, then the linenumbers at the start of each
+If the output file is seekable, then the linenumbers at the start of each
hexdump line may be out of order, lines may be missing, or overlapping. In
these cases xxd will lseek(2) to the next position. If the output file is not
seekable, only gaps are allowed, which will be filled by null-bytes.
@@ -152,7 +151,7 @@ When editing hexdumps, please note that
skips everything on the input line after reading enough columns of hexadecimal
data (see option \-c). This also means, that changes to the printable ascii (or
ebcdic) columns are always ignored. Reverting a plain (or postscript) style
-hexdump with xxd \-r \-p does not depend on the correct number of columns. Here an thing that looks like a pair of hex-digits is interpreted.
+hexdump with xxd \-r \-p does not depend on the correct number of columns. Here anything that looks like a pair of hex-digits is interpreted.
.PP
Note the difference between
.br
@@ -186,7 +185,7 @@ Hexdump from file position 0x100 ( = 1024-768) on.
\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +-768 > hex_snippet' < file
.PP
However, this is a rare situation and the use of `+' is rarely needed.
-the author prefers to monitor the effect of xxd with strace(1) or truss(1), whenever \-s is used.
+The author prefers to monitor the effect of xxd with strace(1) or truss(1), whenever \-s is used.
.SH EXAMPLES
.PP
.br
@@ -208,17 +207,17 @@ Print 120 bytes as continuous hexdump with 40 octets per line.
.br
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
.br
-2e544820585844203120224d616e75616c207061
+2e54482058584420312022417567757374203139
.br
-676520666f7220787864220a2e5c220a2e5c2220
+39362220224d616e75616c207061676520666f72
.br
-32317374204d617920313939360a2e5c22204d61
+20787864220a2e5c220a2e5c222032317374204d
.br
-6e207061676520617574686f723a0a2e5c222020
+617920313939360a2e5c22204d616e2070616765
.br
-2020546f6e79204e7567656e74203c746f6e7940
+20617574686f723a0a2e5c2220202020546f6e79
.br
-7363746e7567656e2e7070702e67752e6564752e
+204e7567656e74203c746f6e79407363746e7567
.br
.br
@@ -226,32 +225,32 @@ Hexdump the first 120 bytes of this man page with 12 octets per line.
.br
\fI% xxd \-l 120 \-c 12 xxd.1\fR
.br
-0000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
+0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A
.br
-000000c: 616e 7561 6c20 7061 6765 2066 anual page f
+000000c: 7567 7573 7420 3139 3936 2220 ugust 1996"
.br
-0000018: 6f72 2078 7864 220a 2e5c 220a or xxd"..\\".
+0000018: 224d 616e 7561 6c20 7061 6765 "Manual page
.br
-0000024: 2e5c 2220 3231 7374 204d 6179 .\\" 21st May
+0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\\
.br
-0000030: 2031 3939 360a 2e5c 2220 4d61 1996..\\" Ma
+0000030: 220a 2e5c 2220 3231 7374 204d "..\\" 21st M
.br
-000003c: 6e20 7061 6765 2061 7574 686f n page autho
+000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\\"
.br
-0000048: 723a 0a2e 5c22 2020 2020 546f r:..\\" To
+0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut
.br
-0000054: 6e79 204e 7567 656e 7420 3c74 ny Nugent <t
+0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\\"
.br
-0000060: 6f6e 7940 7363 746e 7567 656e ony@sctnugen
+0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent
.br
-000006c: 2e70 7070 2e67 752e 6564 752e .ppp.gu.edu.
+000006c: 3c74 6f6e 7940 7363 746e 7567 <tony@sctnug
.PP
.br
Display just the date from the file xxd.1
.br
-\fI% xxd \-s 0x28 \-l 12 \-c 12 xxd.1\fR
+\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
.br
-0000028: 3231 7374 204d 6179 2031 3939 21st May 199
+0000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996
.PP
.br
Copy
@@ -266,11 +265,11 @@ and prepend 100 bytes of value 0x00.
.br
Patch the date in the file xxd.1
.br
-\fI% echo '0000029: 3574 68' | xxd \-r \- xxd.1\fR
+\fI% echo '0000037: 3574 68' | xxd \-r \- xxd.1\fR
.br
-\fI% xxd \-s 0x28 \-l 12 \-c 12 xxd.1\fR
+\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
.br
-0000028: 3235 7468 204d 6179 2031 3939 25th May 199
+0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996
.PP
.br
Create a 65537 byte file with all bytes 0x00,
diff --git a/runtime/doc/xxd.man b/runtime/doc/xxd.man
index 37b22d6d9..00d75da41 100644
--- a/runtime/doc/xxd.man
+++ b/runtime/doc/xxd.man
@@ -1,9 +1,7 @@
+XXD(1) XXD(1)
-XXD(1) XXD(1)
-
-
NAME
xxd - make a hexdump or do the reverse.
@@ -13,239 +11,184 @@ SYNOPSIS
xxd -r[evert] [options] [infile [outfile]]
DESCRIPTION
- xxd creates a hex dump of a given file or standard input.
- It can also convert a hex dump back to its original binary
- form. Like uuencode(1) and uudecode(1) it allows the
- transmission of binary data in a `mail-safe' ASCII repre-
- sentation, but has the advantage of decoding to standard
- output. Moreover, it can be used to perform binary file
- patching.
+ xxd creates a hex dump of a given file or standard input. It can also
+ convert a hex dump back to its original binary form. Like uuencode(1)
+ and uudecode(1) it allows the transmission of binary data in a `mail-
+ safe' ASCII representation, but has the advantage of decoding to stan-
+ dard output. Moreover, it can be used to perform binary file patching.
OPTIONS
- If no infile is given, standard input is read. If infile
- is specified as a `-' character, then input is taken from
- standard input. If no outfile is given (or a `-' charac-
- ter is in its place), results are sent to standard output.
+ If no infile is given, standard input is read. If infile is specified
+ as a `-' character, then input is taken from standard input. If no
+ outfile is given (or a `-' character is in its place), results are sent
+ to standard output.
- Note that a "lazy" parser is used which does not check for
- more than the first option letter, unless the option is
- followed by a parameter. Spaces between a single option
- letter and its parameter are optional. Parameters to
- options can be specified in decimal, hexadecimal or octal
- notation. Thus -c8, -c 8, -c 010 and -cols 8 are all
- equivalent.
+ Note that a "lazy" parser is used which does not check for more than
+ the first option letter, unless the option is followed by a parameter.
+ Spaces between a single option letter and its parameter are optional.
+ Parameters to options can be specified in decimal, hexadecimal or octal
+ notation. Thus -c8, -c 8, -c 010 and -cols 8 are all equivalent.
-a | -autoskip
- toggle autoskip: A single '*' replaces nul-lines.
- Default off.
+ toggle autoskip: A single '*' replaces nul-lines. Default off.
-b | -bits
- Switch to bits (binary digits) dump, rather than
- hexdump. This option writes octets as eight digits
- "1"s and "0"s instead of a normal hexacecimal dump.
- Each line is preceded by a line number in hexadeci-
- mal and followed by an ascii (or ebcdic) represen-
- tation. The command line switches -r, -p, -i do not
- work with this mode.
+ Switch to bits (binary digits) dump, rather than hexdump. This
+ option writes octets as eight digits "1"s and "0"s instead of a
+ normal hexadecimal dump. Each line is preceded by a line number
+ in hexadecimal and followed by an ascii (or ebcdic) representa-
+ tion. The command line switches -r, -p, -i do not work with this
+ mode.
-c cols | -cols cols
- -c cols | -cols cols format <cols> octets per line.
- Default 16 (-i: 12, -ps: 30, -b: 6). Max 256.
+ format <cols> octets per line. Default 16 (-i: 12, -ps: 30, -b:
+ 6). Max 256.
-E | -EBCDIC
- Change the character encoding in the righthand col-
- umn from ASCII to EBCDIC. This does not change the
- hexadecimal representation. The option is meaning-
- less in combinations with -r, -p or -i.
-
-
-
-Manual page for xxd August 1996 1
-
-
-
-
-
-XXD(1) XXD(1)
-
+ Change the character encoding in the righthand column from ASCII
+ to EBCDIC. This does not change the hexadecimal representation.
+ The option is meaningless in combinations with -r, -p or -i.
-g bytes | -groupsize bytes
- seperate the output of every <bytes> bytes (two hex
- characters or eight bit-digits each) by a whites-
- pace. Specify -g 0 to suppress grouping. <Bytes>
- defaults to 2 in normal mode and 1 in bits mode.
- Grouping does not apply to postscript or include
+ separate the output of every <bytes> bytes (two hex characters
+ or eight bit-digits each) by a whitespace. Specify -g 0 to sup-
+ press grouping. <Bytes> defaults to 2 in normal mode and 1 in
+ bits mode. Grouping does not apply to postscript or include
style.
-h | -help
- print a summary of available commands and exit. No
- hex dumping is performed.
+ print a summary of available commands and exit. No hex dumping
+ is performed.
-i | -include
- output in C include file style. A complete static
- array definition is written (named after the input
- file), unless xxd reads from stdin.
+ output in C include file style. A complete static array defini-
+ tion is written (named after the input file), unless xxd reads
+ from stdin.
-l len | -len len
stop after writing <len> octets.
-p | -ps | -postscript | -plain
- output in postscript continuous hexdump style. Also
- known as plain hexdump style.
+ output in postscript continuous hexdump style. Also known as
+ plain hexdump style.
-r | -revert
- reverse operation: convert (or patch) hexdump into
- binary. If not writing to stdout, xxd writes into
- its output file without truncating it. Use the com-
- bination -r -p to read plain hexadecimal dumps
- without line number information and without a par-
- ticular column layout. Additional Whitespace and
- line-breaks are allowed anywhere.
+ reverse operation: convert (or patch) hexdump into binary. If
+ not writing to stdout, xxd writes into its output file without
+ truncating it. Use the combination -r -p to read plain hexadeci-
+ mal dumps without line number information and without a particu-
+ lar column layout. Additional Whitespace and line-breaks are
+ allowed anywhere.
-seek offset
- When used after -r : revert with <offset> added to
- file positions found in hexdump.
+ When used after -r : revert with <offset> added to file posi-
+ tions found in hexdump.
-s [+][-]seek
- start at <seek> bytes abs. (or rel.) infile offset.
- + indicates that the seek is relative to the cur-
- rent stdin file position (meaningless when not
- reading from stdin). - indicates that the seek
- should be that many characters from the end of the
- input (or if combined with
- + : before the current stdin file position).
- Without -s option, xxd starts at the current file
- position.
-
- -u use upper case hex letters. Default is lower case.
+ start at <seek> bytes abs. (or rel.) infile offset. + indicates
+ that the seek is relative to the current stdin file position
+ (meaningless when not reading from stdin). - indicates that the
+ seek should be that many characters from the end of the input
+ (or if combined with
+ + : before the current stdin file position). Without -s
+ option, xxd starts at the current file position.
+
+ -u use upper case hex letters. Default is lower case.
-v | -version
show version string.
-
-
-
-
-Manual page for xxd August 1996 2
-
-
-
-
-
-XXD(1) XXD(1)
-
-
CAVEATS
- xxd -r has some builtin magic while evaluating line number
- information. If the ouput file is seekable, then the
- linenumbers at the start of each hexdump line may be out
- of order, lines may be missing, or overlapping. In these
- cases xxd will lseek(2) to the next position. If the out-
- put file is not seekable, only gaps are allowed, which
- will be filled by null-bytes.
-
- xxd -r never generates parse errors. Garbage is silently
- skipped.
-
- When editing hexdumps, please note that xxd -r skips
- everything on the input line after reading enough columns
- of hexadecimal data (see option -c). This also means, that
- changes to the printable ascii (or ebcdic) columns are
- always ignored. Reverting a plain (or postscript) style
- hexdump with xxd -r -p does not depend on the correct num-
- ber of columns. Here an thing that looks like a pair of
- hex-digits is interpreted.
+ xxd -r has some builtin magic while evaluating line number information.
+ If the output file is seekable, then the linenumbers at the start of
+ each hexdump line may be out of order, lines may be missing, or over-
+ lapping. In these cases xxd will lseek(2) to the next position. If the
+ output file is not seekable, only gaps are allowed, which will be
+ filled by null-bytes.
+
+ xxd -r never generates parse errors. Garbage is silently skipped.
+
+ When editing hexdumps, please note that xxd -r skips everything on the
+ input line after reading enough columns of hexadecimal data (see option
+ -c). This also means, that changes to the printable ascii (or ebcdic)
+ columns are always ignored. Reverting a plain (or postscript) style
+ hexdump with xxd -r -p does not depend on the correct number of col-
+ umns. Here anything that looks like a pair of hex-digits is inter-
+ preted.
Note the difference between
% xxd -i file
and
% xxd -i < file
- xxd -s +seek may be different from xxd -s seek , as
- lseek(2) is used to "rewind" input. A '+' makes a differ-
- ence if the input source is stdin, and if stdin's file
- position is not at the start of the file by the time xxd
- is started and given its input. The following examples
- may help to clarify (or further confuse!)...
+ xxd -s +seek may be different from xxd -s seek , as lseek(2) is used to
+ "rewind" input. A '+' makes a difference if the input source is stdin,
+ and if stdin's file position is not at the start of the file by the
+ time xxd is started and given its input. The following examples may
+ help to clarify (or further confuse!)...
- Rewind stdin before reading; needed because the `cat' has
- already read to the end of stdin.
+ Rewind stdin before reading; needed because the `cat' has already read
+ to the end of stdin.
% sh -c 'cat > plain_copy; xxd -s 0 > hex_copy' < file
- Hexdump from file position 0x480 (=1024+128) onwards. The
- `+' sign means "relative to the current position", thus
- the `128' adds to the 1k where dd left off.
- % sh -c 'dd of=plain_snippet bs=1k count=1; xxd -s +128 >
- hex_snippet' < file
+ Hexdump from file position 0x480 (=1024+128) onwards. The `+' sign
+ means "relative to the current position", thus the `128' adds to the 1k
+ where dd left off.
+ % sh -c 'dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet'
+ < file
Hexdump from file position 0x100 ( = 1024-768) on.
- % sh -c 'dd of=plain_snippet bs=1k count=1; xxd -s +-768 >
- hex_snippet' < file
+ % sh -c 'dd of=plain_snippet bs=1k count=1; xxd -s +-768 > hex_snippet'
+ < file
- However, this is a rare situation and the use of `+' is
- rarely needed. the author prefers to monitor the effect
- of xxd with strace(1) or truss(1), whenever -s is used.
+ However, this is a rare situation and the use of `+' is rarely needed.
+ The author prefers to monitor the effect of xxd with strace(1) or
+ truss(1), whenever -s is used.
EXAMPLES
- Print everything but the first three lines (hex 0x30
- bytes) of file
-
-
-
-Manual page for xxd August 1996 3
-
-
-
-
-
-XXD(1) XXD(1)
-
-
+ Print everything but the first three lines (hex 0x30 bytes) of file
% xxd -s 0x30 file
Print 3 lines (hex 0x30 bytes) from the end of file
% xxd -s -0x30 file
- Print 120 bytes as continuous hexdump with 40 octets per
- line.
+ Print 120 bytes as continuous hexdump with 40 octets per line.
% xxd -l 120 -ps -c 20 xxd.1
- 2e544820585844203120224d616e75616c207061
- 676520666f7220787864220a2e5c220a2e5c2220
- 32317374204d617920313939360a2e5c22204d61
- 6e207061676520617574686f723a0a2e5c222020
- 2020546f6e79204e7567656e74203c746f6e7940
- 7363746e7567656e2e7070702e67752e6564752e
-
- Hexdump the first 120 bytes of this man page with 12
- octets per line.
+ 2e54482058584420312022417567757374203139
+ 39362220224d616e75616c207061676520666f72
+ 20787864220a2e5c220a2e5c222032317374204d
+ 617920313939360a2e5c22204d616e2070616765
+ 20617574686f723a0a2e5c2220202020546f6e79
+ 204e7567656e74203c746f6e79407363746e7567
+
+ Hexdump the first 120 bytes of this man page with 12 octets per line.
% xxd -l 120 -c 12 xxd.1
- 0000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
- 000000c: 616e 7561 6c20 7061 6765 2066 anual page f
- 0000018: 6f72 2078 7864 220a 2e5c 220a or xxd"..\".
- 0000024: 2e5c 2220 3231 7374 204d 6179 .\" 21st May
- 0000030: 2031 3939 360a 2e5c 2220 4d61 1996..\" Ma
- 000003c: 6e20 7061 6765 2061 7574 686f n page autho
- 0000048: 723a 0a2e 5c22 2020 2020 546f r:..\" To
- 0000054: 6e79 204e 7567 656e 7420 3c74 ny Nugent <t
- 0000060: 6f6e 7940 7363 746e 7567 656e ony@sctnugen
- 000006c: 2e70 7070 2e67 752e 6564 752e .ppp.gu.edu.
+ 0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A
+ 000000c: 7567 7573 7420 3139 3936 2220 ugust 1996"
+ 0000018: 224d 616e 7561 6c20 7061 6765 "Manual page
+ 0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\
+ 0000030: 220a 2e5c 2220 3231 7374 204d "..\" 21st M
+ 000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\"
+ 0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut
+ 0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\"
+ 0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent
+ 000006c: 3c74 6f6e 7940 7363 746e 7567 <tony@sctnug
Display just the date from the file xxd.1
- % xxd -s 0x28 -l 12 -c 12 xxd.1
- 0000028: 3231 7374 204d 6179 2031 3939 21st May 199
+ % xxd -s 0x36 -l 13 -c 13 xxd.1
+ 0000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996
- Copy input_file to output_file and prepend 100 bytes of
- value 0x00.
+ Copy input_file to output_file and prepend 100 bytes of value 0x00.
% xxd input_file | xxd -r -s 100 > output_file
Patch the date in the file xxd.1
- % echo '0000029: 3574 68' | xxd -r - xxd.1
- % xxd -s 0x28 -l 12 -c 12 xxd.1
- 0000028: 3235 7468 204d 6179 2031 3939 25th May 199
+ % echo '0000037: 3574 68' | xxd -r - xxd.1
+ % xxd -s 0x36 -l 13 -c 13 xxd.1
+ 0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996
- Create a 65537 byte file with all bytes 0x00, except for
- the last one which is 'A' (hex 0x41).
+ Create a 65537 byte file with all bytes 0x00, except for the last one
+ which is 'A' (hex 0x41).
% echo '010000: 41' | xxd -r > file
Hexdump this file with autoskip.
@@ -254,34 +197,21 @@ XXD(1) XXD(1)
*
000fffc: 0000 0000 40 ....A
- Create a 1 byte file containing a single 'A' character.
- The number after '-r -s' adds to the linenumbers found in
-
-
-
-Manual page for xxd August 1996 4
-
-
-
-
-
-XXD(1) XXD(1)
-
-
- the file; in effect, the leading bytes are suppressed.
+ Create a 1 byte file containing a single 'A' character. The number
+ after '-r -s' adds to the linenumbers found in the file; in effect, the
+ leading bytes are suppressed.
% echo '010000: 41' | xxd -r -s -0x10000 > file
- Use xxd as a filter within an editor such as vim(1) to
- hexdump a region marked between `a' and `z'.
+ Use xxd as a filter within an editor such as vim(1) to hexdump a region
+ marked between `a' and `z'.
:'a,'z!xxd
- Use xxd as a filter within an editor such as vim(1) to
- recover a binary hexdump marked between `a' and `z'.
+ Use xxd as a filter within an editor such as vim(1) to recover a binary
+ hexdump marked between `a' and `z'.
:'a,'z!xxd -r
- Use xxd as a filter within an editor such as vim(1) to
- recover one line of a hexdump. Move the cursor over the
- line and type:
+ Use xxd as a filter within an editor such as vim(1) to recover one line
+ of a hexdump. Move the cursor over the line and type:
!!xxd -r
Read single characters from a serial line
@@ -295,8 +225,7 @@ RETURN VALUES
0 no errors encountered.
- -1 operation not supported ( xxd -r -i still impossi-
- ble).
+ -1 operation not supported ( xxd -r -i still impossible).
1 error while parsing options.
@@ -310,9 +239,8 @@ SEE ALSO
uuencode(1), uudecode(1), patch(1)
WARNINGS
- The tools weirdness matches its creators brain. Use
- entirely at your own risk. Copy files. Trace it. Become a
- wizard.
+ The tools weirdness matches its creators brain. Use entirely at your
+ own risk. Copy files. Trace it. Become a wizard.
VERSION
This manual page documents xxd version 1.7
@@ -322,75 +250,14 @@ AUTHOR
<jnweiger@informatik.uni-erlangen.de>
Distribute freely and credit me,
-
-
-
-Manual page for xxd August 1996 5
-
-
-
-
-
-XXD(1) XXD(1)
-
-
make money and share with me,
lose money and don't ask me.
Manual page started by Tony Nugent
<tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
- Small changes by Bram Moolenaar. Edited by Juergen
- Weigert.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Small changes by Bram Moolenaar. Edited by Juergen Weigert.
-Manual page for xxd August 1996 6
+Manual page for xxd August 1996 XXD(1)
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index c10579e3b..946502637 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 Oct 14
+" Last Change: 2004 Nov 18
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1281,6 +1281,9 @@ au BufNewFile,BufRead *.sdl,*.pr setf sdl
" sed
au BufNewFile,BufRead *.sed setf sed
+" Sieve (RFC 3028)
+au BufNewFile,BufRead *.siv setf sieve
+
" Sendmail
au BufNewFile,BufRead sendmail.cf setf sm
diff --git a/runtime/ftplugin.vim b/runtime/ftplugin.vim
index 2c6455088..d0813268d 100644
--- a/runtime/ftplugin.vim
+++ b/runtime/ftplugin.vim
@@ -1,7 +1,7 @@
" Vim support file to switch on loading plugins for file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last change: 2003 May 10
+" Last change: 2004 Nov 22
if exists("did_load_ftplugin")
finish
@@ -14,7 +14,7 @@ augroup filetypeplugin
if expand("<amatch>") != ""
if exists("b:undo_ftplugin")
exe b:undo_ftplugin
- unlet b:undo_ftplugin b:did_ftplugin
+ unlet! b:undo_ftplugin b:did_ftplugin
endif
if &cpo =~# "S" && exists("b:did_ftplugin")
" In compatible mode options are reset to the global values, need to
diff --git a/runtime/ftplugin/lisp.vim b/runtime/ftplugin/lisp.vim
index 5bc25af87..948283334 100644
--- a/runtime/ftplugin/lisp.vim
+++ b/runtime/ftplugin/lisp.vim
@@ -1,8 +1,10 @@
" Vim filetype plugin
" Language: Lisp
-" Maintainer: Dorai Sitaram <ds26@gte.com>
-" URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
-" Last Change: May 15, 2003
+" Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
+" URL: http://iamphet.nm.ru/vim
+" Original author: Dorai Sitaram <ds26@gte.com>
+" Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
+" Last Change: Nov 8, 2004
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -18,3 +20,11 @@ setl define=^\\s*(def\\k*
setl formatoptions-=t
setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94
setl lisp
+
+" make comments behaviour like in c.vim
+" e.g. insertion of ;;; and ;; on normal "O" or "o" when staying in comment
+setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|#
+setl formatoptions+=croql
+" with smartindent # cause left alignment
+setl nosmartindent
+
diff --git a/runtime/ftplugin/perl.vim b/runtime/ftplugin/perl.vim
index 9f714a9fe..e8c801fc3 100644
--- a/runtime/ftplugin/perl.vim
+++ b/runtime/ftplugin/perl.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Perl
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
-" Last Change: 2004 May 16
+" Last Change: 2004 Dec 06
" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif
@@ -27,7 +27,7 @@ endif
" Provided by Ned Konz <ned at bike-nomad dot com>
"---------------------------------------------
-setlocal include=\\<\\(use\|require\\)\\>
+setlocal include=\\<\\(use\\|require\\)\\>
setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','')
setlocal define=[^A-Za-z_]
diff --git a/runtime/ftplugin/scheme.vim b/runtime/ftplugin/scheme.vim
index 7d34f7217..021c23a39 100644
--- a/runtime/ftplugin/scheme.vim
+++ b/runtime/ftplugin/scheme.vim
@@ -1,7 +1,26 @@
" Vim filetype plugin
" Language: Scheme
-" Maintainer: Dorai Sitaram <ds26@gte.com>
-" URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
-" Last Change: Apr 2, 2003
+" Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
+" URL: http://iamphet.nm.ru/vim
+" Original author: Dorai Sitaram <ds26@gte.com>
+" Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
+" Last Change: Nov 22, 2004
-run ftplugin/lisp.vim
+runtime! ftplugin/lisp.vim ftplugin/lisp_*.vim ftplugin/lisp/*.vim
+
+if exists("b:is_mzscheme") || exists("is_mzscheme")
+ " improve indenting
+ setl iskeyword+=#,%,^
+ setl lispwords+=module,parameterize,let-values,let*-values,letrec-values
+ setl lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case
+ setl lispwords+=define-signature,unit,unit/sig,compund-unit/sig,define-values/invoke-unit/sig
+endif
+
+if exists("b:is_chicken") || exists("is_chicken")
+ " improve indenting
+ setl iskeyword+=#,%,^
+ setl lispwords+=let-optionals,let-optionals*,declare
+ setl lispwords+=let-values,let*-values,letrec-values
+ setl lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case
+ setl lispwords+=cond-expand,and-let*,foreign-lambda,foreign-lambda*
+endif
diff --git a/runtime/indent/GenericIndent.vim b/runtime/indent/GenericIndent.vim
index 09ad927b4..83523df71 100644
--- a/runtime/indent/GenericIndent.vim
+++ b/runtime/indent/GenericIndent.vim
@@ -1,322 +1,322 @@
-" Vim indent file generic utility functions
-" Language: * (various)
-" Maintainer: Dave Silvia <dsilvia@mchsi.com>
-" Date: 6/30/2004
-
-" SUMMARY: To use GenericIndent, indent/<your_filename>.vim would have the
-" following general format:
-"
-" if exists("b:did_indent") | finish | endif
-" let b:did_indent = 1
-" runtime indent/GenericIndent.vim
-" let b:indentStmts=''
-" let b:dedentStmts=''
-" let b:allStmts=''
-" setlocal indentexpr=GenericIndent()
-" setlocal indentkeys=<your_keys>
-" call GenericIndentStmts(<your_stmts>)
-" call GenericDedentStmts(<your_stmts>)
-" call GenericAllStmts()
-"
-" END SUMMARY:
-
-" NOTE: b:indentStmts, b:dedentStmts, and b:allStmts need to be initialized
-" to '' before callin the functions because 'indent.vim' explicitly
-" 'unlet's b:did_indent. This means that the lists will compound if
-" you change back and forth between buffers. This is true as of
-" version 6.3, 6/23/2004.
-"
-" NOTE: By default, GenericIndent is case sensitive.
-" let b:case_insensitive=1 if you want to ignore case, e.g. DOS batch files
-
-" The function 'GenericIndent' is data driven and handles most all cases of
-" indent checking if you first set up the data. To use this function follow
-" the example below (taken from the file indent/MuPAD_source.vim)
-"
-" Before you start, source this file in indent/<your_script>.vim to have it
-" define functions for your use.
-"
-"runtime indent/GenericIndent.vim
-"
-" The data is in 5 sets:
-"
-" First, set the data set 'indentexpr' to GenericIndent().
-"
-"setlocal indentexpr=GenericIndent()
-"
-" Second, set the data set 'indentkeys' to the keywords/expressions that need
-" to be checked for 'indenting' _as_ they typed.
-"
-"setlocal indentkeys==end_proc,=else,=then,=elif,=end_if,=end_case,=until,=end_repeat,=end_domain,=end_for,=end_while,=end,o,O
-"
-" NOTE: 'o,O' at the end of the previous line says you wish to be called
-" whenever a newline is placed in the buffer. This allows the previous line
-" to be checked for indentation parameters.
-"
-" Third, set the data set 'b:indentStmts' to the keywords/expressions that, when
-" they are on a line _when_ you _press_ the _<Enter>_ key,
-" you wish to have the next line indented.
-"
-"call GenericIndentStmts('begin,if,then,else,elif,case,repeat,until,domain,do')
-"
-" Fourth, set the data set 'b:dedentStmts' to the keywords/expressions that, when
-" they are on a line you are currently typing, you wish to have that line
-" 'dedented' (having already been indented because of the previous line's
-" indentation).
-"
-"call GenericDedentStmts('end_proc,then,else,elif,end_if,end_case,until,end_repeat,end_domain,end_for,end_while,end')
-"
-" Fifth, set the data set 'b:allStmts' to the concatenation of the third and
-" fourth data sets, used for checking when more than one keyword/expression
-" is on a line.
-"
-"call GenericAllStmts()
-"
-" NOTE: GenericIndentStmts uses two variables: 'b:indentStmtOpen' and
-" 'b:indentStmtClose' which default to '\<' and '\>' respectively. You can
-" set (let) these to any value you wish before calling GenericIndentStmts with
-" your list. Similarly, GenericDedentStmts uses 'b:dedentStmtOpen' and
-" 'b:dedentStmtClose'.
-"
-" NOTE: Patterns may be used in the lists passed to Generic[In|De]dentStmts
-" since each element in the list is copied verbatim.
-"
-" Optionally, you can set the DEBUGGING flag within your script to have the
-" debugging messages output. See below for description. This can also be set
-" (let) from the command line within your editing buffer.
-"
-"let b:DEBUGGING=1
-"
-" See:
-" :h runtime
-" :set runtimepath ?
-" to familiarize yourself with how this works and where you should have this
-" file and your file(s) installed.
-"
-" For help with setting 'indentkeys' see:
-" :h indentkeys
-" Also, for some good examples see 'indent/sh.vim' and 'indent/vim.vim' as
-" well as files for other languages you may be familiar with.
-"
-"
-" Alternatively, if you'd rather specify yourself, you can enter
-" 'b:indentStmts', 'b:dedentStmts', and 'b:allStmts' 'literally':
-"
-"let b:indentStmts='\<begin\>\|\<if\>\|\<then\>\|\<else\>\|\<elif\>\|\<case\>\|\<repeat\>\|\<until\>\|\<domain\>\|\<do\>'
-"let b:dedentStmts='\<end_proc\>\|\<else\>\|\<elif\>\|\<end_if\>\|\<end_case\>\|\<until\>\|\<end_repeat\>\|\<end_domain\>\|\<end_for\>\|\<end_while\>\|\<end\>'
-"let b:allStmts=b:indentStmts.'\|'.b:dedentStmts
-"
-" This is only useful if you have particularly different parameters for
-" matching each statement.
-
-" RECAP: From indent/MuPAD_source.vim
-"
-"if exists("b:did_indent") | finish | endif
-"
-"let b:did_indent = 1
-"
-"runtime indent/GenericIndent.vim
-"
-"setlocal indentexpr=GenericIndent()
-"setlocal indentkeys==end_proc,=then,=else,=elif,=end_if,=end_case,=until,=end_repeat,=end_domain,=end_for,=end_while,=end,o,O
-"call GenericIndentStmts('begin,if,then,else,elif,case,repeat,until,domain,do')
-"call GenericDedentStmts('end_proc,then,else,elif,end_if,end_case,until,end_repeat,end_domain,end_for,end_while,end')
-"call GenericAllStmts()
-"
-" END RECAP:
-
-let s:hit=0
-let s:lastVlnum=0
-let s:myScriptName=expand("<sfile>:t")
-
-if exists("*GenericIndent")
- finish
-endif
-
-function GenericAllStmts()
- let b:allStmts=b:indentStmts.'\|'.b:dedentStmts
- call DebugGenericIndent(expand("<sfile>").": "."b:indentStmts: ".b:indentStmts.", b:dedentStmts: ".b:dedentStmts.", b:allStmts: ".b:allStmts)
-endfunction
-
-function GenericIndentStmts(stmts)
- let Stmts=a:stmts
- let Comma=match(Stmts,',')
- if Comma == -1 || Comma == strlen(Stmts)-1
- echoerr "Must supply a comma separated list of at least 2 entries."
- echoerr "Supplied list: <".Stmts.">"
- return
- endif
-
- if !exists("b:indentStmtOpen")
- let b:indentStmtOpen='\<'
- endif
- if !exists("b:indentStmtClose")
- let b:indentStmtClose='\>'
- endif
- if !exists("b:indentStmts")
- let b:indentStmts=''
- endif
- if b:indentStmts != ''
- let b:indentStmts=b:indentStmts.'\|'
- endif
- call DebugGenericIndent(expand("<sfile>").": "."b:indentStmtOpen: ".b:indentStmtOpen.", b:indentStmtClose: ".b:indentStmtClose.", b:indentStmts: ".b:indentStmts.", Stmts: ".Stmts)
- let stmtEntryBegin=0
- let stmtEntryEnd=Comma
- let stmtEntry=strpart(Stmts,stmtEntryBegin,stmtEntryEnd-stmtEntryBegin)
- let Stmts=strpart(Stmts,Comma+1)
- let Comma=match(Stmts,',')
- let b:indentStmts=b:indentStmts.b:indentStmtOpen.stmtEntry.b:indentStmtClose
- while Comma != -1
- let stmtEntryEnd=Comma
- let stmtEntry=strpart(Stmts,stmtEntryBegin,stmtEntryEnd-stmtEntryBegin)
- let Stmts=strpart(Stmts,Comma+1)
- let Comma=match(Stmts,',')
- let b:indentStmts=b:indentStmts.'\|'.b:indentStmtOpen.stmtEntry.b:indentStmtClose
- endwhile
- let stmtEntry=Stmts
- let b:indentStmts=b:indentStmts.'\|'.b:indentStmtOpen.stmtEntry.b:indentStmtClose
-endfunction
-
-function GenericDedentStmts(stmts)
- let Stmts=a:stmts
- let Comma=match(Stmts,',')
- if Comma == -1 || Comma == strlen(Stmts)-1
- echoerr "Must supply a comma separated list of at least 2 entries."
- echoerr "Supplied list: <".Stmts.">"
- return
- endif
-
- if !exists("b:dedentStmtOpen")
- let b:dedentStmtOpen='\<'
- endif
- if !exists("b:dedentStmtClose")
- let b:dedentStmtClose='\>'
- endif
- if !exists("b:dedentStmts")
- let b:dedentStmts=''
- endif
- if b:dedentStmts != ''
- let b:dedentStmts=b:dedentStmts.'\|'
- endif
- call DebugGenericIndent(expand("<sfile>").": "."b:dedentStmtOpen: ".b:dedentStmtOpen.", b:dedentStmtClose: ".b:dedentStmtClose.", b:dedentStmts: ".b:dedentStmts.", Stmts: ".Stmts)
- let stmtEntryBegin=0
- let stmtEntryEnd=Comma
- let stmtEntry=strpart(Stmts,stmtEntryBegin,stmtEntryEnd-stmtEntryBegin)
- let Stmts=strpart(Stmts,Comma+1)
- let Comma=match(Stmts,',')
- let b:dedentStmts=b:dedentStmts.b:dedentStmtOpen.stmtEntry.b:dedentStmtClose
- while Comma != -1
- let stmtEntryEnd=Comma
- let stmtEntry=strpart(Stmts,stmtEntryBegin,stmtEntryEnd-stmtEntryBegin)
- let Stmts=strpart(Stmts,Comma+1)
- let Comma=match(Stmts,',')
- let b:dedentStmts=b:dedentStmts.'\|'.b:dedentStmtOpen.stmtEntry.b:dedentStmtClose
- endwhile
- let stmtEntry=Stmts
- let b:dedentStmts=b:dedentStmts.'\|'.b:dedentStmtOpen.stmtEntry.b:dedentStmtClose
-endfunction
-
-" Debugging function. Displays messages in the command area which can be
-" reviewed using ':messages'. To turn it on use ':let b:DEBUGGING=1'. Once
-" on, turn off by using ':let b:DEBUGGING=0. If you don't want it at all and
-" feel it's slowing down your editing (you must have an _awfully_ slow
-" machine!;-> ), you can just comment out the calls to it from 'GenericIndent'
-" below. No need to remove the function or the calls, tho', as you never can
-" tell when they might come in handy!;-)
-function DebugGenericIndent(msg)
- if exists("b:DEBUGGING") && b:DEBUGGING
- echomsg '['.s:hit.']'.s:myScriptName."::".a:msg
- endif
-endfunction
-
-function GenericIndent()
- " save ignore case option. Have to set noignorecase for the match
- " functions to do their job the way we want them to!
- " NOTE: if you add a return to this function be sure you do
- " if IgnoreCase | set ignorecase | endif
- " before returning. You can just cut and paste from here.
- let IgnoreCase=&ignorecase
- " let b:case_insensitive=1 if you want to ignore case, e.g. DOS batch files
- if !exists("b:case_insensitive")
- set noignorecase
- endif
- " this is used to let DebugGenericIndent display which invocation of the
- " function goes with which messages.
- let s:hit=s:hit+1
- let lnum=v:lnum
- let cline=getline(lnum)
- let lnum=prevnonblank(lnum)
- if lnum==0 | if IgnoreCase | set ignorecase | endif | return 0 | endif
- let pline=getline(lnum)
- let ndnt=indent(lnum)
- if !exists("b:allStmts")
- call GenericAllStmts()
- endif
-
- call DebugGenericIndent(expand("<sfile>").": "."cline=<".cline.">, pline=<".pline.">, lnum=".lnum.", v:lnum=".v:lnum.", ndnt=".ndnt)
- if lnum==v:lnum
- " current line, only check dedent
- "
- " just dedented this line, don't need to do it again.
- " another dedentStmts was added or an end%[_*] was completed.
- if s:lastVlnum==v:lnum
- if IgnoreCase | set ignorecase | endif
- return ndnt
- endif
- let s:lastVlnum=v:lnum
- call DebugGenericIndent(expand("<sfile>").": "."Checking dedent")
- let srcStr=cline
- let dedentKeyBegin=match(srcStr,b:dedentStmts)
- if dedentKeyBegin != -1
- let dedentKeyEnd=matchend(srcStr,b:dedentStmts)
- let dedentKeyStr=strpart(srcStr,dedentKeyBegin,dedentKeyEnd-dedentKeyBegin)
- "only dedent if it's the beginning of the line
- if match(srcStr,'^\s*\<'.dedentKeyStr.'\>') != -1
- call DebugGenericIndent(expand("<sfile>").": "."It's the beginning of the line, dedent")
- let ndnt=ndnt-&shiftwidth
- endif
- endif
- call DebugGenericIndent(expand("<sfile>").": "."dedent - returning ndnt=".ndnt)
- else
- " previous line, only check indent
- call DebugGenericIndent(expand("<sfile>").": "."Checking indent")
- let srcStr=pline
- let indentKeyBegin=match(srcStr,b:indentStmts)
- if indentKeyBegin != -1
- " only indent if it's the last indentStmts in the line
- let allKeyBegin=match(srcStr,b:allStmts)
- let allKeyEnd=matchend(srcStr,b:allStmts)
- let allKeyStr=strpart(srcStr,allKeyBegin,allKeyEnd-allKeyBegin)
- let srcStr=strpart(srcStr,allKeyEnd)
- let allKeyBegin=match(srcStr,b:allStmts)
- if allKeyBegin != -1
- " not the end of the line, check what is and only indent if
- " it's an indentStmts
- call DebugGenericIndent(expand("<sfile>").": "."Multiple words in line, checking if last is indent")
- while allKeyBegin != -1
- let allKeyEnd=matchend(srcStr,b:allStmts)
- let allKeyStr=strpart(srcStr,allKeyBegin,allKeyEnd-allKeyBegin)
- let srcStr=strpart(srcStr,allKeyEnd)
- let allKeyBegin=match(srcStr,b:allStmts)
- endwhile
- if match(b:indentStmts,allKeyStr) != -1
- call DebugGenericIndent(expand("<sfile>").": "."Last word in line is indent")
- let ndnt=ndnt+&shiftwidth
- endif
- else
- " it's the last indentStmts in the line, go ahead and indent
- let ndnt=ndnt+&shiftwidth
- endif
- endif
- call DebugGenericIndent(expand("<sfile>").": "."indent - returning ndnt=".ndnt)
- endif
- if IgnoreCase | set ignorecase | endif
- return ndnt
-endfunction
-
-
-" TODO: I'm open!
-"
-" BUGS: You tell me! Probably. I just haven't found one yet or haven't been
-" told about one.
-"
+" Vim indent file generic utility functions
+" Language: * (various)
+" Maintainer: Dave Silvia <dsilvia@mchsi.com>
+" Date: 6/30/2004
+
+" SUMMARY: To use GenericIndent, indent/<your_filename>.vim would have the
+" following general format:
+"
+" if exists("b:did_indent") | finish | endif
+" let b:did_indent = 1
+" runtime indent/GenericIndent.vim
+" let b:indentStmts=''
+" let b:dedentStmts=''
+" let b:allStmts=''
+" setlocal indentexpr=GenericIndent()
+" setlocal indentkeys=<your_keys>
+" call GenericIndentStmts(<your_stmts>)
+" call GenericDedentStmts(<your_stmts>)
+" call GenericAllStmts()
+"
+" END SUMMARY:
+
+" NOTE: b:indentStmts, b:dedentStmts, and b:allStmts need to be initialized
+" to '' before callin the functions because 'indent.vim' explicitly
+" 'unlet's b:did_indent. This means that the lists will compound if
+" you change back and forth between buffers. This is true as of
+" version 6.3, 6/23/2004.
+"
+" NOTE: By default, GenericIndent is case sensitive.
+" let b:case_insensitive=1 if you want to ignore case, e.g. DOS batch files
+
+" The function 'GenericIndent' is data driven and handles most all cases of
+" indent checking if you first set up the data. To use this function follow
+" the example below (taken from the file indent/MuPAD_source.vim)
+"
+" Before you start, source this file in indent/<your_script>.vim to have it
+" define functions for your use.
+"
+"runtime indent/GenericIndent.vim
+"
+" The data is in 5 sets:
+"
+" First, set the data set 'indentexpr' to GenericIndent().
+"
+"setlocal indentexpr=GenericIndent()
+"
+" Second, set the data set 'indentkeys' to the keywords/expressions that need
+" to be checked for 'indenting' _as_ they typed.
+"
+"setlocal indentkeys==end_proc,=else,=then,=elif,=end_if,=end_case,=until,=end_repeat,=end_domain,=end_for,=end_while,=end,o,O
+"
+" NOTE: 'o,O' at the end of the previous line says you wish to be called
+" whenever a newline is placed in the buffer. This allows the previous line
+" to be checked for indentation parameters.
+"
+" Third, set the data set 'b:indentStmts' to the keywords/expressions that, when
+" they are on a line _when_ you _press_ the _<Enter>_ key,
+" you wish to have the next line indented.
+"
+"call GenericIndentStmts('begin,if,then,else,elif,case,repeat,until,domain,do')
+"
+" Fourth, set the data set 'b:dedentStmts' to the keywords/expressions that, when
+" they are on a line you are currently typing, you wish to have that line
+" 'dedented' (having already been indented because of the previous line's
+" indentation).
+"
+"call GenericDedentStmts('end_proc,then,else,elif,end_if,end_case,until,end_repeat,end_domain,end_for,end_while,end')
+"
+" Fifth, set the data set 'b:allStmts' to the concatenation of the third and
+" fourth data sets, used for checking when more than one keyword/expression
+" is on a line.
+"
+"call GenericAllStmts()
+"
+" NOTE: GenericIndentStmts uses two variables: 'b:indentStmtOpen' and
+" 'b:indentStmtClose' which default to '\<' and '\>' respectively. You can
+" set (let) these to any value you wish before calling GenericIndentStmts with
+" your list. Similarly, GenericDedentStmts uses 'b:dedentStmtOpen' and
+" 'b:dedentStmtClose'.
+"
+" NOTE: Patterns may be used in the lists passed to Generic[In|De]dentStmts
+" since each element in the list is copied verbatim.
+"
+" Optionally, you can set the DEBUGGING flag within your script to have the
+" debugging messages output. See below for description. This can also be set
+" (let) from the command line within your editing buffer.
+"
+"let b:DEBUGGING=1
+"
+" See:
+" :h runtime
+" :set runtimepath ?
+" to familiarize yourself with how this works and where you should have this
+" file and your file(s) installed.
+"
+" For help with setting 'indentkeys' see:
+" :h indentkeys
+" Also, for some good examples see 'indent/sh.vim' and 'indent/vim.vim' as
+" well as files for other languages you may be familiar with.
+"
+"
+" Alternatively, if you'd rather specify yourself, you can enter
+" 'b:indentStmts', 'b:dedentStmts', and 'b:allStmts' 'literally':
+"
+"let b:indentStmts='\<begin\>\|\<if\>\|\<then\>\|\<else\>\|\<elif\>\|\<case\>\|\<repeat\>\|\<until\>\|\<domain\>\|\<do\>'
+"let b:dedentStmts='\<end_proc\>\|\<else\>\|\<elif\>\|\<end_if\>\|\<end_case\>\|\<until\>\|\<end_repeat\>\|\<end_domain\>\|\<end_for\>\|\<end_while\>\|\<end\>'
+"let b:allStmts=b:indentStmts.'\|'.b:dedentStmts
+"
+" This is only useful if you have particularly different parameters for
+" matching each statement.
+
+" RECAP: From indent/MuPAD_source.vim
+"
+"if exists("b:did_indent") | finish | endif
+"
+"let b:did_indent = 1
+"
+"runtime indent/GenericIndent.vim
+"
+"setlocal indentexpr=GenericIndent()
+"setlocal indentkeys==end_proc,=then,=else,=elif,=end_if,=end_case,=until,=end_repeat,=end_domain,=end_for,=end_while,=end,o,O
+"call GenericIndentStmts('begin,if,then,else,elif,case,repeat,until,domain,do')
+"call GenericDedentStmts('end_proc,then,else,elif,end_if,end_case,until,end_repeat,end_domain,end_for,end_while,end')
+"call GenericAllStmts()
+"
+" END RECAP:
+
+let s:hit=0
+let s:lastVlnum=0
+let s:myScriptName=expand("<sfile>:t")
+
+if exists("*GenericIndent")
+ finish
+endif
+
+function GenericAllStmts()
+ let b:allStmts=b:indentStmts.'\|'.b:dedentStmts
+ call DebugGenericIndent(expand("<sfile>").": "."b:indentStmts: ".b:indentStmts.", b:dedentStmts: ".b:dedentStmts.", b:allStmts: ".b:allStmts)
+endfunction
+
+function GenericIndentStmts(stmts)
+ let Stmts=a:stmts
+ let Comma=match(Stmts,',')
+ if Comma == -1 || Comma == strlen(Stmts)-1
+ echoerr "Must supply a comma separated list of at least 2 entries."
+ echoerr "Supplied list: <".Stmts.">"
+ return
+ endif
+
+ if !exists("b:indentStmtOpen")
+ let b:indentStmtOpen='\<'
+ endif
+ if !exists("b:indentStmtClose")
+ let b:indentStmtClose='\>'
+ endif
+ if !exists("b:indentStmts")
+ let b:indentStmts=''
+ endif
+ if b:indentStmts != ''
+ let b:indentStmts=b:indentStmts.'\|'
+ endif
+ call DebugGenericIndent(expand("<sfile>").": "."b:indentStmtOpen: ".b:indentStmtOpen.", b:indentStmtClose: ".b:indentStmtClose.", b:indentStmts: ".b:indentStmts.", Stmts: ".Stmts)
+ let stmtEntryBegin=0
+ let stmtEntryEnd=Comma
+ let stmtEntry=strpart(Stmts,stmtEntryBegin,stmtEntryEnd-stmtEntryBegin)
+ let Stmts=strpart(Stmts,Comma+1)
+ let Comma=match(Stmts,',')
+ let b:indentStmts=b:indentStmts.b:indentStmtOpen.stmtEntry.b:indentStmtClose
+ while Comma != -1
+ let stmtEntryEnd=Comma
+ let stmtEntry=strpart(Stmts,stmtEntryBegin,stmtEntryEnd-stmtEntryBegin)
+ let Stmts=strpart(Stmts,Comma+1)
+ let Comma=match(Stmts,',')
+ let b:indentStmts=b:indentStmts.'\|'.b:indentStmtOpen.stmtEntry.b:indentStmtClose
+ endwhile
+ let stmtEntry=Stmts
+ let b:indentStmts=b:indentStmts.'\|'.b:indentStmtOpen.stmtEntry.b:indentStmtClose
+endfunction
+
+function GenericDedentStmts(stmts)
+ let Stmts=a:stmts
+ let Comma=match(Stmts,',')
+ if Comma == -1 || Comma == strlen(Stmts)-1
+ echoerr "Must supply a comma separated list of at least 2 entries."
+ echoerr "Supplied list: <".Stmts.">"
+ return
+ endif
+
+ if !exists("b:dedentStmtOpen")
+ let b:dedentStmtOpen='\<'
+ endif
+ if !exists("b:dedentStmtClose")
+ let b:dedentStmtClose='\>'
+ endif
+ if !exists("b:dedentStmts")
+ let b:dedentStmts=''
+ endif
+ if b:dedentStmts != ''
+ let b:dedentStmts=b:dedentStmts.'\|'
+ endif
+ call DebugGenericIndent(expand("<sfile>").": "."b:dedentStmtOpen: ".b:dedentStmtOpen.", b:dedentStmtClose: ".b:dedentStmtClose.", b:dedentStmts: ".b:dedentStmts.", Stmts: ".Stmts)
+ let stmtEntryBegin=0
+ let stmtEntryEnd=Comma
+ let stmtEntry=strpart(Stmts,stmtEntryBegin,stmtEntryEnd-stmtEntryBegin)
+ let Stmts=strpart(Stmts,Comma+1)
+ let Comma=match(Stmts,',')
+ let b:dedentStmts=b:dedentStmts.b:dedentStmtOpen.stmtEntry.b:dedentStmtClose
+ while Comma != -1
+ let stmtEntryEnd=Comma
+ let stmtEntry=strpart(Stmts,stmtEntryBegin,stmtEntryEnd-stmtEntryBegin)
+ let Stmts=strpart(Stmts,Comma+1)
+ let Comma=match(Stmts,',')
+ let b:dedentStmts=b:dedentStmts.'\|'.b:dedentStmtOpen.stmtEntry.b:dedentStmtClose
+ endwhile
+ let stmtEntry=Stmts
+ let b:dedentStmts=b:dedentStmts.'\|'.b:dedentStmtOpen.stmtEntry.b:dedentStmtClose
+endfunction
+
+" Debugging function. Displays messages in the command area which can be
+" reviewed using ':messages'. To turn it on use ':let b:DEBUGGING=1'. Once
+" on, turn off by using ':let b:DEBUGGING=0. If you don't want it at all and
+" feel it's slowing down your editing (you must have an _awfully_ slow
+" machine!;-> ), you can just comment out the calls to it from 'GenericIndent'
+" below. No need to remove the function or the calls, tho', as you never can
+" tell when they might come in handy!;-)
+function DebugGenericIndent(msg)
+ if exists("b:DEBUGGING") && b:DEBUGGING
+ echomsg '['.s:hit.']'.s:myScriptName."::".a:msg
+ endif
+endfunction
+
+function GenericIndent()
+ " save ignore case option. Have to set noignorecase for the match
+ " functions to do their job the way we want them to!
+ " NOTE: if you add a return to this function be sure you do
+ " if IgnoreCase | set ignorecase | endif
+ " before returning. You can just cut and paste from here.
+ let IgnoreCase=&ignorecase
+ " let b:case_insensitive=1 if you want to ignore case, e.g. DOS batch files
+ if !exists("b:case_insensitive")
+ set noignorecase
+ endif
+ " this is used to let DebugGenericIndent display which invocation of the
+ " function goes with which messages.
+ let s:hit=s:hit+1
+ let lnum=v:lnum
+ let cline=getline(lnum)
+ let lnum=prevnonblank(lnum)
+ if lnum==0 | if IgnoreCase | set ignorecase | endif | return 0 | endif
+ let pline=getline(lnum)
+ let ndnt=indent(lnum)
+ if !exists("b:allStmts")
+ call GenericAllStmts()
+ endif
+
+ call DebugGenericIndent(expand("<sfile>").": "."cline=<".cline.">, pline=<".pline.">, lnum=".lnum.", v:lnum=".v:lnum.", ndnt=".ndnt)
+ if lnum==v:lnum
+ " current line, only check dedent
+ "
+ " just dedented this line, don't need to do it again.
+ " another dedentStmts was added or an end%[_*] was completed.
+ if s:lastVlnum==v:lnum
+ if IgnoreCase | set ignorecase | endif
+ return ndnt
+ endif
+ let s:lastVlnum=v:lnum
+ call DebugGenericIndent(expand("<sfile>").": "."Checking dedent")
+ let srcStr=cline
+ let dedentKeyBegin=match(srcStr,b:dedentStmts)
+ if dedentKeyBegin != -1
+ let dedentKeyEnd=matchend(srcStr,b:dedentStmts)
+ let dedentKeyStr=strpart(srcStr,dedentKeyBegin,dedentKeyEnd-dedentKeyBegin)
+ "only dedent if it's the beginning of the line
+ if match(srcStr,'^\s*\<'.dedentKeyStr.'\>') != -1
+ call DebugGenericIndent(expand("<sfile>").": "."It's the beginning of the line, dedent")
+ let ndnt=ndnt-&shiftwidth
+ endif
+ endif
+ call DebugGenericIndent(expand("<sfile>").": "."dedent - returning ndnt=".ndnt)
+ else
+ " previous line, only check indent
+ call DebugGenericIndent(expand("<sfile>").": "."Checking indent")
+ let srcStr=pline
+ let indentKeyBegin=match(srcStr,b:indentStmts)
+ if indentKeyBegin != -1
+ " only indent if it's the last indentStmts in the line
+ let allKeyBegin=match(srcStr,b:allStmts)
+ let allKeyEnd=matchend(srcStr,b:allStmts)
+ let allKeyStr=strpart(srcStr,allKeyBegin,allKeyEnd-allKeyBegin)
+ let srcStr=strpart(srcStr,allKeyEnd)
+ let allKeyBegin=match(srcStr,b:allStmts)
+ if allKeyBegin != -1
+ " not the end of the line, check what is and only indent if
+ " it's an indentStmts
+ call DebugGenericIndent(expand("<sfile>").": "."Multiple words in line, checking if last is indent")
+ while allKeyBegin != -1
+ let allKeyEnd=matchend(srcStr,b:allStmts)
+ let allKeyStr=strpart(srcStr,allKeyBegin,allKeyEnd-allKeyBegin)
+ let srcStr=strpart(srcStr,allKeyEnd)
+ let allKeyBegin=match(srcStr,b:allStmts)
+ endwhile
+ if match(b:indentStmts,allKeyStr) != -1
+ call DebugGenericIndent(expand("<sfile>").": "."Last word in line is indent")
+ let ndnt=ndnt+&shiftwidth
+ endif
+ else
+ " it's the last indentStmts in the line, go ahead and indent
+ let ndnt=ndnt+&shiftwidth
+ endif
+ endif
+ call DebugGenericIndent(expand("<sfile>").": "."indent - returning ndnt=".ndnt)
+ endif
+ if IgnoreCase | set ignorecase | endif
+ return ndnt
+endfunction
+
+
+" TODO: I'm open!
+"
+" BUGS: You tell me! Probably. I just haven't found one yet or haven't been
+" told about one.
+"
diff --git a/runtime/indent/ada.vim b/runtime/indent/ada.vim
index 72e2e80e5..9601181bd 100644
--- a/runtime/indent/ada.vim
+++ b/runtime/indent/ada.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: Ada
" Maintainer: Neil Bird <neil@fnxweb.com>
-" Last Change: 2003 May 20
+" Last Change: 2004 Nov 23
" Version: $Id$
" Look for the latest version at http://vim.sourceforge.net/
"
@@ -25,11 +25,11 @@ if exists("*GetAdaIndent")
finish
endif
-let s:AdaBlockStart = '^\s*\(if\>\|while\>\|else\>\|elsif\>\|loop\>\|for\>.*\<loop\>\|declare\>\|begin\>\|type\>.*\<is\s*$\|\(type\>.*\)\=\<record\>\|procedure\>\|function\>\|accept\>\|do\>\|task\>\|package\>\|then\>\|when\>\|is\>\)'
+let s:AdaBlockStart = '^\s*\(if\>\|while\>\|else\>\|elsif\>\|loop\>\|for\>.*\<\(loop\|use\)\>\|declare\>\|begin\>\|type\>.*\<is\>[^;]*$\|\(type\>.*\)\=\<record\>\|procedure\>\|function\>\|accept\>\|do\>\|task\>\|package\>\|then\>\|when\>\|is\>\)'
let s:AdaComment = "\\v^(\"[^\"]*\"|'.'|[^\"']){-}\\zs\\s*--.*"
-" Try to find indent of the block we're in (and about to complete)
+" Try to find indent of the block we're in
" prev_indent = the previous line's indent
" prev_lnum = previous line (to start looking on)
" blockstart = expr. that indicates a possible start of this block
@@ -44,7 +44,7 @@ function s:MainBlockIndent( prev_indent, prev_lnum, blockstart, stop_at )
let line = substitute( getline(lnum), s:AdaComment, '', '' )
while lnum > 1
if a:stop_at != '' && line =~ '^\s*' . a:stop_at && indent(lnum) < a:prev_indent
- return -1
+ return a:prev_indent
elseif line =~ '^\s*' . a:blockstart
let ind = indent(lnum)
if ind < a:prev_indent
@@ -111,7 +111,7 @@ function s:EndBlockIndent( prev_indent, prev_lnum, blockstart, blockend )
return a:prev_indent - &sw
endfunction
-" As per MainBlockIndent, but return indent of previous statement-start
+" Return indent of previous statement-start
" (after we've indented due to multi-line statements).
" This time, we start searching on the line *before* the one given (which is
" the end of a statement - we want the previous beginning).
@@ -169,6 +169,7 @@ function GetAdaIndent()
" Get default indent (from prev. line)
let ind = indent(lnum)
+ let initind = ind
" Now check what's on the previous line
if line =~ s:AdaBlockStart || line =~ '(\s*$'
@@ -210,7 +211,7 @@ function GetAdaIndent()
" Multiple line generic instantiation ('package blah is\nnew thingy')
let ind = s:StatementIndent( ind - &sw, lnum )
elseif line =~ ';\s*$'
- " Statement end - try to find current statement-start indent
+ " Statement end (but not 'end' ) - try to find current statement-start indent
let ind = s:StatementIndent( ind, lnum )
endif
@@ -224,11 +225,14 @@ function GetAdaIndent()
" Start of line for ada-pp
let ind = 0
elseif continuation && line =~ '^\s*('
- let ind = ind + &sw
+ " Don't do this if we've already indented due to the previous line
+ if ind == initind
+ let ind = ind + &sw
+ endif
elseif line =~ '^\s*\(begin\|is\)\>'
let ind = s:MainBlockIndent( ind, lnum, '\(procedure\|function\|declare\|package\|task\)\>', 'begin\>' )
elseif line =~ '^\s*record\>'
- let ind = s:MainBlockIndent( ind, lnum, 'type\>', '' ) + &sw
+ let ind = s:MainBlockIndent( ind, lnum, 'type\>\|for\>.*\<use\>', '' ) + &sw
elseif line =~ '^\s*\(else\|elsif\)\>'
let ind = s:MainBlockIndent( ind, lnum, 'if\>', '' )
elseif line =~ '^\s*when\>'
@@ -251,7 +255,7 @@ function GetAdaIndent()
let ind = s:EndBlockIndent( ind, lnum, 'case\>.*\<is\>', 'end\>\s*\<case\>' )
elseif line =~ '^\s*end\>'
" General case for end
- let ind = s:MainBlockIndent( ind, lnum, '\(if\|while\|for\|loop\|accept\|begin\|record\|case\|exception\)\>', '' )
+ let ind = s:MainBlockIndent( ind, lnum, '\(if\|while\|for\|loop\|accept\|begin\|record\|case\|exception\|package\)\>', '' )
elseif line =~ '^\s*exception\>'
let ind = s:MainBlockIndent( ind, lnum, 'begin\>', '' )
elseif line =~ '^\s*then\>'
diff --git a/runtime/indent/eiffel.vim b/runtime/indent/eiffel.vim
index 22b932a67..895945939 100644
--- a/runtime/indent/eiffel.vim
+++ b/runtime/indent/eiffel.vim
@@ -5,7 +5,7 @@
" $Date$
" $Revision$
" URL: http://www.djoce.net/page/vim/
-" Last Change: 2004 Sep 14
+" Last Change: 2004 Sept 14 : removed specific value for tab (sw)
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
diff --git a/runtime/keymap/sinhala-phonetic_utf-8.vim b/runtime/keymap/sinhala-phonetic_utf-8.vim
index 1f7718ac0..43dcc6379 100644
--- a/runtime/keymap/sinhala-phonetic_utf-8.vim
+++ b/runtime/keymap/sinhala-phonetic_utf-8.vim
@@ -1,6 +1,6 @@
" Vim Keymap file for Sinhala (Sri Lanka) (2003-11-02)
" Maintainer : Harshula Jayasuriya <hash@jayasolutions.cjb.net>
-" Last Updated: 2004-10-10
+" Last Updated: 2004-11-14
" This is a static phonetic mapping for a standard US-English keyboard
" (qwerty)
" http://www.nongnu.org/sinhala/doc/keymaps/sinhala-keyboard_3.html
@@ -12,6 +12,7 @@
" Select the new keymap
" set keymap=sinhala-phonetic_utf-8
+let b:keymap_name = "sinhala"
loadkeymap
V <char-0x0d82> " ං - anusvaraya (anusvara)
@@ -43,7 +44,7 @@ G <char-0x0d9d> " ච- mahaapraana gayanna (gha)
c <char-0x0da0> " ච - alpapraana cayanna (ca)
C <char-0x0da1> " ඡ - mahaapraana cayanna (cha)
j <char-0x0da2> " ජ - alpapraana jayanna (ja)
-J <char-0x0da3> " ඣ - mahaapraana jhayanna (jha)
+J <char-0x0da3> " ඣ - mahaapraana jayanna (jha)
z <char-0x0da4> " ඤ - taaluja naasikyaya (nya)
Z <char-0x0da5> " ඥ - taaluja sanyooga naasikyaya (jnya)
<A-j> <char-0x0da6> " ඦ - sanyaka jayanna (nyja)
@@ -52,13 +53,13 @@ T <char-0x0da8> " ඨ - mahaapraana ttayanna (ttha)
d <char-0x0da9> " ඩ - alpapraana ddayanna (dda)
D <char-0x0daa> " ඪ - mahaapraana ddayanna (ddha)
N <char-0x0dab> " ණ - muurdhaja nayanna (nna)
-<A-d> <char-0x0dac> " ඬ - sanyaka ddayanna (nndda)
+x <char-0x0dac> " ඬ - sanyaka ddayanna (nndda)
<A-t> <char-0x0dad> " ත - alpapraana tayanna (ta)
<A-T> <char-0x0dae> " ථ - mahaapraana tayanna (tha)
-x <char-0x0daf> " ද - alpapraana dayanna (da)
-X <char-0x0db0> " ධ - mahaapraana dayanna (dha)
+<A-d> <char-0x0daf> " ද - alpapraana dayanna (da)
+<A-D> <char-0x0db0> " ධ - mahaapraana dayanna (dha)
n <char-0x0db1> " න - dantaja nayanna (na)
-<A-x> <char-0x0db3> " ඳ - sanyaka dayanna (nda)
+X <char-0x0db3> " ඳ - sanyaka dayanna (nda)
p <char-0x0db4> " ප - alpapraana payanna (pa)
P <char-0x0db5> " ඵ - mahaapraana payanna (pha)
b <char-0x0db6> " බ - alpapraana bayanna (ba)
@@ -102,5 +103,5 @@ Y <char-0x0dca><char-0x200d><char-0x0dba> " à·Šâ€à¶º - yansaya
<A-\> <char-0x0dca><char-0x200d> " join - conjunct letters cons 0DCA 200D cons
<A-|> <char-0x200d> " touch - ZWJ
-"<S-space> <char-0x00a0> " - no-break space. <S-space> didn't work.
+<S-space> <char-0x00a0> " - no-break space. <S-space> didn't work.
<C-space> <char-0x200c> " - ZWNJ. <A-space> doesn't work!
diff --git a/runtime/keymap/sinhala.vim b/runtime/keymap/sinhala.vim
new file mode 100644
index 000000000..86091b4d7
--- /dev/null
+++ b/runtime/keymap/sinhala.vim
@@ -0,0 +1,3 @@
+" Vim Keymap file for Sinhala (Sri Lanka)
+"
+source <sfile>:p:h/sinhala-phonetic_utf-8.vim
diff --git a/runtime/makemenu.vim b/runtime/makemenu.vim
index bdf99921c..c9890074d 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 Sep 11
+" Last Change: 2004 Nov 20
" This is used by "make menu" in the src directory.
edit <sfile>:p:h/synmenu.vim
@@ -366,6 +366,7 @@ SynMenu Sh-S.Shell\ script.csh:csh
SynMenu Sh-S.Shell\ script.tcsh:tcsh
SynMenu Sh-S.Shell\ script.zsh:zsh
SynMenu Sh-S.SiCAD:sicad
+SynMenu Sh-S.Sieve:sieve
SynMenu Sh-S.Simula:simula
SynMenu Sh-S.Sinda.Sinda\ compare:sindacmp
SynMenu Sh-S.Sinda.Sinda\ input:sinda
@@ -423,6 +424,7 @@ SynMenu TUV.TeX.Texinfo:texinfo
SynMenu TUV.TF\ mud\ client:tf
SynMenu TUV.Tidy\ configuration:tidy
SynMenu TUV.Tilde:tilde
+SynMenu TUV.TPP:tpp
SynMenu TUV.Trasys\ input:trasys
SynMenu TUV.TSS.Command\ Line:tsscl
SynMenu TUV.TSS.Geometry:tssgm
diff --git a/runtime/menu.vim b/runtime/menu.vim
index b504ff82c..0f0317d28 100644
--- a/runtime/menu.vim
+++ b/runtime/menu.vim
@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2004 Sep 16
+" Last Change: 2004 Dec 04
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@@ -785,9 +785,37 @@ inoremenu <script> 1.40 PopUp.&Paste <SID>iPaste
vnoremenu 1.50 PopUp.&Delete x
an 1.55 PopUp.-SEP2- <Nop>
vnoremenu 1.60 PopUp.Select\ Blockwise <C-V>
-an 1.70 PopUp.Select\ &Word vaw
-an 1.80 PopUp.Select\ &Line V
-an 1.90 PopUp.Select\ &Block <C-V>
+
+nnoremenu 1.70 PopUp.Select\ &Word vaw
+onoremenu 1.70 PopUp.Select\ &Word aw
+vnoremenu 1.70 PopUp.Select\ &Word <C-C>vaw
+inoremenu 1.70 PopUp.Select\ &Word <C-O>vaw
+cnoremenu 1.70 PopUp.Select\ &Word <C-C>vaw
+
+nnoremenu 1.73 PopUp.Select\ &Sentence vas
+onoremenu 1.73 PopUp.Select\ &Sentence as
+vnoremenu 1.73 PopUp.Select\ &Sentence <C-C>vas
+inoremenu 1.73 PopUp.Select\ &Sentence <C-O>vas
+cnoremenu 1.73 PopUp.Select\ &Sentence <C-C>vas
+
+nnoremenu 1.77 PopUp.Select\ Pa&ragraph vap
+onoremenu 1.77 PopUp.Select\ Pa&ragraph ap
+vnoremenu 1.77 PopUp.Select\ Pa&ragraph <C-C>vap
+inoremenu 1.77 PopUp.Select\ Pa&ragraph <C-O>vap
+cnoremenu 1.77 PopUp.Select\ Pa&ragraph <C-C>vap
+
+nnoremenu 1.80 PopUp.Select\ &Line V
+onoremenu 1.80 PopUp.Select\ &Line <C-C>V
+vnoremenu 1.80 PopUp.Select\ &Line <C-C>V
+inoremenu 1.80 PopUp.Select\ &Line <C-O>V
+cnoremenu 1.80 PopUp.Select\ &Line <C-C>V
+
+nnoremenu 1.90 PopUp.Select\ &Block <C-V>
+onoremenu 1.90 PopUp.Select\ &Block <C-C><C-V>
+vnoremenu 1.90 PopUp.Select\ &Block <C-C><C-V>
+inoremenu 1.90 PopUp.Select\ &Block <C-O><C-V>
+cnoremenu 1.90 PopUp.Select\ &Block <C-C><C-V>
+
noremenu <script> <silent> 1.100 PopUp.Select\ &All :<C-U>call <SID>SelectAll()<CR>
inoremenu <script> <silent> 1.100 PopUp.Select\ &All <C-O>:call <SID>SelectAll()<CR>
cnoremenu <script> <silent> 1.100 PopUp.Select\ &All <C-U>call <SID>SelectAll()<CR>
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 85e201ceb..f6dbf3548 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2004 Jul 05
+" Last Change: 2004 Dec 09
" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
@@ -889,6 +889,8 @@ call append("$", "\t(global or local to buffer)")
call <SID>BinOptionG("ar", &ar)
call append("$", "patchmode\tkeep oldest version of a file; specifies file name extension")
call <SID>OptionG("pm", &pm)
+call append("$", "fsync\tforcibly sync the file to disk after writing it")
+call <SID>BinOptionG("fs", &fs)
if !has("msdos")
call append("$", "shortname\tuse 8.3 file names")
call append("$", "\t(local to buffer)")
diff --git a/runtime/plugin/NetrwFileHandlers.vim b/runtime/plugin/NetrwFileHandlers.vim
index 6edeb5139..35df6dd46 100644
--- a/runtime/plugin/NetrwFileHandlers.vim
+++ b/runtime/plugin/NetrwFileHandlers.vim
@@ -2,14 +2,14 @@
" netrw's browsers' x command ("eXecute launcher")
" Author: Charles E. Campbell, Jr.
" Date: Aug 31, 2004
-" Version: 3a NOT RELEASED
+" Version: 3
" ---------------------------------------------------------------------
" Prevent Reloading: {{{1
if exists("g:loaded_netrwfilehandlers") || &cp
finish
endif
-let g:loaded_netrwfilehandlers= "v3a"
+let g:loaded_netrwfilehandlers= "v3"
" ---------------------------------------------------------------------
" NetrwFileHandler_html: handles html when the user hits "x" when the {{{1
@@ -153,7 +153,7 @@ endfun
fun! NetrwFileHandler_pdf(pdf)
" " call Dfunc("NetrwFileHandler_pdf(pdf<".a:pdf.">)")
if executable("gs")
- exe "silent! !gs ".a:pdf
+ exe 'silent! !gs "'.a:pdf.'"'
else
" " call Dret("NetrwFileHandler_pdf 0")
return 0
@@ -168,7 +168,7 @@ endfun
fun! NetrwFileHandler_sxw(sxw)
" " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
if executable("gs")
- exe "silent! !gs ".a:sxw
+ exe 'silent! !gs "'.a:sxw.'"'
else
" " call Dret("NetrwFileHandler_sxw 0")
return 0
@@ -184,7 +184,7 @@ fun! NetrwFileHandler_doc(doc)
" " call Dfunc("NetrwFileHandler_doc(doc<".a:doc.">)")
if executable("oowriter")
- exe "silent! !oowriter ".a:doc
+ exe 'silent! !oowriter "'.a:doc.'"'
redraw!
else
" " call Dret("NetrwFileHandler_doc 0")
@@ -201,7 +201,7 @@ fun! NetrwFileHandler_sxw(sxw)
" " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
if executable("oowriter")
- exe "silent! !oowriter ".a:sxw
+ exe 'silent! !oowriter "'.a:sxw.'"'
redraw!
else
" " call Dret("NetrwFileHandler_sxw 0")
@@ -218,7 +218,7 @@ fun! NetrwFileHandler_xls(xls)
" " call Dfunc("NetrwFileHandler_xls(xls<".a:xls.">)")
if executable("oocalc")
- exe "silent! !oocalc ".a:xls
+ exe 'silent! !oocalc "'.a:xls.'"'
redraw!
else
" " call Dret("NetrwFileHandler_xls 0")
diff --git a/runtime/plugin/netrw.vim b/runtime/plugin/netrw.vim
index 608cc7d21..e4868a3d7 100644
--- a/runtime/plugin/netrw.vim
+++ b/runtime/plugin/netrw.vim
@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across a network
-" Last Change: Sep 14, 2004
-" Maintainer: Charles E. Campbell, Jr. PhD <drchipNOSPAM at campbellfamily.biz>
-" Version: 51a NOT RELEASED
+" last change: Dec 06, 2004
+" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
+" Version: 53
" License: Vim License (see vim's :help license)
"
" But be doers of the Word, and not only hearers, deluding your own selves
@@ -14,7 +14,7 @@
if exists("g:loaded_netrw") || &cp
finish
endif
-let g:loaded_netrw = "v51a"
+let g:loaded_netrw = "v53"
let s:save_cpo = &cpo
let loaded_explorer = 1
set cpo&vim
@@ -29,7 +29,11 @@ if !exists("g:netrw_win95ftp")
endif
if !exists("g:netrw_cygwin")
if has("win32") || has("win95") || has("win64") || has("win16")
- let g:netrw_cygwin= 1
+ if &shell == "bash"
+ let g:netrw_cygwin= 1
+ else
+ let g:netrw_cygwin= 0
+ endif
else
let g:netrw_cygwin= 0
endif
@@ -78,7 +82,7 @@ if !exists("g:netrw_sort_by")
let g:netrw_sort_by= "name"
endif
if !exists("g:netrw_sort_sequence")
- let g:netrw_sort_sequence= '/$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$'
+ let g:netrw_sort_sequence= '[\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$'
endif
if !exists("g:netrw_sort_direction")
" alternative: reverse (z y x ...)
@@ -117,6 +121,9 @@ 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\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$'
endif
+if !exists("g:netrw_ssh_browse_reject")
+ let g:netrw_ssh_browse_reject='^total\s\+\d\+$'
+endif
if !exists("g:netrw_keepdir")
let g:netrw_keepdir= 1
endif
@@ -143,6 +150,12 @@ endif
if !exists("g:netrw_maxfilenamelen")
let g:netrw_maxfilenamelen= 32
endif
+if !exists("g:netrw_dirhistmax")
+ let g:netrw_dirhistmax= 10
+endif
+if !exists("g:NETRW_DIRHIST_CNT")
+ let g:NETRW_DIRHIST_CNT= 0
+endif
" BufEnter event ignored by decho when following variable is true
" Has a side effect that doau BufReadPost doesn't work, so
@@ -218,7 +231,6 @@ if version >= 600
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<afile>")|exe "Nread " .expand("<afile>")|exe "silent doau BufReadPost ".expand("<afile>")
au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<afile>")|exe "Nwrite " .expand("<afile>")|exe "silent doau BufWritePost ".expand("<afile>")
au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<afile>")|exe "'[,']Nwrite " .expand("<afile>")|exe "silent doau BufWritePost ".expand("<afile>")
-" au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* if exists("vcount")|call Decho("vcount=".vcount)|else|call Decho("no vcount")|endif
augroup END
endif
@@ -335,6 +347,7 @@ fun! s:NetRead(...)
if ichoice > a:0
if !exists("g:netrw_quiet")
echoerr "Unbalanced string in filename '". wholechoice ."'"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
" call Dret("NetRead")
return
@@ -363,7 +376,7 @@ 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 choice =~ "^.*[\/]$"
keepjumps call s:NetBrowse(choice)
" call Dret("NetRead")
return
@@ -421,6 +434,7 @@ fun! s:NetRead(...)
let debugkeep= &debug
set debug=msg
echoerr getline(1)
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &debug= debugkeep
endif
bd!
@@ -466,6 +480,7 @@ fun! s:NetRead(...)
" call Decho("error<".getline(1).">")
if !exists("g:netrw_quiet")
echoerr getline(1)
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
endif
bd!
@@ -498,6 +513,7 @@ fun! s:NetRead(...)
if g:netrw_http_cmd == ""
if !exists("g:netrw_quiet")
echoerr "neither wget nor fetch command is available"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
exit
endif
@@ -575,6 +591,7 @@ fun! s:NetRead(...)
if g:netrw_fetch_cmd == ""
if !exists("g:netrw_quiet")
echoerr "fetch command not available"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
exit
endif
@@ -639,14 +656,14 @@ fun! s:NetGetFile(readcmd, fname, method)
let line2= line("$")
endif
- " transform paths from / to \ for Windows, unless the shell is bash
+ " transform paths from / to \ for Windows (except for cygwin)
if &term == "win32"
- if &shell == "bash"
- let fname=a:fname
-" call Decho("(win32 && bash) fname<".fname.">")
+ if g:netrw_cygwin
+ let fname= a:fname
+" call Decho("(win32 && cygwin) fname<".fname.">")
else
- let fname=substitute(a:fname,'/','\\\\','ge')
-" call Decho("(win32 && !bash) fname<".fname.">")
+ let fname= substitute(a:fname,'/','\\\\','ge')
+" call Decho("(win32 && !cygwin) fname<".fname.">")
endif
else
let fname= a:fname
@@ -802,6 +819,7 @@ fun! s:NetWrite(...) range
if choice > a:0
if !exists("g:netrw_quiet")
echoerr "Unbalanced string in filename '". wholechoice ."'"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
" call Dret("NetWrite")
return
@@ -872,6 +890,7 @@ fun! s:NetWrite(...) range
if getline(1) !~ "^$"
if !exists("g:netrw_quiet")
echoerr getline(1)
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
let mod=1
endif
@@ -911,6 +930,7 @@ fun! s:NetWrite(...) range
if getline(1) !~ "^$"
if !exists("g:netrw_quiet")
echoerr getline(1)
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
let mod=1
endif
@@ -939,6 +959,7 @@ fun! s:NetWrite(...) range
elseif b:netrw_method == 5
if !exists("g:netrw_quiet")
echoerr "***warning*** currently <netrw.vim> does not support writing using http:"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
".........................................
@@ -1035,6 +1056,7 @@ fun! <SID>NetBrowse(dirname)
if !executable("ftp")
if !exists("g:netrw_quiet")
echoerr "***netrw*** this system doesn't support remote directory listing via ftp"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
" call Dret("NetBrowse")
return
@@ -1042,6 +1064,7 @@ fun! <SID>NetBrowse(dirname)
elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == ''
if !exists("g:netrw_quiet")
echoerr "***netrw*** this system doesn't support remote directory listing via ssh"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
" call Dret("NetBrowse")
return
@@ -1052,20 +1075,22 @@ fun! <SID>NetBrowse(dirname)
" analyze a:dirname and g:netrw_list_cmd
let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$'
+ let dirname = substitute(a:dirname,'\\','/','ge')
" call Decho("dirpat<".dirpat.">")
- if a:dirname !~ dirpat
+ if dirname !~ dirpat
if !exists("g:netrw_quiet")
- echoerr "NetBrowse: I don't understand your dirname<".a:dirname.">"
+ echoerr "NetBrowse: I don't understand your dirname<".dirname.">"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
-" call Dret("NetBrowse : badly formatted dirname<".a:dirname.">")
+" call Dret("NetBrowse : badly formatted dirname<".dirname.">")
return
endif
- let method = substitute(a:dirname,dirpat,'\1','')
- let user = substitute(a:dirname,dirpat,'\2','')
- let machine = substitute(a:dirname,dirpat,'\3','')
- let path = substitute(a:dirname,dirpat,'\4','')
- let fname = substitute(a:dirname,'^.*/\ze.','','')
+ let method = substitute(dirname,dirpat,'\1','')
+ let user = substitute(dirname,dirpat,'\2','')
+ let machine = substitute(dirname,dirpat,'\3','')
+ let path = substitute(dirname,dirpat,'\4','')
+ let fname = substitute(dirname,'^.*/\ze.','','')
" call Decho("set up method <".method .">")
" call Decho("set up user <".user .">")
" call Decho("set up machine<".machine.">")
@@ -1087,6 +1112,7 @@ fun! <SID>NetBrowse(dirname)
" optionally sort by time (-t) or by size (-S)
if listcmd == "dir" && g:netrw_sort_by =~ "^[ts]"
echoerr "***warning*** windows' ftp doesn't support time/size sorts (get cygwin, set g:netrw_cygwin)"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
else
if g:netrw_sort_by =~ "^t"
let listcmd= listcmd."t"
@@ -1102,14 +1128,14 @@ fun! <SID>NetBrowse(dirname)
" call Decho("set up listcmd<".listcmd.">")
if fname =~ '@$' && fname !~ '^"'
" call Decho("attempt transfer of symlink as file")
- call s:NetBrowse(substitute(a:dirname,'@$','','e'))
+ call s:NetBrowse(substitute(dirname,'@$','','e'))
redraw!
" call Dret("NetBrowse : symlink")
return
- elseif fname !~ '/$' && fname !~ '^"'
+ elseif fname !~ '[\/]$' && fname !~ '^"'
" looks like a regular file, attempt transfer
-" call Decho("attempt transfer as regular file<".a:dirname.">")
+" call Decho("attempt transfer as regular file<".dirname.">")
" remove any filetype indicator from end of dirname, except for the
" "this is a directory" indicator (/). There shouldn't be one of those,
@@ -1157,7 +1183,10 @@ fun! <SID>NetBrowse(dirname)
" call Decho("exe file ".escape(bufname,s:netrw_cd_escape))
exe 'file '.escape(bufname,s:netrw_cd_escape)
" call Decho("renaming file to bufname<".bufname.">")
- setlocal bh=hide nobl
+ setlocal bh=hide nobl nonu
+
+ " save current directory on directory history list
+ call <SID>NetBookmarkDir(3,expand("%"))
" set up buffer-local mappings
" call Decho("set up buffer-local mappings")
@@ -1174,6 +1203,8 @@ fun! <SID>NetBrowse(dirname)
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> u :<c-u>call <SID>NetBookmarkDir(4,expand("%"))<cr>
+ nnoremap <buffer> <silent> U :<c-u>call <SID>NetBookmarkDir(5,expand("%"))<cr>
nnoremap <buffer> <silent> v :exe (g:netrw_altv? "rightb " : "lefta ").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>
@@ -1185,7 +1216,7 @@ fun! <SID>NetBrowse(dirname)
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>'
nnoremap <buffer> ? :he netrw-browse-cmds<cr>
- setlocal ma
+ setlocal ma nonu
" Set up the banner
" call Decho("set up the banner: sortby<".g:netrw_sort_by."> method<".method.">")
@@ -1209,9 +1240,9 @@ fun! <SID>NetBrowse(dirname)
endif
if g:netrw_list_hide != "" && g:netrw_hide
if g:netrw_hide == 1
- keepjumps put ='\" Hiding: '.g:netrw_list_hide
+ keepjumps put ='\" Hiding: '.g:netrw_list_hide
else
- keepjumps put ='\" Showing: '.g:netrw_list_hide
+ keepjumps put ='\" Showing: '.g:netrw_list_hide
endif
let s:netrw_bannercnt= s:netrw_bannercnt + 1
endif
@@ -1232,10 +1263,11 @@ fun! <SID>NetBrowse(dirname)
" shorten the listing
" call Decho("generate short listing")
exe "keepjumps ".s:netrw_bannercnt
+
" cleanup
- while getline(".") =~ g:netrw_ftp_browse_reject
- keepjumps d
- endwhile
+ if g:netrw_ftp_browse_reject != ""
+ exe "silent! g/".g:netrw_ftp_browse_reject."/keepjumps d"
+ endif
" if there's no ../ listed, then put ./ and ../ in
let line1= line(".")
@@ -1262,6 +1294,10 @@ fun! <SID>NetBrowse(dirname)
" 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
+ " cleanup
+ if g:netrw_ftp_browse_reject != ""
+ exe "silent! g/".g:netrw_ssh_browse_reject."/keepjumps d"
+ endif
endif
" manipulate the directory listing (hide, sort)
@@ -1299,19 +1335,22 @@ fun! <SID>NetBrowse(dirname)
exe s:netrw_bannercnt
endif
- if g:netrw_sort_by =~ "^n"
- call s:SetSort()
- 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 ".s:netrw_bannercnt.',$s/\t[-dstrwx]\+/\t/e'
+ if line("$") >= s:netrw_bannercnt
+ if g:netrw_sort_by =~ "^n"
+ call s:SetSort()
+ 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 ".s:netrw_bannercnt.',$s/\t[-dstrwx]\+/\t/e'
+ endif
endif
endif
exe "keepjumps ".s:netrw_bannercnt
setlocal nomod
setlocal noma
+ setlocal nonu
" call Dret("NetBrowse")
return
@@ -1325,7 +1364,7 @@ fun! <SID>NetBrowseChgDir(dirname,newdir)
let dirname= a:dirname
let newdir = a:newdir
- if newdir !~ '/$'
+ if newdir !~ '[\/]$'
" handling a file
let dirname= dirname.newdir
" call Decho("handling a file: dirname<".dirname.">")
@@ -1394,7 +1433,7 @@ fun! <SID>NetBrowseRm(usrhost,path) range
let rmfile= s:NetGetWord()
" call Decho("rmfile<".rmfile.">")
- if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '/$')
+ if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$')
" attempt to remove file
if !all
echohl Statement
@@ -1445,13 +1484,14 @@ fun! <SID>NetBrowseRm(usrhost,path) range
" 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')
+ 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 && !exists("g:netrw_quiet")
echoerr "unable to remove directory<".rmfile."> -- is it empty?"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
endif
endif
@@ -1817,6 +1857,7 @@ fun! <SID>NetMakeDir(usrhost)
if isdirectory(fullnewdir)
if !exists("g:netrw_quiet")
echoerr "***warning*** <".newdirname."> is already a directory!"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
" call Dret("NetMakeDir : directory<".newdirname."> exists previously")
return
@@ -1824,6 +1865,7 @@ fun! <SID>NetMakeDir(usrhost)
if filereadable(fullnewdir)
if !exists("g:netrw_quiet")
echoerr "***warning*** <".newdirname."> is already a file!"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
" call Dret("NetMakeDir : file<".newdirname."> exists previously")
return
@@ -1846,6 +1888,7 @@ fun! <SID>NetMakeDir(usrhost)
exe linenum
elseif !exists("g:netrw_quiet")
echoerr "***warning*** unable to make directory<".newdirname.">"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
redraw!
@@ -1865,6 +1908,7 @@ fun! <SID>NetMakeDir(usrhost)
exe linenum
elseif !exists("g:netrw_quiet")
echoerr "***warning*** unable to make directory<".newdirname.">"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
redraw!
endif
@@ -1896,17 +1940,71 @@ fun! <SID>NetBookmarkDir(chg,curdir)
echomsg "Sorry, bookmark#".v:count." doesn't exist!"
endif
- elseif exists("g:NETRW_BOOKMARKMAX")
- " list bookmarks
-" call Decho("list bookmarks [0,".g:NETRW_BOOKMARKMAX."]")
- let cnt= 0
- while cnt <= g:NETRW_BOOKMARKMAX
- if exists("g:NETRW_BOOKMARKDIR_{cnt}")
- echo "Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt}
-" call Decho("Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt})
+ elseif a:chg == 2
+ if exists("g:NETRW_BOOKMARKMAX")
+ " list user's bookmarks
+" call Decho("list bookmarks [0,".g:NETRW_BOOKMARKMAX."]")
+ let cnt= 0
+ while cnt <= g:NETRW_BOOKMARKMAX
+ if exists("g:NETRW_BOOKMARKDIR_{cnt}")
+" call Decho("Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt})
+ echo "Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt}
+ endif
+ let cnt= cnt + 1
+ endwhile
+ endif
+
+ " list directory history
+ let cnt = g:NETRW_DIRHIST_CNT
+ let first = 1
+ let histcnt = 0
+ while ( first || cnt != g:NETRW_DIRHIST_CNT )
+" call Decho("first=".first." cnt=".cnt." dirhist_cnt=".g:NETRW_DIRHIST_CNT)
+ let histcnt= histcnt + 1
+ if exists("g:NETRW_DIRHIST_{cnt}")
+" call Decho("Netrw History#".histcnt.": ".g:NETRW_DIRHIST_{cnt})
+ echo "Netrw History#".histcnt.": ".g:NETRW_DIRHIST_{cnt}
+ endif
+ let first = 0
+ let cnt = ( cnt - 1 ) % g:netrw_dirhistmax
+ if cnt < 0
+ let cnt= cnt + g:netrw_dirhistmax
endif
- let cnt= cnt + 1
endwhile
+
+ elseif a:chg == 3
+ " saves most recently visited directories
+ let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax
+ let g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}= substitute(a:curdir,'[/\\]$','','e')
+" call Decho("save dirhist#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">")
+
+ elseif a:chg == 4
+ " u: change to the previous directory stored on the history list
+ let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT - 1 ) % g:netrw_dirhistmax
+ if g:NETRW_DIRHIST_CNT < 0
+ let g:NETRW_DIRHIST_CNT= g:NETRW_DIRHIST_CNT + g:netrw_dirhistmax
+ endif
+ if exists("g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}")
+" call Decho("changedir u#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">")
+ exe "e ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}
+ else
+ let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax
+ echo "Sorry, no predecessor directory exists yet"
+ endif
+
+ elseif a:chg == 5
+ " U: change to the subsequent directory stored on the history list
+ let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax
+ if exists("g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}")
+" call Decho("changedir U#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">")
+ exe "e ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}
+ else
+ let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT - 1 ) % g:netrw_dirhistmax
+ if g:NETRW_DIRHIST_CNT < 0
+ let g:NETRW_DIRHIST_CNT= g:NETRW_DIRHIST_CNT + g:netrw_dirhistmax
+ endif
+ echo "Sorry, no successor directory exists yet"
+ endif
endif
" call Dret("NetBookmarkDir")
endfun
@@ -1933,6 +2031,7 @@ fun! <SID>LocalBrowse(dirname)
if v:version < 603
if !exists("g:netrw_quiet")
echoerr "vim version<".v:version."> too old for browsing with netrw"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
" call Dret("LocalBrowse : vim version<".v:version."> too old")
return
@@ -1941,8 +2040,7 @@ fun! <SID>LocalBrowse(dirname)
" 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())
+" call Decho("dirname<".a:dirname."> buf#".bufnr("%")." winnr=".winnr())
" make this buffer modifiable
setlocal ma
@@ -1951,12 +2049,17 @@ fun! <SID>LocalBrowse(dirname)
" Perform Directory Listing:
" call Decho("Perform directory listing...")
" set up new buffer and map
- " remove the trailing "/"
- let dirnamens= substitute(dirname,'/$','','e')
- let dirnamenr= bufnr(dirnamens.'$')
+ " dirname : current working directory, no escapes, has trailing /
+ " dirnamens : dirname, but with no trailing slash
+ " dirnamenr : buffer number containing dirnamens
+ " dirnamebuf: buffer's idea of dirname, with all \ -> /
+ let dirname = s:NetGetcwd(0)
+ let dirnamens = substitute(dirname,'[\/]$','','e')
+ let dirnamenr = bufnr(dirnamens.'$')
+ let dirnamebuf = substitute(bufname(dirnamenr),'\\','/','ge')
" call Decho("dirnamenr= bufnr(".dirnamens.")=".dirnamenr." bufname(".dirnamenr.")=".bufname(dirnamenr))
- if dirnamenr != 0 && bufname(dirnamenr) != dirnamens
+ if dirnamenr != 0 && dirnamebuf != dirnamens
" try keeping the trailing slash
let dirnamenr = bufnr(dirname.'$')
" call Decho("dirnamenr= bufnr(".dirname.")=".dirnamenr." bufname(".dirnamenr.")=".bufname(dirnamenr)." (retry with /)")
@@ -1967,7 +2070,7 @@ fun! <SID>LocalBrowse(dirname)
" call Decho("buffer already exists: dirnamenr=".dirnamenr." dirname<".dirname."> pre-exists")
" call Dredir("ls!")
exe "b ".dirnamenr
- exe 'silent! cd '.escape(substitute(a:dirname,'\\','/','ge'),s:netrw_cd_escape)
+ exe 'silent! cd '.escape(dirname,s:netrw_cd_escape)
" call Decho("changed directory to<".dirname.">")
if a:dirname != "." && line("$") >= 5 && exists("b:netrw_curdir")
if b:netrw_curdir == dirname
@@ -1980,11 +2083,13 @@ fun! <SID>LocalBrowse(dirname)
" call Decho("buffer name<".bufname("%")."> dirname<".dirname.">")
setlocal ma
keepjumps %d
- if expand("%") != dirname
+ let curdir= substitute(substitute(expand("%"),'\\','/','ge'),'[^/]$','&/','e')
+ if curdir != dirname
" set standard browser options on buffer
setlocal bt=nofile bh=hide nobl noswf
exe "setlocal ts=".g:netrw_maxfilenamelen
- exe 'silent! file '.escape(dirname,s:netrw_cd_escape)
+ exe 'silent file '.escape(dirname,s:netrw_cd_escape)
+" call Decho("errmsg1<".v:errmsg.">")
" call Decho("renamed buffer to<".escape(dirname,s:netrw_cd_escape).">")
" call Decho("yielding actual bufname<".bufname("%").">")
endif
@@ -1992,10 +2097,11 @@ fun! <SID>LocalBrowse(dirname)
" call Decho("generate new buffer named<".escape(dirname,' #').">")
silent! enew!
" set standard browser options on buffer
- setlocal bt=nofile bh=hide nobl noswf
+ setlocal bt=nofile bh=hide nobl noswf nonu
exe "setlocal ts=".g:netrw_maxfilenamelen
- exe 'silent! file '.substitute(escape(dirname,s:netrw_cd_escape),'/$','','e')
-" call Decho("renamed buffer to<".substitute(escape(dirname,s:netrw_cd_escape),'/$','','e').">")
+ exe 'silent file '.substitute(escape(dirname,s:netrw_cd_escape),'[\/]$','','e')
+" call Decho("errmsg2<".v:errmsg.">")
+" call Decho("renamed buffer to<".substitute(escape(dirname,s:netrw_cd_escape),'[\/]$','','e').">")
" call Decho("yielding actual bufname<".bufname("%").">")
endif
if bufname("#") == "" && bufnr("#") != -1
@@ -2004,6 +2110,9 @@ fun! <SID>LocalBrowse(dirname)
exe bufnr("#")."bwipe"
endif
+ " save current directory on directory history list
+ call <SID>NetBookmarkDir(3,s:NetGetcwd(0))
+
" set up all the maps
" call Decho("Setting up local browser maps")
let b:netrw_curdir= s:NetGetcwd(1)
@@ -2023,6 +2132,8 @@ fun! <SID>LocalBrowse(dirname)
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> u :<c-u>call <SID>NetBookmarkDir(4,expand("%"))<cr>
+ nnoremap <buffer> <silent> U :<c-u>call <SID>NetBookmarkDir(5,expand("%"))<cr>
nnoremap <buffer> <silent> v :exe (g:netrw_altv? "rightb " : "lefta ").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>
@@ -2041,34 +2152,43 @@ fun! <SID>LocalBrowse(dirname)
keepjumps 1d
keepjumps put ='\" Directory Listing (netrw '.g:loaded_netrw.')'
keepjumps put ='\" '.dirname
- let s:netrw_bannercnt= 7
+ let s:netrw_bannercnt= 3
let sortby= g:netrw_sort_by
if g:netrw_sort_direction =~ "^r"
let sortby= sortby." reversed"
endif
+ " Sorted by...
if g:netrw_sort_by =~ "^n"
" call Decho("directories will be sorted by name")
" sorted by name
- let s:netrw_bannercnt= s:netrw_bannercnt + 1
keepjumps put ='\" Sorted by '.sortby
keepjumps put ='\" Sort sequence: '.g:netrw_sort_sequence
+ let s:netrw_bannercnt= s:netrw_bannercnt + 2
else
" call Decho("directories will be sorted by size or date")
" sorted by size or date
keepjumps put ='\" Sorted by '.sortby
+ let s:netrw_bannercnt= s:netrw_bannercnt + 1
endif
+
+ " Hiding... -or- Showing...
if g:netrw_list_hide != "" && g:netrw_hide
if g:netrw_hide == 1
- keepjumps put ='\" Hiding: '.g:netrw_list_hide
+ keepjumps put ='\" Hiding: '.g:netrw_list_hide
else
- keepjumps put ='\" Showing: '.g:netrw_list_hide
+ keepjumps put ='\" Showing: '.g:netrw_list_hide
endif
let s:netrw_bannercnt= s:netrw_bannercnt + 1
endif
keepjumps put ='\" Quick Help: ?:help -:go up dir D:delete R:rename s:sort-by x:exec'
keepjumps put ='\" ============================================================================'
+ let s:netrw_bannercnt= s:netrw_bannercnt + 2
+
+ " bannercnt should index the line just after the banner
+ let s:netrw_bannercnt= s:netrw_bannercnt + 1
+" call Decho("bannercnt=".s:netrw_bannercnt)
" generate the requested directory listing
call LocalBrowseList(dirname)
@@ -2079,18 +2199,20 @@ fun! <SID>LocalBrowse(dirname)
if g:netrw_hide && g:netrw_list_hide != ""
call s:NetrwListHide()
endif
- if g:netrw_sort_by =~ "^n"
- call s:SetSort()
- exe 'keepjumps silent '.s:netrw_bannercnt.',$call s:NetSort()'
- exe 'keepjumps silent '.s:netrw_bannercnt.',$s/^\d\{3}\///e'
- else
- exe 'keepjumps silent '.s:netrw_bannercnt.',$call s:NetSort()'
- exe 'keepjumps silent '.s:netrw_bannercnt.',$s/^\d\{-}\///e'
+ if line("$") >= s:netrw_bannercnt
+ if g:netrw_sort_by =~ "^n"
+ call s:SetSort()
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$call s:NetSort()'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$s/^\d\{3}\///e'
+ else
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$call s:NetSort()'
+ exe 'keepjumps silent '.s:netrw_bannercnt.',$s/^\d\{-}\///e'
+ endif
endif
endif
exe s:netrw_bannercnt
- setlocal noma nomod
+ setlocal noma nomod nonu
if g:netrw_keepdir | exe 'keepjumps cd '.netrw_origdir | endif
" call Dret("LocalBrowse : file<".expand("%:p")."> bufname<".bufname("%").">")
@@ -2193,14 +2315,14 @@ fun! <SID>LocalBrowseChgDir(dirname,newdir,...)
let dirname= substitute(a:dirname,'\\','','ge')
let newdir = a:newdir
- if dirname !~ '/$'
+ if dirname !~ '[\/]$'
" apparently vim is "recognizing" that it is in the home directory and
" is removing the "/". Bad idea, so I have to put it back.
let dirname= dirname.'/'
" call Decho("adjusting dirname<".dirname.">")
endif
- if newdir !~ '/$'
+ if newdir !~ '[\/]$'
" handling a file
let dirname= dirname.newdir
" call Decho("handling a file: dirname<".dirname.">")
@@ -2217,7 +2339,7 @@ fun! <SID>LocalBrowseChgDir(dirname,newdir,...)
elseif newdir == '../'
" go up one directory
- let dirname= substitute(dirname,'^\(.*/\)\([^/]\+/$\)','\1','e')
+ let dirname= substitute(dirname,'^\(.*/\)\([^/]\+[\/]$\)','\1','e')
" call Decho("go up one dir: dirname<".dirname.">")
else
@@ -2262,7 +2384,7 @@ fun! <SID>LocalBrowseRm(path) range
let rmfile= a:path.curword
" call Decho("rmfile<".rmfile.">")
- if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '/$')
+ if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$')
" attempt to remove file
if !all
echohl Statement
@@ -2295,7 +2417,7 @@ fun! <SID>LocalBrowseRm(path) range
let all= 1
endif
endif
- let rmfile= substitute(rmfile,'/$','','e')
+ let rmfile= substitute(rmfile,'[\/]$','','e')
if all || ok =~ 'y\%[es]' || ok == ""
" call Decho("1st attempt: system(".g:netrw_local_rmdir.' "'.rmfile.'")')
@@ -2313,9 +2435,11 @@ fun! <SID>LocalBrowseRm(path) range
call system("rm ".rmfile)
if v:shell_error != 0 && !exists("g:netrw_quiet")
echoerr "unable to remove directory<".rmfile."> -- is it empty?"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
- elseif !exist("g:netrw_quiet")s
+ elseif !exists("g:netrw_quiet")
echoerr "unable to remove directory<".rmfile."> -- is it empty?"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
endif
endif
@@ -2390,11 +2514,13 @@ fun! <SID>LocalPreview(path) range
if has("quickfix")
if !isdirectory(a:path)
exe "pedit ".a:path
- elseif !exist("g:netrw_quiet")s
+ elseif !exists("g:netrw_quiet")
echoerr "sorry, cannot preview a directory such as <".a:path.">"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
- elseif !exist("g:netrw_quiet")s
+ elseif !exists("g:netrw_quiet")
echoerr "sorry, to preview your vim needs the quickfix feature compiled in"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
" call Dret("LocalPreview")
endfun
@@ -2406,7 +2532,7 @@ endfun
fun! <SID>NetGetcwd(doesc)
" call Dfunc("NetGetcwd(doesc=".a:doesc.")")
let curdir= substitute(getcwd(),'\\','/','ge')
- if curdir !~ '/$'
+ if curdir !~ '[\/]$'
let curdir= curdir.'/'
endif
if a:doesc
@@ -2595,6 +2721,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
else
if !exists("g:netrw_quiet")
echoerr "***error*** cannot determine method"
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
let b:netrw_method = -1
endif
@@ -2685,7 +2812,16 @@ fun! s:NetOptionRestore()
let &gd = s:gdkeep
let &tw = s:twkeep
if exists("s:swfkeep")
- let &swf= s:swfkeep
+ if &directory == ""
+ " user hasn't specified a swapfile directory;
+ " netrw will temporarily make the swapfile
+ " directory the current local one.
+ let &directory = getcwd()
+ silent! let &swf = s:swfkeep
+ set directory=
+ else
+ let &swf= s:swfkeep
+ endif
unlet s:swfkeep
endif
unlet s:aikeep
@@ -2799,6 +2935,12 @@ fun! <SID>SetSort()
endif
" call Decho("priority=".priority." spriority<".spriority."> seq<".seq."> seqlist<".seqlist.">")
+ " sanity check
+ if s:netrw_bannercnt > line("$")
+ " apparently no files were left after a Hiding pattern was used
+" call Dret("SetSort : no files left after hiding")
+ return
+ endif
if seq == '*'
exe 'keepjumps silent '.s:netrw_bannercnt.',$v/^\d\{3}\//s/^/'.spriority.'/'
else
diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim
index 089a6fefd..a3973acdf 100644
--- a/runtime/synmenu.vim
+++ b/runtime/synmenu.vim
@@ -39,46 +39,47 @@ 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.10.180 &Syntax.AB.ALSA\ config :cal SetSyn("alsaconf")<CR>
+an 50.10.190 &Syntax.AB.Altera\ AHDL :cal SetSyn("ahdl")<CR>
+an 50.10.200 &Syntax.AB.Amiga\ DOS :cal SetSyn("amiga")<CR>
+an 50.10.210 &Syntax.AB.AMPL :cal SetSyn("ampl")<CR>
+an 50.10.220 &Syntax.AB.Ant\ build\ file :cal SetSyn("ant")<CR>
+an 50.10.230 &Syntax.AB.ANTLR :cal SetSyn("antlr")<CR>
+an 50.10.240 &Syntax.AB.Apache\ config :cal SetSyn("apache")<CR>
+an 50.10.250 &Syntax.AB.Apache-style\ config :cal SetSyn("apachestyle")<CR>
+an 50.10.260 &Syntax.AB.Applix\ ELF :cal SetSyn("elf")<CR>
+an 50.10.270 &Syntax.AB.Arc\ Macro\ Language :cal SetSyn("aml")<CR>
+an 50.10.280 &Syntax.AB.Arch\ inventory :cal SetSyn("arch")<CR>
+an 50.10.290 &Syntax.AB.ART :cal SetSyn("art")<CR>
+an 50.10.300 &Syntax.AB.ASP\ with\ VBScript :cal SetSyn("aspvbs")<CR>
+an 50.10.310 &Syntax.AB.ASP\ with\ Perl :cal SetSyn("aspperl")<CR>
+an 50.10.320 &Syntax.AB.Assembly.680x0 :cal SetSyn("asm68k")<CR>
+an 50.10.330 &Syntax.AB.Assembly.Flat :cal SetSyn("fasm")<CR>
+an 50.10.340 &Syntax.AB.Assembly.GNU :cal SetSyn("asm")<CR>
+an 50.10.350 &Syntax.AB.Assembly.GNU\ H-8300 :cal SetSyn("asmh8300")<CR>
+an 50.10.360 &Syntax.AB.Assembly.Intel\ IA-64 :cal SetSyn("ia64")<CR>
+an 50.10.370 &Syntax.AB.Assembly.Microsoft :cal SetSyn("masm")<CR>
+an 50.10.380 &Syntax.AB.Assembly.Netwide :cal SetSyn("nasm")<CR>
+an 50.10.390 &Syntax.AB.Assembly.PIC :cal SetSyn("pic")<CR>
+an 50.10.400 &Syntax.AB.Assembly.Turbo :cal SetSyn("tasm")<CR>
+an 50.10.410 &Syntax.AB.Assembly.VAX\ Macro\ Assembly :cal SetSyn("vmasm")<CR>
+an 50.10.420 &Syntax.AB.Assembly.Z-80 :cal SetSyn("z8a")<CR>
+an 50.10.430 &Syntax.AB.Assembly.xa\ 6502\ cross\ assember :cal SetSyn("a65")<CR>
+an 50.10.440 &Syntax.AB.ASN\.1 :cal SetSyn("asn")<CR>
+an 50.10.450 &Syntax.AB.Atlas :cal SetSyn("atlas")<CR>
+an 50.10.460 &Syntax.AB.Automake :cal SetSyn("automake")<CR>
+an 50.10.470 &Syntax.AB.Avenue :cal SetSyn("ave")<CR>
+an 50.10.480 &Syntax.AB.Awk :cal SetSyn("awk")<CR>
+an 50.10.490 &Syntax.AB.AYacc :cal SetSyn("ayacc")<CR>
+an 50.10.510 &Syntax.AB.B :cal SetSyn("b")<CR>
+an 50.10.520 &Syntax.AB.Baan :cal SetSyn("baan")<CR>
+an 50.10.530 &Syntax.AB.BASIC :cal SetSyn("basic")<CR>
+an 50.10.540 &Syntax.AB.BC\ calculator :cal SetSyn("bc")<CR>
+an 50.10.550 &Syntax.AB.BDF\ font :cal SetSyn("bdf")<CR>
+an 50.10.560 &Syntax.AB.BibTeX :cal SetSyn("bib")<CR>
+an 50.10.570 &Syntax.AB.BIND.BIND\ config :cal SetSyn("named")<CR>
+an 50.10.580 &Syntax.AB.BIND.BIND\ zone :cal SetSyn("bindzone")<CR>
+an 50.10.590 &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>
@@ -336,46 +337,47 @@ an 50.100.110 &Syntax.Sh-S.Shell\ script.csh :cal SetSyn("csh")<CR>
an 50.100.120 &Syntax.Sh-S.Shell\ script.tcsh :cal SetSyn("tcsh")<CR>
an 50.100.130 &Syntax.Sh-S.Shell\ script.zsh :cal SetSyn("zsh")<CR>
an 50.100.140 &Syntax.Sh-S.SiCAD :cal SetSyn("sicad")<CR>
-an 50.100.150 &Syntax.Sh-S.Simula :cal SetSyn("simula")<CR>
-an 50.100.160 &Syntax.Sh-S.Sinda.Sinda\ compare :cal SetSyn("sindacmp")<CR>
-an 50.100.170 &Syntax.Sh-S.Sinda.Sinda\ input :cal SetSyn("sinda")<CR>
-an 50.100.180 &Syntax.Sh-S.Sinda.Sinda\ output :cal SetSyn("sindaout")<CR>
-an 50.100.190 &Syntax.Sh-S.SKILL.SKILL :cal SetSyn("skill")<CR>
-an 50.100.200 &Syntax.Sh-S.SKILL.SKILL\ for\ Diva :cal SetSyn("diva")<CR>
-an 50.100.210 &Syntax.Sh-S.Slice :cal SetSyn("slice")<CR>
-an 50.100.220 &Syntax.Sh-S.SLRN.Slrn\ rc :cal SetSyn("slrnrc")<CR>
-an 50.100.230 &Syntax.Sh-S.SLRN.Slrn\ score :cal SetSyn("slrnsc")<CR>
-an 50.100.240 &Syntax.Sh-S.SmallTalk :cal SetSyn("st")<CR>
-an 50.100.250 &Syntax.Sh-S.Smarty\ Templates :cal SetSyn("smarty")<CR>
-an 50.100.260 &Syntax.Sh-S.SMIL :cal SetSyn("smil")<CR>
-an 50.100.270 &Syntax.Sh-S.SMITH :cal SetSyn("smith")<CR>
-an 50.100.280 &Syntax.Sh-S.SNMP\ MIB :cal SetSyn("mib")<CR>
-an 50.100.290 &Syntax.Sh-S.SNNS.SNNS\ network :cal SetSyn("snnsnet")<CR>
-an 50.100.300 &Syntax.Sh-S.SNNS.SNNS\ pattern :cal SetSyn("snnspat")<CR>
-an 50.100.310 &Syntax.Sh-S.SNNS.SNNS\ result :cal SetSyn("snnsres")<CR>
-an 50.100.320 &Syntax.Sh-S.Snobol4 :cal SetSyn("snobol4")<CR>
-an 50.100.330 &Syntax.Sh-S.Snort\ Configuration :cal SetSyn("hog")<CR>
-an 50.100.340 &Syntax.Sh-S.SPEC\ (Linux\ RPM) :cal SetSyn("spec")<CR>
-an 50.100.350 &Syntax.Sh-S.Specman :cal SetSyn("specman")<CR>
-an 50.100.360 &Syntax.Sh-S.Spice :cal SetSyn("spice")<CR>
-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.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.100.150 &Syntax.Sh-S.Sieve :cal SetSyn("sieve")<CR>
+an 50.100.160 &Syntax.Sh-S.Simula :cal SetSyn("simula")<CR>
+an 50.100.170 &Syntax.Sh-S.Sinda.Sinda\ compare :cal SetSyn("sindacmp")<CR>
+an 50.100.180 &Syntax.Sh-S.Sinda.Sinda\ input :cal SetSyn("sinda")<CR>
+an 50.100.190 &Syntax.Sh-S.Sinda.Sinda\ output :cal SetSyn("sindaout")<CR>
+an 50.100.200 &Syntax.Sh-S.SKILL.SKILL :cal SetSyn("skill")<CR>
+an 50.100.210 &Syntax.Sh-S.SKILL.SKILL\ for\ Diva :cal SetSyn("diva")<CR>
+an 50.100.220 &Syntax.Sh-S.Slice :cal SetSyn("slice")<CR>
+an 50.100.230 &Syntax.Sh-S.SLRN.Slrn\ rc :cal SetSyn("slrnrc")<CR>
+an 50.100.240 &Syntax.Sh-S.SLRN.Slrn\ score :cal SetSyn("slrnsc")<CR>
+an 50.100.250 &Syntax.Sh-S.SmallTalk :cal SetSyn("st")<CR>
+an 50.100.260 &Syntax.Sh-S.Smarty\ Templates :cal SetSyn("smarty")<CR>
+an 50.100.270 &Syntax.Sh-S.SMIL :cal SetSyn("smil")<CR>
+an 50.100.280 &Syntax.Sh-S.SMITH :cal SetSyn("smith")<CR>
+an 50.100.290 &Syntax.Sh-S.SNMP\ MIB :cal SetSyn("mib")<CR>
+an 50.100.300 &Syntax.Sh-S.SNNS.SNNS\ network :cal SetSyn("snnsnet")<CR>
+an 50.100.310 &Syntax.Sh-S.SNNS.SNNS\ pattern :cal SetSyn("snnspat")<CR>
+an 50.100.320 &Syntax.Sh-S.SNNS.SNNS\ result :cal SetSyn("snnsres")<CR>
+an 50.100.330 &Syntax.Sh-S.Snobol4 :cal SetSyn("snobol4")<CR>
+an 50.100.340 &Syntax.Sh-S.Snort\ Configuration :cal SetSyn("hog")<CR>
+an 50.100.350 &Syntax.Sh-S.SPEC\ (Linux\ RPM) :cal SetSyn("spec")<CR>
+an 50.100.360 &Syntax.Sh-S.Specman :cal SetSyn("specman")<CR>
+an 50.100.370 &Syntax.Sh-S.Spice :cal SetSyn("spice")<CR>
+an 50.100.380 &Syntax.Sh-S.Spyce :cal SetSyn("spyce")<CR>
+an 50.100.390 &Syntax.Sh-S.Speedup :cal SetSyn("spup")<CR>
+an 50.100.400 &Syntax.Sh-S.Splint :cal SetSyn("splint")<CR>
+an 50.100.410 &Syntax.Sh-S.Squid\ config :cal SetSyn("squid")<CR>
+an 50.100.420 &Syntax.Sh-S.SQL.ESQL-C :cal SetSyn("esqlc")<CR>
+an 50.100.430 &Syntax.Sh-S.SQL.MySQL :cal SetSyn("mysql")<CR>
+an 50.100.440 &Syntax.Sh-S.SQL.PL/SQL :cal SetSyn("plsql")<CR>
+an 50.100.450 &Syntax.Sh-S.SQL.SQL\ (Oracle) :cal SetSyn("sql")<CR>
+an 50.100.460 &Syntax.Sh-S.SQL.SQL\ Forms :cal SetSyn("sqlforms")<CR>
+an 50.100.470 &Syntax.Sh-S.SQL.SQLJ :cal SetSyn("sqlj")<CR>
+an 50.100.480 &Syntax.Sh-S.SQL.SQL-Informix :cal SetSyn("sqlinformix")<CR>
+an 50.100.490 &Syntax.Sh-S.SQR :cal SetSyn("sqr")<CR>
+an 50.100.500 &Syntax.Sh-S.Ssh.ssh_config :cal SetSyn("sshconfig")<CR>
+an 50.100.510 &Syntax.Sh-S.Ssh.sshd_config :cal SetSyn("sshdconfig")<CR>
+an 50.100.520 &Syntax.Sh-S.Standard\ ML :cal SetSyn("sml")<CR>
+an 50.100.530 &Syntax.Sh-S.Stored\ Procedures :cal SetSyn("stp")<CR>
+an 50.100.540 &Syntax.Sh-S.Strace :cal SetSyn("strace")<CR>
+an 50.100.550 &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>
@@ -392,23 +394,24 @@ an 50.110.220 &Syntax.TUV.TeX.Texinfo :cal SetSyn("texinfo")<CR>
an 50.110.230 &Syntax.TUV.TF\ mud\ client :cal SetSyn("tf")<CR>
an 50.110.240 &Syntax.TUV.Tidy\ configuration :cal SetSyn("tidy")<CR>
an 50.110.250 &Syntax.TUV.Tilde :cal SetSyn("tilde")<CR>
-an 50.110.260 &Syntax.TUV.Trasys\ input :cal SetSyn("trasys")<CR>
-an 50.110.270 &Syntax.TUV.TSS.Command\ Line :cal SetSyn("tsscl")<CR>
-an 50.110.280 &Syntax.TUV.TSS.Geometry :cal SetSyn("tssgm")<CR>
-an 50.110.290 &Syntax.TUV.TSS.Optics :cal SetSyn("tssop")<CR>
-an 50.110.310 &Syntax.TUV.UIT/UIL :cal SetSyn("uil")<CR>
-an 50.110.320 &Syntax.TUV.UnrealScript :cal SetSyn("uc")<CR>
-an 50.110.340 &Syntax.TUV.Valgrind :cal SetSyn("valgrind")<CR>
-an 50.110.350 &Syntax.TUV.Verilog\ HDL :cal SetSyn("verilog")<CR>
-an 50.110.360 &Syntax.TUV.Vgrindefs :cal SetSyn("vgrindefs")<CR>
-an 50.110.370 &Syntax.TUV.VHDL :cal SetSyn("vhdl")<CR>
-an 50.110.380 &Syntax.TUV.Vim.Vim\ help\ file :cal SetSyn("help")<CR>
-an 50.110.390 &Syntax.TUV.Vim.Vim\ script :cal SetSyn("vim")<CR>
-an 50.110.400 &Syntax.TUV.Vim.Viminfo\ file :cal SetSyn("viminfo")<CR>
-an 50.110.410 &Syntax.TUV.Virata\ config :cal SetSyn("virata")<CR>
-an 50.110.420 &Syntax.TUV.Visual\ Basic :cal SetSyn("vb")<CR>
-an 50.110.430 &Syntax.TUV.VRML :cal SetSyn("vrml")<CR>
-an 50.110.440 &Syntax.TUV.VSE\ JCL :cal SetSyn("vsejcl")<CR>
+an 50.110.260 &Syntax.TUV.TPP :cal SetSyn("tpp")<CR>
+an 50.110.270 &Syntax.TUV.Trasys\ input :cal SetSyn("trasys")<CR>
+an 50.110.280 &Syntax.TUV.TSS.Command\ Line :cal SetSyn("tsscl")<CR>
+an 50.110.290 &Syntax.TUV.TSS.Geometry :cal SetSyn("tssgm")<CR>
+an 50.110.300 &Syntax.TUV.TSS.Optics :cal SetSyn("tssop")<CR>
+an 50.110.320 &Syntax.TUV.UIT/UIL :cal SetSyn("uil")<CR>
+an 50.110.330 &Syntax.TUV.UnrealScript :cal SetSyn("uc")<CR>
+an 50.110.350 &Syntax.TUV.Valgrind :cal SetSyn("valgrind")<CR>
+an 50.110.360 &Syntax.TUV.Verilog\ HDL :cal SetSyn("verilog")<CR>
+an 50.110.370 &Syntax.TUV.Vgrindefs :cal SetSyn("vgrindefs")<CR>
+an 50.110.380 &Syntax.TUV.VHDL :cal SetSyn("vhdl")<CR>
+an 50.110.390 &Syntax.TUV.Vim.Vim\ help\ file :cal SetSyn("help")<CR>
+an 50.110.400 &Syntax.TUV.Vim.Vim\ script :cal SetSyn("vim")<CR>
+an 50.110.410 &Syntax.TUV.Vim.Viminfo\ file :cal SetSyn("viminfo")<CR>
+an 50.110.420 &Syntax.TUV.Virata\ config :cal SetSyn("virata")<CR>
+an 50.110.430 &Syntax.TUV.Visual\ Basic :cal SetSyn("vb")<CR>
+an 50.110.440 &Syntax.TUV.VRML :cal SetSyn("vrml")<CR>
+an 50.110.450 &Syntax.TUV.VSE\ JCL :cal SetSyn("vsejcl")<CR>
an 50.120.100 &Syntax.WXYZ.WEB.CWEB :cal SetSyn("cweb")<CR>
an 50.120.110 &Syntax.WXYZ.WEB.WEB :cal SetSyn("web")<CR>
an 50.120.120 &Syntax.WXYZ.WEB.WEB\ Changes :cal SetSyn("change")<CR>
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 759bebb68..ee739b9e0 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2004 Feb 04
+" Last Change: 2004 Dec 09
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -124,15 +124,25 @@ if exists("c_comment_strings")
syntax region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip
syntax region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial
syntax region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,@Spell
- syntax region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell
+ if exists("c_no_comment_fold")
+ syntax region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell
+ else
+ syntax region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell fold
+ endif
else
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cSpaceError,@Spell
- syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell
+ if exists("c_no_comment_fold")
+ syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell
+ else
+ syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell fold
+ endif
endif
" keep a // comment separately, it terminates a preproc. conditional
syntax match cCommentError display "\*/"
syntax match cCommentStartError display "/\*"me=e-1 contained
+syntax region cBlock start="{" end="}" transparent fold
+
syn keyword cOperator sizeof
if exists("c_gnu")
syn keyword cStatement __asm__
diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim
index 953f224f3..c24b299d4 100644
--- a/runtime/syntax/css.vim
+++ b/runtime/syntax/css.vim
@@ -2,7 +2,7 @@
" Language: Cascading Style Sheets
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/css.vim
-" Last Change: 2002 Oct 19
+" Last Change: 2004 Mar 30
" CSS2 by Nikolai Weibull
" Full CSS2, HTML4 support by Yeti
@@ -38,7 +38,7 @@ syn match cssSelectorOp "[+>.]"
syn match cssSelectorOp2 "[~|]\?=" contained
syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" transparent contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ
-syn match cssIdentifier "#\i\+"
+syn match cssIdentifier "#[A-Za-zÀ-ÿ_@][A-Za-zÀ-ÿ0-9_@-]*"
syn match cssMedia "@media\>" nextgroup=cssMediaType skipwhite skipnl
syn keyword cssMediaType contained screen print aural braile embosed handheld projection ty tv all nextgroup=cssMediaComma,cssMediaBlock skipwhite skipnl
diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim
index d580fdb93..3e26b4c5c 100644
--- a/runtime/syntax/debcontrol.vim
+++ b/runtime/syntax/debcontrol.vim
@@ -1,7 +1,14 @@
" Vim syntax file
" Language: Debian control files
-" Maintainer: Wichert Akkerman <wakkerma@debian.org>
-" Last Change: October 28, 2001
+" Maintainer: Gerfried Fuchs <alfie@debian.org>
+" Last Change: 29 Oct 2004
+" URL: http://alfie.ist.org/software/vim/syntax/debcontrol.vim
+"
+" Original Version: Wichert Akkerman <wakkerma@debian.org>
+
+" Comments are very welcome - but please make sure that you are commenting on
+" the latest version of this file.
+" SPAM is _NOT_ welcome - be ready to be reported!
" Standard syntax initialization
if version < 600
@@ -18,10 +25,10 @@ syn match debControlComma ", *"
syn match debControlSpace " "
" Define some common expressions we can use later on
-syn match debcontrolArchitecture contained "\(all\|any\|alpha\|arm\|hppa\|ia64\|i386\|m68k\|mipsel\|mips\|powerpc\|sh\|sheb\|sparc\|hurd-i386\)"
+syn match debcontrolArchitecture contained "\(all\|any\|alpha\|amd64\|arm\|hppa\|i386\|ia64\|m68k\|mipsel\|mips\|powerpc\|s390\|sheb\|sh\|sparc64\|sparc\|hurd-i386\|kfreebsd-i386\|knetbsd-i386\|netbsd-i386\)"
syn match debcontrolName contained "[a-z][a-z0-9+-]*"
syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
-syn match debcontrolSection contained "\(\(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\)/\)\=\(admin\|base\|comm\|devel\|doc\|editors\|electronics\|games\|graphics\|hamradio\|interpreters\|libs\|mail\|math\|misc\|net\|news\|oldlibs\|otherosfs\|science\|shells\|sound\|text\|tex\|utils\|web\|x11\|debian-installer\)"
+syn match debcontrolSection contained "\(\(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\)/\)\=\(admin\|base\|comm\|devel\|doc\|editors\|electronics\|embedded\|games\|gnome\|graphics\|hamradio\|interpreters\|kde\|libs\|libdevel\|mail\|math\|misc\|net\|news\|oldlibs\|otherosfs\|perl\|python\|science\|shells\|sound\|text\|tex\|utils\|web\|x11\|debian-installer\)"
syn match debcontrolVariable contained "\${.\{-}}"
" An email address
@@ -29,7 +36,7 @@ syn match debcontrolEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+"
syn match debcontrolEmail "<.\{-}>"
" List of all legal keys
-syn match debcontrolKey contained "^\(Source\|Package\|Section\|Priority\|Maintainer\|Uploaders\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Architecture\|Description\|Bugs\|Origin\): *"
+syn match debcontrolKey contained "^\(Source\|Package\|Section\|Priority\|Maintainer\|Uploaders\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Architecture\|Description\|Bugs\|Origin\|Enhances\): *"
" Fields for which we do strict syntax checking
syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline
@@ -38,7 +45,7 @@ syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKe
syn region debcontrolStrictField start="^Section" end="$" contains=debcontrolKey,debcontrolSection oneline
" Catch-all for the other legal fields
-syn region debcontrolField start="^\(Maintainer\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Bugs\|Origin\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline
+syn region debcontrolField start="^\(Maintainer\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Bugs\|Origin\|Enhances\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline
syn region debcontrolMultiField start="^\(Uploaders\|Description\):" skip="^ " end="^$"me=s-1 end="^[^ ]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable
" Associate our matches and regions with pretty colours
diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim
index b47c17e69..030e9ec2c 100644
--- a/runtime/syntax/java.vim
+++ b/runtime/syntax/java.vim
@@ -2,7 +2,7 @@
" Language: Java
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/java.vim
-" Last Change: 2004 Apr 23
+" Last Change: 2004 Nov 12
" Please check :help java.vim for comments on some of the options available.
@@ -37,7 +37,7 @@ JavaHiLink javaError2 javaError
" keyword definitions
syn keyword javaExternal native package
-syn match javaExternal "\<import\(\s\+static\>\)\?"
+syn match javaExternal "\<import\>\(\s\+static\>\)\?"
syn keyword javaError goto const
syn keyword javaConditional if else switch
syn keyword javaRepeat while for do
@@ -228,6 +228,7 @@ if exists("java_highlight_debug")
" to make this work you must define the highlighting for these groups
syn match javaDebug "\<System\.\(out\|err\)\.print\(ln\)*\s*("me=e-1 contains=javaDebug.* nextgroup=javaDebugParen
+ syn match javaDebug "\<p\s*("me=e-1 contains=javaDebug.* nextgroup=javaDebugParen
syn match javaDebug "[A-Za-z][a-zA-Z0-9_]*\.printStackTrace\s*("me=e-1 contains=javaDebug.* nextgroup=javaDebugParen
syn match javaDebug "\<trace[SL]\=\s*("me=e-1 contains=javaDebug.* nextgroup=javaDebugParen
@@ -263,6 +264,12 @@ syn region javaParenT transparent matchgroup=javaParen start="(" end=")" con
syn region javaParenT1 transparent matchgroup=javaParen1 start="(" end=")" contains=@javaTop,javaParenT2 contained
syn region javaParenT2 transparent matchgroup=javaParen2 start="(" end=")" contains=@javaTop,javaParenT contained
syn match javaParenError ")"
+" catch errors caused by wrong square parenthesis
+syn region javaParenT transparent matchgroup=javaParen start="\[" end="\]" contains=@javaTop,javaParenT1
+syn region javaParenT1 transparent matchgroup=javaParen1 start="\[" end="\]" contains=@javaTop,javaParenT2 contained
+syn region javaParenT2 transparent matchgroup=javaParen2 start="\[" end="\]" contains=@javaTop,javaParenT contained
+syn match javaParenError "\]"
+
JavaHiLink javaParenError javaError
if !exists("java_minlines")
diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim
index a037496bb..c22aefa24 100644
--- a/runtime/syntax/javascript.vim
+++ b/runtime/syntax/javascript.vim
@@ -2,7 +2,7 @@
" Language: JavaScript
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/javascript.vim
-" Last Change: 2004 May 16
+" Last Change: 2004 Nov 20
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -35,14 +35,15 @@ syn region javaScriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"+ conta
syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=javaScriptSpecial,@htmlPreproc
syn match javaScriptSpecialCharacter "'\\.'"
syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
-syn region javaScriptRegexpString start=+/+ skip=+\\\\\|\\/+ end=+/[gi]\?\s*$+ end=+/[gi]\?\s*[;,)]+me=e-1 contains=@htmlPreproc oneline
-syn keyword javaScriptConditional if else
-syn keyword javaScriptRepeat while for
-syn keyword javaScriptBranch break continue switch case default
-syn keyword javaScriptOperator new in
-syn keyword javaScriptType this var const
-syn keyword javaScriptStatement return with
-syn keyword javaScriptBoolean true false
+syn region javaScriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gi]\?\s*$+ end=+/[gi]\?\s*[;.,)]+me=e-1 contains=@htmlPreproc oneline
+syn keyword javaScriptConditional if else
+syn keyword javaScriptRepeat while for
+syn keyword javaScriptBranch break continue switch case default
+syn keyword javaScriptOperator new in
+syn keyword javaScriptType this var const
+syn keyword javaScriptStatement return with
+syn keyword javaScriptBoolean true false
+syn keyword javaScriptNull null
if exists("javaScript_fold")
syn match javaScriptFunction "\<function\>"
@@ -62,7 +63,8 @@ syn sync fromstart
syn sync maxlines=100
" catch errors caused by wrong parenthesis
-syn region javaScriptParen transparent start="(" end=")" contains=javaScriptParen,javaScriptComment,javaScriptSpecial,javaScriptStringD,javaScriptStringS,javaScriptSpecialCharacter,javaScriptNumber,javaScriptRegexpString,javaScriptBoolean,javaScriptBraces
+syn region javaScriptParen transparent start="(" end=")" contains=javaScriptParen,javaScriptComment,javaScriptSpecial,javaScriptStringD,javaScriptStringS,javaScriptSpecialCharacter,javaScriptNumber,javaScriptRegexpString,javaScriptBoolean,javaScriptBraces,javaScriptFunction,javaScriptFunctionFold,javaScriptConditional,javaScriptRepeat,javaScriptBranch,javaScriptOperator,javaScriptType,javaScriptStatement,javaScriptBoolean,javaScriptConstant
+ syn region javaScriptParen transparent start="(" end=")" contains=javaScriptParen,javaScriptComment,javaScriptSpecial,javaScriptStringD,javaScriptStringS,javaScriptSpecialCharacter,javaScriptNumber,javaScriptRegexpString,javaScriptBoolean,javaScriptBraces
syn match javaScrParenError ")"
if main_syntax == "javascript"
@@ -79,27 +81,28 @@ if version >= 508 || !exists("did_javascript_syn_inits")
else
command -nargs=+ HiLink hi def link <args>
endif
- HiLink javaScriptComment Comment
- HiLink javaScriptLineComment Comment
- HiLink javaScriptCommentTodo Todo
- HiLink javaScriptSpecial Special
- HiLink javaScriptStringS String
- HiLink javaScriptStringD String
- HiLink javaScriptCharacter Character
- HiLink javaScriptSpecialCharacter javaScriptSpecial
- HiLink javaScriptNumber javaScriptValue
- HiLink javaScriptConditional Conditional
- HiLink javaScriptRepeat Repeat
- HiLink javaScriptBranch Conditional
- HiLink javaScriptOperator Operator
- HiLink javaScriptType Type
- HiLink javaScriptStatement Statement
- HiLink javaScriptFunction Function
- HiLink javaScriptBraces Function
- HiLink javaScriptError Error
- HiLink javaScrParenError javaScriptError
- HiLink javaScriptBoolean Boolean
- HiLink javaScriptRegexpString String
+ HiLink javaScriptComment Comment
+ HiLink javaScriptLineComment Comment
+ HiLink javaScriptCommentTodo Todo
+ HiLink javaScriptSpecial Special
+ HiLink javaScriptStringS String
+ HiLink javaScriptStringD String
+ HiLink javaScriptCharacter Character
+ HiLink javaScriptSpecialCharacter javaScriptSpecial
+ HiLink javaScriptNumber javaScriptValue
+ HiLink javaScriptConditional Conditional
+ HiLink javaScriptRepeat Repeat
+ HiLink javaScriptBranch Conditional
+ HiLink javaScriptOperator Operator
+ HiLink javaScriptType Type
+ HiLink javaScriptStatement Statement
+ HiLink javaScriptFunction Function
+ HiLink javaScriptBraces Function
+ HiLink javaScriptError Error
+ HiLink javaScrParenError javaScriptError
+ HiLink javaScriptNull Keyword
+ HiLink javaScriptBoolean Boolean
+ HiLink javaScriptRegexpString String
delcommand HiLink
endif
diff --git a/runtime/syntax/lex.vim b/runtime/syntax/lex.vim
index 6c6121efc..9adc388ff 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: Jul 28, 2004
-" Version: 5
+" Last Change: Nov 26, 2004
+" Version: 6
" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax
"
" Option:
@@ -56,7 +56,7 @@ syn region lexBrace start="\[" skip=+\\\\\|\\+ end="]" contained
syn region lexPatString matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained
syn match lexPatTag "^<\I\i*\(,\I\i*\)*>*" contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSep
syn match lexPatTag +^<\I\i*\(,\I\i*\)*>*\(\\\\\)*\\"+ contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSep
-syn region lexPatComment start="^\s*/\*" end="\*/" skipnl contained contains=cTodo nextgroup=lexPatComment,lexPat,lexPatString,lexPatTag,@Spell
+syn region lexPatComment start="^\s*/\*" end="\*/" skipnl contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell
syn match lexPatCodeLine ".*$" contained contains=ALLBUT,@lexListGroup
syn match lexMorePat "\s*|\s*$" skipnl contained nextgroup=lexPat,lexPatTag,lexPatComment
syn match lexPatSep "\s\+" contained nextgroup=lexMorePat,lexPatCode,lexPatCodeLine
diff --git a/runtime/syntax/lynx.vim b/runtime/syntax/lynx.vim
index 1dee1ef79..471d708a0 100644
--- a/runtime/syntax/lynx.vim
+++ b/runtime/syntax/lynx.vim
@@ -1,9 +1,9 @@
" Lynx syntax file
" Filename: lynx.vim
" Language: Lynx configuration file ( lynx.cfg )
-" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
-" URL: http://mugca.its.monash.edu.au/~djkea2/vim/syntax/lynx.vim
-" Last Change: 2003 May 11
+" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/lynx.vim
+" Last Change: 2004 Nov 27
" TODO: more intelligent and complete argument highlighting
diff --git a/runtime/syntax/mailcap.vim b/runtime/syntax/mailcap.vim
index 6d6270709..547db7362 100644
--- a/runtime/syntax/mailcap.vim
+++ b/runtime/syntax/mailcap.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Mailcap configuration file
-" Maintainer: Doug Kearns
-" Last Change: 2002 November 24
-" URL: http://mugca.its.monash.edu.au/~djkea2/vim/syntax/mailcap.vim
+" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
+" Last Change: 2004 Nov 27
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/mailcap.vim
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
diff --git a/runtime/syntax/maple.vim b/runtime/syntax/maple.vim
index 2fa04577b..594079264 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: Aug 19, 2004
-" Version: 5
+" Last Change: Oct 12, 2004
+" Version: 6
" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax
"
" Package Function Selection: {{{1
@@ -116,11 +116,12 @@ syn keyword mvPackage VectorCalculus Worksheet XMLTools
syn keyword mvTodo contained TODO
if exists("g:mapleversion") && g:mapleversion < 9
syn region mvString 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,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 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
diff --git a/runtime/syntax/ratpoison.vim b/runtime/syntax/ratpoison.vim
index 39094fc10..02a0a92f0 100644
--- a/runtime/syntax/ratpoison.vim
+++ b/runtime/syntax/ratpoison.vim
@@ -1,9 +1,9 @@
" Vim syntax file
" Filename: ratpoison.vim
" Language: Ratpoison configuration/commands file ( /etc/ratpoisonrc ~/.ratpoisonrc )
-" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
-" URL: http://mugca.its.monash.edu.au/~djkea2/vim/syntax/ratpoison.vim
-" Last Change: 2004 Apr 27
+" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/ratpoison.vim
+" Last Change: 2004 Nov 27
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
diff --git a/runtime/syntax/ruby.vim b/runtime/syntax/ruby.vim
index 02f178d65..732b47013 100644
--- a/runtime/syntax/ruby.vim
+++ b/runtime/syntax/ruby.vim
@@ -1,9 +1,9 @@
" Vim syntax file
" Language: Ruby
-" Maintainer: Doug Kearns
+" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" Previous Maintainer: Mirko Nasato
-" Last Change: 2003 May 31
-" URL: http://mugca.its.monash.edu.au/~djkea2/vim/syntax/ruby.vim
+" Last Change: 2004 Nov 27
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/ruby.vim
" $Id$
diff --git a/runtime/syntax/scheme.vim b/runtime/syntax/scheme.vim
index 41d491c65..93d4187f3 100644
--- a/runtime/syntax/scheme.vim
+++ b/runtime/syntax/scheme.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Scheme (R5RS)
-" Last Change: July 14, 2004
-" Maintainer: Sergey Khorev <iamphet@nm.ru>
+" Last Change: Nov 28, 2004
+" Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
" Original author: Dirk van Deun <dirk@igwe.vub.ac.be>
" This script incorrectly recognizes some junk input as numerals:
@@ -143,7 +143,7 @@ syn region schemeStruc matchgroup=Delimiter start="\[" matchgroup=Delimiter end=
syn region schemeStruc matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALL
" Simple literals:
-syn region schemeString start=+"+ skip=+\\[\\"]+ end=+"+
+syn region schemeString start=+\%(\\\)\@<!"+ skip=+\\[\\"]+ end=+"+
" Comments:
@@ -172,15 +172,16 @@ syn match schemeChar oneline "#\\newline"
syn match schemeError oneline !#\\newline[^ \t\[\]()";]\+!
if exists("b:is_mzscheme") || exists("is_mzscheme")
- " MzScheme extensions added by Sergey Khorev
+ " MzScheme extensions
" multiline comment
- syntax region schemeMultilineComment start=/#|/ end=/|#/
+ syn region schemeComment start="#|" end="|#"
+
" #%xxx are the special MzScheme identifiers
syn match schemeOther oneline "#%[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
" anything limited by |'s is identifier
syn match schemeOther oneline "|[^|]\+|"
- syn match schemeChar oneline "#\\return"
+ syn match schemeChar oneline "#\\\%(return\|tab\)"
" Modules require stmt
syn keyword schemeExtSyntax module require dynamic-require lib prefix all-except prefix-all-except rename
@@ -230,12 +231,19 @@ endif
if exists("b:is_chicken") || exists("is_chicken")
+ " multiline comment
+ syntax region schemeMultilineComment start=/#|/ end=/|#/ contains=schemeMultilineComment
+
syn match schemeOther oneline "##[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
syn match schemeExtSyntax oneline "#:[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
syn keyword schemeExtSyntax unit uses declare hide foreign-declare foreign-parse foreign-parse/spec
- syn keyword schemeExtSyntax foreign-lambda foreign-lambda*
- syn keyword schemeExtSyntax let-optionals let-optionals* define-foreign-variable
+ syn keyword schemeExtSyntax foreign-lambda foreign-lambda* define-external define-macro load-library
+ syn keyword schemeExtSyntax let-values let*-values letrec-values ->string require-extension
+ syn keyword schemeExtSyntax let-optionals let-optionals* define-foreign-variable define-record
+ syn keyword schemeExtSyntax pointer tag-pointer tagged-pointer? define-foreign-type
+ syn keyword schemeExtSyntax require require-for-syntax cond-expand and-let* receive argc+argv
+ syn keyword schemeExtSyntax fixnum? fx= fx> fx< fx>= fx<= fxmin fxmax
syn keyword schemeExtFunc ##core#inline ##sys#error ##sys#update-errno
" here-string
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index f8624aec4..27ff7757b 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -2,8 +2,8 @@
" 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: Jul 26, 2004
-" Version: 69
+" Last Change: Oct 17, 2004
+" Version: 70
" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax
"
" Using the following VIM variables: {{{1
@@ -53,6 +53,9 @@ endif
if !exists("g:sh_fold_enabled")
let g:sh_fold_enabled= 0
+elseif g:sh_fold_enabled != 0 && !has("folding")
+ let g:sh_fold_enabled= 0
+ echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; re-compile vim for +fold support"
endif
" sh syntax is case sensitive
@@ -344,7 +347,7 @@ syn match bkshFunctionDelim "[{}]" contained
" Parameter Dereferencing: {{{1
" ========================
-syn match shDerefSimple "\$\w\+"
+syn match shDerefSimple "\$\%(\h\w*\|\d\)"
syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray
syn match shDerefWordError "[^}$[]" contained
syn match shDerefSimple "\$[-#*@!?]"
diff --git a/runtime/syntax/sieve.vim b/runtime/syntax/sieve.vim
new file mode 100644
index 000000000..2923f446b
--- /dev/null
+++ b/runtime/syntax/sieve.vim
@@ -0,0 +1,70 @@
+" Vim syntax file
+" Maintainer: Nikolai Weibull <source@pcppopper.org>
+" URL: http://www.pcppopper.org/
+" Latest Revision: 2004-11-11
+" arch-tag: 356fad6d-ff6b-453c-bd25-7fc63c4758bc
+
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" Todo
+syn keyword sieveTodo contained TODO FIXME XXX NOTE
+
+" Comments
+syn region sieveComment matchgroup=sieveComment start='/\*' end='\*/' contains=sieveTodo
+syn region sieveComment matchgroup=sieveComment start='#' end='$' contains=sieveTodo
+
+syn case ignore
+
+" Tags
+syn match sieveTag ':\h\w*'
+
+" Numbers
+syn match sieveNumber '\d\+[KMG]\='
+
+" Specials
+syn match sieveSpecial '\\["\\]'
+
+" Strings
+syn region sieveString matchgroup=sieveString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=sieveSpecial
+syn region sieveString matchgroup=sieveString start='text:' end='\n.\n'
+
+" Keywords
+syn keyword sieveConditional if elsif else
+syn keyword sieveTest address allof anyof envelope exists false header not size true
+syn keyword sievePreProc require stop
+syn keyword sieveAction reject fileinto redirect keep discard
+syn match sieveKeyword '\<\h\w*\>'
+
+" 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_sieve_syn_inits")
+ if version < 508
+ let did_sieve_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ HiLink sieveTodo Todo
+ HiLink sieveComment Comment
+ HiLink sieveTag Type
+ HiLink sieveNumber Number
+ HiLink sieveSpecial Special
+ HiLink sieveString String
+ HiLink sieveConditional Conditional
+ HiLink sieveTest Keyword
+ HiLink sievePreProc PreProc
+ HiLink sieveAction Keyword
+ HiLink sieveKeyword Keyword
+
+ delcommand HiLink
+endif
+
+let b:current_syntax = "sieve"
+
+" vim: set sts=2 sw=2:
diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim
index dc352fd6f..a7c6ee137 100644
--- a/runtime/syntax/tex.vim
+++ b/runtime/syntax/tex.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Jun 15, 2004
-" Version: 25
+" Last Change: Oct 13, 2004
+" Version: 26
" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax
"
" Notes: {{{1
@@ -112,7 +112,7 @@ else
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup
syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup
endif
-syn region texParen start="(" end=")" contains=@texMatchGroup
+syn region texParen start="(" end=")" contains=@texMatchGroup,@Spell
if !exists("g:tex_no_error")
syn match texError "[}\])]"
endif
@@ -233,9 +233,24 @@ syn match texSpaceCode "\\\(math\|cat\|del\|lc\|sf\|uc\)code`"me=e-1 nextgroup=
syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained
" Sections, subsections, etc: {{{1
-syn match texSection "\\\(sub\)*section\*\=\>"
-syn match texSection "\\\(title\|author\|part\|chapter\|paragraph\|subparagraph\)\>"
-syn match texSection "\\begin\s*{\s*abstract\s*}\|\\end\s*{\s*abstract\s*}"
+if exists("tex_dosynfolds") && has("folding")
+ " COMBAK -- this folding doesn't work as expected as yet
+ syn region Red matchgroup=texSection start="\\section\*\=\>" end="\\\%(sub\)*\%(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>"me=s end="%\s*stopzone\>" fold
+" syn region Red matchgroup=texSection start="\\section\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" end="%\s*stopzone\>" contains=TOP fold
+" syn region Blue matchgroup=texSection start="\\subsection\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold
+" syn region texSectionZone matchgroup=texSection start="\\subsubsection\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold
+" syn region texSectionZone matchgroup=texSection start="\\title\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold
+" syn region texSectionZone matchgroup=texSection start="\\author\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold
+" syn region texSectionZone matchgroup=texSection start="\\part\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold
+" syn region texSectionZone matchgroup=texSection start="\\chapter\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold
+" syn region texSectionZone matchgroup=texSection start="\\paragraph\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold
+" syn region texSectionZone matchgroup=texSection start="\\subparagraph\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold
+" syn region texSectionZone matchgroup=texSection start="\\begin\s*{\s*abstract\s*}" end="\\end\s*{\s*abstract\s*}" contains=TOP fold
+else
+ syn match texSection "\\\(sub\)*section\*\=\>"
+ syn match texSection "\\\(title\|author\|part\|chapter\|paragraph\|subparagraph\)\>"
+ syn match texSection "\\begin\s*{\s*abstract\s*}\|\\end\s*{\s*abstract\s*}"
+endif
" Bad Math (mismatched): {{{1
if !exists("tex_no_math")
diff --git a/runtime/syntax/tidy.vim b/runtime/syntax/tidy.vim
index 06518033b..bffb61702 100644
--- a/runtime/syntax/tidy.vim
+++ b/runtime/syntax/tidy.vim
@@ -1,9 +1,9 @@
" Vim syntax file
" Filename: tidy.vim
" Language: HMTL Tidy configuration file ( /etc/tidyrc ~/.tidyrc )
-" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
-" URL: http://mugca.its.monash.edu.au/~djkea2/vim/syntax/tidy.vim
-" Last Change: 2002 Oct 24
+" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/tidy.vim
+" Last Change: 2004 Nov 27
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
diff --git a/runtime/syntax/tpp.vim b/runtime/syntax/tpp.vim
index 28a2c6b51..8eb748053 100644
--- a/runtime/syntax/tpp.vim
+++ b/runtime/syntax/tpp.vim
@@ -2,7 +2,7 @@
" Language: tpp - Text Presentation Program
" Maintainer: Gerfried Fuchs <alfie@ist.org>
" Filenames: *.tpp
-" Last Change: 13. October 2004
+" Last Change: 28. October 2004
" URL: http://alfie.ist.org/projects/vim/syntax/tpp.vim
" License: BSD
"
@@ -25,7 +25,7 @@ endif
"" list of the legal switches/options
syn match tppAbstractOptionKey contained "^--\%(author\|title\|date\) *" nextgroup=tppValue
-syn match tppPageLocalOptionKey contained "^--\%(heading\|center\|right\|sleep\|huge\|exec\) *" nextgroup=tppValue
+syn match tppPageLocalOptionKey contained "^--\%(heading\|center\|right\|huge\|sethugefont\|exec\) *" nextgroup=tppValue
syn match tppPageLocalSwitchKey contained "^--\%(horline\|-\|\%(begin\|end\)\%(\%(shell\)\?output\|slide\%(left\|right\|top\|bottom\)\)\|\%(bold\|rev\|ul\)\%(on\|off\)\|withborder\)"
syn match tppNewPageOptionKey contained "^--newpage *" nextgroup=tppValue
syn match tppColorOptionKey contained "^--\%(\%(bg\|fg\)\?color\) *"
@@ -39,7 +39,7 @@ syn region tppPageLocalSwitch start="^--" end="$" contains=tppPageLocalSwitchKey
syn region tppColorOption start="^--\%(\%(bg\|fg\)\?color\)" end="$" contains=tppColorOptionKey,tppColor oneline
syn region tppTimeOption start="^--sleep" end="$" contains=tppTimeOptionKey,tppTime oneline
syn region tppNewPageOption start="^--newpage" end="$" contains=tppNewPageOptionKey oneline
-syn region tppPageLocalOption start="^--\%(heading\|center\|right\|sleep\|huge\|exec\)" end="$" contains=tppPageLocalOptionKey oneline
+syn region tppPageLocalOption start="^--\%(heading\|center\|right\|huge\|sethugefont\|exec\)" end="$" contains=tppPageLocalOptionKey oneline
syn region tppAbstractOption start="^--\%(author\|title\|date\)" end="$" contains=tppAbstractOptionKey oneline
if main_syntax != 'sh'
@@ -55,6 +55,7 @@ if main_syntax != 'sh'
endif
+syn match tppComment "^--##.*$"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
@@ -76,6 +77,7 @@ if version >= 508 || !exists("did_tpp_syn_inits")
HiLink tppValue String
HiLink tppColor String
HiLink tppTime Number
+ HiLink tppComment Comment
HiLink tppAbstractOption Error
HiLink tppPageLocalOption Error
HiLink tppPageLocalSwitch Error
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 977ecc627..bd1629e16 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 7.0 script
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: July 12, 2004
-" Version: 7.0-01 NOT RELEASED
+" Last Change: December 07, 2004
+" Version: 7.0-02 NOT RELEASED
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -16,7 +16,7 @@ syn keyword vimTodo contained COMBAK NOT RELEASED TODO WIP
syn cluster vimCommentGroup contains=vimTodo
" regular vim commands {{{2
-syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] cal[l] cat[ch] cc ccl[ose] cd ce[nter] cf[ile] cfir[st] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] diffg[et] diffpatch diffpu[t] diffsplit diffthis dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] fu[nction] g[lobal] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepj[umps] kee[pmarks] lan[guage] la[st] lc[d] lch[dir] le[ft] lefta[bove] l[ist] lm[ap] lmapc[lear] ln[oremap] lo[adview] loc[kmarks] ls lu[nmap] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] norm[al] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] sf[ind] sfir[st sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sn[ext] sN[ext] sni[ff] sno[magic] so[urce] sp[lit] spr[evious] sre[wind] sta[g] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sus[pend] sv[iew] syn syncbind t ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] unh[ide] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] v[global] vie[w] vi[sual] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] winpos* win[size] wn[ext] wN[ext] wp[revous] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] y[ank]
+syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] cal[l] cat[ch] cc ccl[ose] cd ce[nter] cf[ile] cfir[st] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] fu[nction] g[lobal] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] lan[guage] la[st] lc[d] lch[dir] le[ft] lefta[bove] l[ist] lm[ap] lmapc[lear] ln[oremap] lo[adview] loc[kmarks] ls lu[nmap] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] sandbox sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] sf[ind] sfir[st sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sn[ext] sN[ext] sni[ff] sno[magic] so[urce] sp[lit] spr[evious] sre[wind] sta[g] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sus[pend] sv[iew] syncbind t ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] unh[ide] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] v[global] vie[w] vi[sual] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] winpos* win[size] wn[ext] wN[ext] wp[revous] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] y[ank]
syn match vimCommand contained "\<z[-+^.=]"
" vimOptions are caught only when contained in a vimSet {{{2
@@ -51,12 +51,14 @@ syn keyword vimGroup contained Comment Constant String Character Number Boolean
" Default highlighting groups {{{2
syn keyword vimHLGroup contained Cursor CursorIM DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr Menu ModeMsg MoreMsg NonText Normal Question Scrollbar Search SignColumn SpecialKey StatusLine StatusLineNC Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
+syn match vimHLGroup contained "Conceal"
syn case match
" Function Names {{{2
-syn keyword vimFuncName contained append argc argidx argv browse bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line char2nr cindent col confirm cscope_connection cursor delete did_filetype escape eventhandler executable exists expand filereadable filewritable fnamemodify foldclosed foldclosedend foldlevel foldtext foreground function getbufvar getchar getcharmod getcmdline getcmdpos getcwd getfsize getftime getline getreg getregtype getwinposx getwinposy getwinvar glob globpath has hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent input inputdialog inputrestore inputsave inputsecret isdirectory libcall libcallnr line line2byte lispindent localtime maparg mapcheck match matchend matchstr mode nextnonblank nr2char prevnonblank remote_expr remote_foreground remote_peek remote_read remote_send rename resolve search searchpair server2client serverlist setbufvar setcmdpos setline setreg setwinvar simplify strftime stridx strlen strpart strridx strtrans submatch substitute synID synIDattr synIDtrans system tempname tolower toupper tr type virtcol visualmode winbufnr wincol winheight winline winnr winrestcmd winwidth
+syn keyword vimFuncName contained append argc argidx argv browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx char2nr cindent col confirm cscope_connection cursor delete did_filetype diff_filler diff_hlID escape eventhandler executable exists expand filereadable filewritable finddir findfile fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function getbufvar getchar getcharmod getcmdline getcmdpos getcwd getfperm getfsize getftime getftype getline getreg getregtype getwinposx getwinposy getwinvar glob globpath has hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent input inputdialog inputrestore inputsave inputsecret isdirectory libcall libcallnr line line2byte lispindent localtime maparg mapcheck match matchend matchstr mode nextnonblank nr2char prevnonblank remote_expr remote_foreground remote_peek remote_read remote_send rename repeat resolve search searchpair server2client serverlist setbufvar setcmdpos setline setreg setwinvar simplify strftime stridx strlen strpart strridx strtrans submatch substitute synID synIDattr synIDtrans system tempname tolower toupper tr type virtcol visualmode winbufnr wincol winheight winline winnr winrestcmd winwidth
"--- syntax above generated by mkvimvim ---
+"--- syntax above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
" Numbers {{{2
@@ -68,7 +70,7 @@ syn match vimNumber "#\x\{6}"
" All vimCommands are contained by vimIsCommands. {{{2
syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd
-syn match vimIsCommand "\<\a\+\>" contains=vimCommand
+syn match vimIsCommand "\<\h\w*\>" contains=vimCommand
syn match vimVar "\<[bwglsav]:\K\k*\>"
syn match vimVar contained "\<\K\k*\>"
@@ -88,7 +90,7 @@ endif
" Filetypes {{{2
" =========
-syn match vimFiletype "\<filet\%[ype]\(\s\+\I\i*\)*\(|\|$\)" skipwhite contains=vimFTCmd,vimFTOption,vimFTError
+syn match vimFiletype "\<filet\%[ype]\(\s\+\I\i*\)*" skipwhite contains=vimFTCmd,vimFTOption,vimFTError
if !exists("g:vimsyntax_noerror")
syn match vimFTError contained "\I\i*"
endif
@@ -126,6 +128,7 @@ syn cluster vimOperGroup contains=vimOper,vimOperParen,vimNumber,vimString,vimOp
syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile
syn region vimOperParen oneline matchgroup=vimOper start="(" end=")" contains=@vimOperGroup
+syn region vimOperParen oneline matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar
syn match vimOperOk "\<[aiAIrR][()]"
if !exists("g:vimsyntax_noerror")
syn match vimOperError ")"
@@ -242,7 +245,7 @@ syn match vimFilter contained "^!.\{-}\(|\|$\)" contains=vimSpecFile
syn match vimFilter contained "\A!.\{-}\(|\|$\)"ms=s+1 contains=vimSpecFile
" Complex repeats (:h complex-repeat) {{{2
-syn match vimCmplxRepeat '[^a-zA-Z_/\\]q[0-9a-zA-Z"]'lc=1
+syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]'lc=1
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\)'
" Set command and associated set-options (vimOptions) with comment {{{2
@@ -266,7 +269,7 @@ syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vim
" Echo and Execute -- prefer strings! {{{2
" ================
syn region vimEcho oneline excludenl matchgroup=vimCommand start="\<ec\%[ho]\>" skip="\(\\\\\)*\\|" end="$\||" contains=vimFunc,vimString,varVar
-syn region vimExecute oneline excludenl matchgroup=vimCommand start="\<exe\%[cute]\>" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimIsCommand,vimString,vimOper,vimVar,vimNotation
+syn region vimExecute oneline excludenl matchgroup=vimCommand start="\<exe\%[cute]\>" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimIsCommand,vimString,vimOper,vimVar,vimNotation,vimOperParen
syn match vimEchoHL "echohl\=" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchoHLNone
syn case ignore
syn keyword vimEchoHLNone none
diff --git a/runtime/syntax/wget.vim b/runtime/syntax/wget.vim
index 801f76d8d..88df69079 100644
--- a/runtime/syntax/wget.vim
+++ b/runtime/syntax/wget.vim
@@ -1,9 +1,9 @@
" Wget syntax file
" Filename: wget.vim
" Language: Wget configuration file ( /etc/wgetrc ~/.wgetrc )
-" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
-" URL: http://mugca.its.monash.edu.au/~djkea2/vim/syntax/wget.vim
-" Last Change: 2003 May 11
+" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/wget.vim
+" Last Change: 2004 Nov 27
" TODO: all commands are actually underscore and hyphen insensitive, though
" they are normally named as listed below
diff --git a/runtime/tutor/tutor.de b/runtime/tutor/tutor.de
index 2a8f0909a..d207621cb 100644
--- a/runtime/tutor/tutor.de
+++ b/runtime/tutor/tutor.de
@@ -67,7 +67,7 @@ Bemerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du
Wenn Du die Änderungen speichern und beenden willst, tippe:
:wq <ENTER>
- 3. Wenn Du die Eingabeaufforderung siehst, tippe das Kommando, dass Dich zu
+ 3. Wenn Du die Eingabeaufforderung siehst, tippe das Kommando, das Dich zu
diesem Tutor geführt hat. Das könnte sein: vimtutor <ENTER>
Im Normalfall würdest Du eingeben Vim tutor <ENTER>
@@ -299,11 +299,11 @@ Bemerkung: Für die Wagemutigen: die Eingabe lediglich des Objekt-Teils im
Lektion 3.1: ANFÜGEN (PUT)
- ** Tippe p ,um das zuletzt Gelöschte nach dem Cursor anzufügen. **
+ ** Tippe p , um das zuletzt Gelöschte nach dem Cursor anzufügen. **
1. Bewege den Cursor zur ersten Zeile des unten stehenden Sinnspruchs.
- 2. Tippe dd , um die Zeile zu löschen und sie im Vims Puffer zu speichern.
+ 2. Tippe dd , um die Zeile zu löschen und sie in Vims Puffer zu speichern.
3. Bewege den Cursor zur Zeile ÜBER derjenigen,
wo die gelöschte Zeile platziert werden soll.
@@ -350,7 +350,7 @@ Bemerkung: Erinnere Dich, dass Du durch Anwenden lernen solltest, nicht durch
1. Bewege den Cursor zur ersten unten stehenden, mit ---> markierten Zeile.
- 2. Plaziere den Cursor auf das s von Wstwr.
+ 2. Platziere den Cursor auf das s von Wstwr.
3. Tippe cw und die Wortkorrektur ein (in diesem Fall, tippe 'örter'.)
@@ -372,7 +372,7 @@ Bemerke, dass cw nicht nur das Wort ersetzt, sondern Dich außerdem in den
** Das change-Kommando arbeitet mit denselben Objekten wie delete **
- 1. Das change Kommando arbeitet gleicher Weise wie delete. Das Format ist:
+ 1. Das change Kommando arbeitet in gleicher Weise wie delete. Das Format ist:
[Nummer] c Objekt ODER c [Nummer] Objekt
@@ -393,7 +393,7 @@ Bemerke, dass cw nicht nur das Wort ersetzt, sondern Dich außerdem in den
ZUSAMMENFASSUNG VON LEKTION 3
- 1. Um einen vorher gelöschten Text anzufügen, tippe p . Diese fügt den
+ 1. Um einen vorher gelöschten Text anzufügen, tippe p . Dies fügt den
gelöschten Text NACH dem Cursor an (wenn es sich um eine ganze Zeile
handelt, wird ab der Zeile unter dem Cursor eingefügt).
@@ -463,7 +463,7 @@ Nun fahre mit der nächsten Lektion fort.
** Tippe % , um eine korrespondierende Klammer ),], oder } zu finden. **
- 1. Plaziere den Cursor auf irgendeinem der Zeichen (, [, oder {
+ 1. Platziere den Cursor auf irgendeinem der Zeichen (, [, oder {
in der unten stehenden Zeile, die mit ---> markiert ist.
2. Nun tippe das % Zeichen.
@@ -612,7 +612,7 @@ Bemerkung: Diese Funktionalität ist sehr nützlich bei der Fehlersuche in einem
1. Tippe :!ls bzw. !dir , um sicherzustellen, dass Deine Datei TEST
von vorhin vorhanden ist.
- 2. Plaziere den Cursor auf der ersten Zeile dieses Kapitels.
+ 2. Platziere den Cursor auf der ersten Zeile dieses Kapitels.
BEACHTE: Nachdem Du Schritt 3 ausgeführt hast, wirst Du Lektion 5.3 sehen.
An diesem Punkt bewege Dich wieder ABWÄRTS zu dieser Lektion.
@@ -706,7 +706,7 @@ Bemerkung: Dies macht es überflüssig, erst i zu tippen, dann das letzte
1. Bewege den Cursor zur ersten unten stehenden, mit ---> markierten Zeile.
- 2. Plaziere den Cursor auf den Anfang des ersten Wortes, welches sich von
+ 2. Platziere den Cursor auf den Anfang des ersten Wortes, welches sich von
der zweiten mit ---> markierten Zeile unterscheidet (das Wort 'benutze').
3. Nun gib ein R ein, und ersetze den Rest des Textes auf der ersten
@@ -825,11 +825,19 @@ Du kannst all Deine Lieblingsoptionen zu dieser "vimrc" - Datei zufügen.
Für weiteres Lesen und Lernen kann folgendes Buch empfohlen werden:
Vim - Vi Improved - von Steve Oualline
Verlag: New Riders
- Das erste Buch, dass durchgängig Vim gewidmet ist. Besonders nützlich
+ Das erste Buch, das durchgängig Vim gewidmet ist. Besonders nützlich
für Anfänger.
Viele Beispiele und Bilder sind enthalten.
Siehe http://www.iccf.nl/click5.html
+ Als aktuelle Referenz f�r Version 6.2 und knappe Einf�hrung dient das
+ folgende Buch:
+ vim ge-packt von Reinhard Wobst
+ mitp-Verlag, ISBN 3-8266-1425-9
+ Trotz der kompakten Darstellung ist es durch viele n�tzliche Beispiele auch
+ f�r Einsteiger empfehlenswert. Probekapitel und die Beispielskripte sind
+ online erh�ltlich. Siehe http://www.iccf.nl/click5.html
+
Folgendes Buch ist älter und mehr über Vi als Vim, aber auch empfehlenswert:
Linda Lamb und Arnold Robbins
Textbearbeitung mit dem vi-Editor
diff --git a/src/Make_ro.mak b/src/Make_ro.mak
index 6ac2f94b5..82708f41f 100644
--- a/src/Make_ro.mak
+++ b/src/Make_ro.mak
@@ -2,18 +2,16 @@
# Makefile for Vim on RISC OS - Andy Wingate
#
-GCC = gcc -mthrowback
-CFLAGS = -DRISCOS -DFEAT_GUI
-# Optimising on ex_docmd.c seems to cause segfaults on compilation. Needs investigation.
-CCEX_DOCMD = $(GCC) $(CFLAGS)
-CC = $(GCC) $(CFLAGS) -O2
+GCC = gcc -mthrowback
+CFLAGS = -DRISCOS -DFEAT_GUI
+CC = $(GCC) $(CFLAGS) -O2
# -DUP_BC_PC_EXTERN for term.c needed as BC defined in termlib.c and term.c
TERMFLAG = -DUP_BC_PC_EXTERN
ASMFLAGS = -throwback -objasm -gcc
-OBJS = o.buffer o.charset o.digraph o.edit o.eval o.ex_cmds o.ex_cmds2 o.diff \
+OBJS = o.buffer o.charset o.diff o.digraph o.edit o.eval o.ex_cmds o.ex_cmds2 \
o.ex_docmd o.ex_eval o.ex_getln o.fileio o.fold o.getchar o.main o.mark o.mbyte \
o.memfile o.memline o.menu o.message o.misc1 o.misc2 o.move \
o.normal o.ops o.option o.quickfix o.regexp o.screen o.search \
@@ -26,7 +24,7 @@ Vim: $(OBJS)
install: Vim
squeeze -v Vim @.!Vim.Vim
-clean:
+clean:
create o.!fake! 0
wipe o.* ~cf
remove Vim
@@ -35,134 +33,93 @@ o.swis: s.swis
as $(ASMFLAGS) -o o.swis s.swis
# Rules for object files
-# You shouldn't need to put all this information in as all but term.c have the same
-# rule (and only then to save extra defines) but some versions of make are awkward.
+
+o.%: c.%
+ $(CC) -c $< -o $@
o.buffer: c.buffer
- $(CC) -c c.buffer -o o.buffer
o.charset: c.charset
- $(CC) -c c.charset -o o.charset
o.digraph: c.digraph
- $(CC) -c c.digraph -o o.digraph
o.diff: c.diff
- $(CC) -c c.diff -o o.diff
o.edit: c.edit
- $(CC) -c c.edit -o o.edit
o.eval: c.eval
- $(CC) -c c.eval -o o.eval
o.ex_cmds: c.ex_cmds
- $(CC) -c c.ex_cmds -o o.ex_cmds
o.ex_cmds2: c.ex_cmds2
- $(CC) -c c.ex_cmds2 -o o.ex_cmds2
o.ex_docmd: c.ex_docmd
- $(CCEX_DOCMD) -c c.ex_docmd -o o.ex_docmd
o.ex_eval: c.ex_eval
- $(CCEX_DOCMD) -c c.ex_eval -o o.ex_eval
o.ex_getln: c.ex_getln
- $(CC) -c c.ex_getln -o o.ex_getln
o.fileio: c.fileio
- $(CC) -c c.fileio -o o.fileio
o.fold: c.fold
- $(CC) -c c.fold -o o.fold
o.getchar: c.getchar
- $(CC) -c c.getchar -o o.getchar
o.gui: c.gui
- $(CC) -c c.gui -o o.gui
o.gui_riscos: c.gui_riscos
- $(CC) -c c.gui_riscos -o o.gui_riscos
o.main: c.main
- $(CC) -c c.main -o o.main
o.mark: c.mark
- $(CC) -c c.mark -o o.mark
o.mbyte: c.mbyte
- $(CC) -c c.mbyte -o o.mbyte
o.memfile: c.memfile
- $(CC) -c c.memfile -o o.memfile
o.memline: c.memline
- $(CC) -c c.memline -o o.memline
o.menu: c.menu
- $(CC) -c c.menu -o o.menu
o.message: c.message
- $(CC) -c c.message -o o.message
o.misc1: c.misc1
- $(CC) -c c.misc1 -o o.misc1
o.misc2: c.misc2
- $(CC) -c c.misc2 -o o.misc2
o.move: c.move
- $(CC) -c c.move -o o.move
o.normal: c.normal
- $(CC) -c c.normal -o o.normal
o.ops: c.ops
- $(CC) -c c.ops -o o.ops
o.option: c.option
- $(CC) -c c.option -o o.option
o.os_riscos: c.os_riscos
- $(CC) -c c.os_riscos -o o.os_riscos
o.pty: c.pty
- $(CC) -c c.pty -o p.pty
o.quickfix: c.quickfix
- $(CC) -c c.quickfix -o o.quickfix
o.regexp: c.regexp
- $(CC) -c c.regexp -o o.regexp
o.screen: c.screen
- $(CC) -c c.screen -o o.screen
o.search: c.search
- $(CC) -c c.search -o o.search
o.syntax: c.syntax
- $(CC) -c c.syntax -o o.syntax
o.tag: c.tag
- $(CC) -c c.tag -o o.tag
o.term: c.term
$(CC) $(TERMFLAG) -c c.term -o o.term
o.termlib: c.termlib
- $(CC) -c c.termlib -o o.termlib
o.ui: c.ui
- $(CC) -c c.ui -o o.ui
o.undo: c.undo
- $(CC) -c c.undo -o o.undo
o.version: c.version
- $(CC) -c c.version -o o.version
o.window: c.window
- $(CC) -c c.window -o o.window
diff --git a/src/buffer.c b/src/buffer.c
index a1d593dab..f02c00d25 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -538,8 +538,7 @@ buf_freeall(buf, del_buf, wipe_buf)
return;
}
# ifdef FEAT_EVAL
- /* autocmds may abort script processing */
- if (aborting())
+ if (aborting()) /* autocmds may abort script processing */
return;
# endif
@@ -755,7 +754,6 @@ handle_swap_exists(old_curbuf)
# endif
}
swap_exists_action = SEA_NONE;
-
}
#endif
@@ -1031,8 +1029,12 @@ do_buffer(action, start, dir, count, forceit)
* now. */
return FAIL;
# endif
+ /* If it's still changed fail silently, the dialog already
+ * mentioned why it fails. */
+ if (bufIsChanged(buf))
+ return FAIL;
}
- if (bufIsChanged(buf))
+ else
#endif
{
EMSGN(_("E89: No write since last change for buffer %ld (add ! to override)"),
@@ -1518,8 +1520,7 @@ buflist_new(ffname, sfname, lnum, flags)
if (buf == curbuf)
apply_autocmds(EVENT_BUFWIPEOUT, NULL, NULL, FALSE, curbuf);
# ifdef FEAT_EVAL
- /* autocmds may abort script processing */
- if (aborting())
+ if (aborting()) /* autocmds may abort script processing */
return NULL;
# endif
#endif
@@ -1572,8 +1573,7 @@ buflist_new(ffname, sfname, lnum, flags)
if (buf != curbuf) /* autocommands deleted the buffer! */
return NULL;
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
- /* autocmds may abort script processing */
- if (aborting())
+ if (aborting()) /* autocmds may abort script processing */
return NULL;
#endif
/* buf->b_nwindows = 0; why was this here? */
@@ -1649,8 +1649,7 @@ buflist_new(ffname, sfname, lnum, flags)
if (flags & BLN_LISTED)
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf);
# ifdef FEAT_EVAL
- /* autocmds may abort script processing */
- if (aborting())
+ if (aborting()) /* autocmds may abort script processing */
return NULL;
# endif
}
diff --git a/src/eval.c b/src/eval.c
index 88b954971..27783792f 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -4485,7 +4485,16 @@ f_foldtext(argvars, retvar)
s = skipwhite(ml_get(lnum));
/* skip C comment-start */
if (s[0] == '/' && (s[1] == '*' || s[1] == '/'))
+ {
s = skipwhite(s + 2);
+ if (*skipwhite(s) == NUL
+ && lnum + 1 < (linenr_T)vimvars[VV_FOLDEND].val)
+ {
+ s = skipwhite(ml_get(lnum + 1));
+ if (*s == '*')
+ s = skipwhite(s + 1);
+ }
+ }
txt = _("+-%s%3ld lines: ");
r = alloc((unsigned)(STRLEN(txt)
+ STRLEN(vimvars[VV_FOLDDASHES].val) /* for %s */
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 30a5f3a8a..7ad5513bc 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -7892,7 +7892,6 @@ update_topline_cursor()
ex_normal(eap)
exarg_T *eap;
{
- oparg_T oa;
int save_msg_scroll = msg_scroll;
int save_restart_edit = restart_edit;
int save_msg_didout = msg_didout;
@@ -7996,30 +7995,17 @@ ex_normal(eap)
*/
do
{
- clear_oparg(&oa);
- finish_op = FALSE;
if (eap->addr_count != 0)
{
curwin->w_cursor.lnum = eap->line1++;
curwin->w_cursor.col = 0;
}
- /*
- * Stuff the argument into the typeahead buffer.
- * Execute normal_cmd() until there is no typeahead left.
- */
- ins_typebuf(
+ exec_normal_cmd(
#ifdef FEAT_MBYTE
arg != NULL ? arg :
#endif
- eap->arg, eap->forceit ? REMAP_NONE : REMAP_YES, 0,
- TRUE, FALSE);
- while ((!stuff_empty() || (!typebuf_typed() && typebuf.tb_len > 0))
- && !got_int)
- {
- update_topline_cursor();
- normal_cmd(&oa, FALSE); /* execute a Normal mode cmd */
- }
+ eap->arg, eap->forceit ? REMAP_NONE : REMAP_YES, FALSE);
}
while (eap->addr_count > 0 && eap->line1 <= eap->line2 && !got_int);
}
@@ -8085,6 +8071,35 @@ ex_stopinsert(eap)
}
#endif
+#if defined(FEAT_EX_EXTRA) || defined(FEAT_MENU) || defined(PROTO)
+/*
+ * Execute normal mode command "cmd".
+ * "remap" can be REMAP_NONE or REMAP_YES.
+ */
+ void
+exec_normal_cmd(cmd, remap, silent)
+ char_u *cmd;
+ int remap;
+ int silent;
+{
+ oparg_T oa;
+
+ /*
+ * Stuff the argument into the typeahead buffer.
+ * Execute normal_cmd() until there is no typeahead left.
+ */
+ clear_oparg(&oa);
+ finish_op = FALSE;
+ ins_typebuf(cmd, remap, 0, TRUE, silent);
+ while ((!stuff_empty() || (!typebuf_typed() && typebuf.tb_len > 0))
+ && !got_int)
+ {
+ update_topline_cursor();
+ normal_cmd(&oa, FALSE); /* execute a Normal mode cmd */
+ }
+}
+#endif
+
#ifdef FEAT_FIND_ID
static void
ex_checkpath(eap)
@@ -8742,6 +8757,17 @@ makeopens(fd, dirnow)
}
/*
+ * If there is an empty, unnamed buffer we will wipe it out later.
+ * Remember the buffer number.
+ */
+ if (put_line(fd, "if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''") == FAIL)
+ return FAIL;
+ if (put_line(fd, " let s:wipebuf = bufnr('%')") == FAIL)
+ return FAIL;
+ if (put_line(fd, "endif") == FAIL)
+ return FAIL;
+
+ /*
* Now save the current files, current buffer first.
*/
if (put_line(fd, "set shortmess=aoO") == FAIL)
@@ -8876,6 +8902,18 @@ makeopens(fd, dirnow)
return FAIL;
/*
+ * Wipe out an empty unnamed buffer we started in.
+ */
+ if (put_line(fd, "if exists('s:wipebuf')") == FAIL)
+ return FAIL;
+ if (put_line(fd, " exe 'bwipe ' . s:wipebuf") == FAIL)
+ return FAIL;
+ if (put_line(fd, "endif") == FAIL)
+ return FAIL;
+ if (put_line(fd, "unlet! s:wipebuf") == FAIL)
+ return FAIL;
+
+ /*
* Restore window sizes again after jumping around in windows, because the
* current window has a minimum size while others may not.
*/
diff --git a/src/ex_eval.c b/src/ex_eval.c
index 8be11e13b..e2699bc74 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -1820,19 +1820,25 @@ ex_endtry(eap)
}
/*
- * Function to be called before a failed command invokes a sequence of
- * autocommands for cleanup. (Failure means here that a call to emsg() has
- * been made, an interrupt occurred, or there is an uncaught exception from a
- * previous autocommand execution of the same command.) This function works a
- * bit like ex_finally() except that there was not actually an extra try block
- * around the part that failed and an error or interrupt has not (yet) been
- * converted to an exception. This function saves the
- * error/interrupt/exception state and prepares for the call to do_cmdline()
- * that is going to be made for the cleanup autocommand execution.
+ * enter_cleanup() and leave_cleanup()
*
- * Stores the pending error/interrupt/exception state in the cleanup_T
- * structure pointed to by "csp", which has to be passed as an argument to
- * leave_cleanup() after the autocommand execution has finished.
+ * Functions to be called before/after invoking a sequence of autocommands for
+ * cleanup for a failed command. (Failure means here that a call to emsg()
+ * has been made, an interrupt occurred, or there is an uncaught exception
+ * from a previous autocommand execution of the same command.)
+ *
+ * Call enter_cleanup() with a pointer to a cleanup_T and pass the same
+ * pointer to leave_cleanup(). The cleanup_T structure stores the pending
+ * error/interrupt/exception state.
+ */
+
+/*
+ * This function works a bit like ex_finally() except that there was not
+ * actually an extra try block around the part that failed and an error or
+ * interrupt has not (yet) been converted to an exception. This function
+ * saves the error/interrupt/ exception state and prepares for the call to
+ * do_cmdline() that is going to be made for the cleanup autocommand
+ * execution.
*/
void
enter_cleanup(csp)
@@ -1883,16 +1889,19 @@ enter_cleanup(csp)
}
/*
- * Function to be called after a failed command invoked a sequence of
- * autocommands for cleanup. It is a bit like ex_endtry() except that there
- * was not actually an extra try block around the part that failed and an
- * error or interrupt had not (yet) been converted to an exception when the
- * cleanup autocommand sequence was invoked. This function has to be called
- * with the address of the cleanup_T structure filled by enter_cleanup() as an
- * argument; it restores the error/interrupt/exception state saved by that
- * function - except there was an aborting error, an interrupt or an uncaught
- * exception during execution of the cleanup autocommands. In the latter
- * case, the saved error/interrupt/ exception state is discarded.
+ * See comment above enter_cleanup() for how this function is used.
+ *
+ * This function is a bit like ex_endtry() except that there was not actually
+ * an extra try block around the part that failed and an error or interrupt
+ * had not (yet) been converted to an exception when the cleanup autocommand
+ * sequence was invoked.
+ *
+ * This function has to be called with the address of the cleanup_T structure
+ * filled by enter_cleanup() as an argument; it restores the error/interrupt/
+ * exception state saved by that function - except there was an aborting
+ * error, an interrupt or an uncaught exception during execution of the
+ * cleanup autocommands. In the latter case, the saved error/interrupt/
+ * exception state is discarded.
*/
void
leave_cleanup(csp)
@@ -1959,7 +1968,7 @@ leave_cleanup(csp)
/* Report if required by the 'verbose' option or when debugging. */
report_resume_pending(pending,
- (pending & CSTP_THROW) ? (void *)current_exception : NULL);
+ (pending & CSTP_THROW) ? (void *)current_exception : NULL);
}
}
diff --git a/src/fileio.c b/src/fileio.c
index 029a33938..c37c96a1d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3985,8 +3985,9 @@ restore_backup:
* journalled. Syncing the file slows down the system, but assures it has
* been written to disk and we don't lose it.
* For a device do try the fsync() but don't complain if it does not work
- * (could be a pipe). */
- if (fsync(fd) != 0 && !device)
+ * (could be a pipe).
+ * If the 'fsync' option is FALSE, don't fsync(). Useful for laptops. */
+ if (p_fs && fsync(fd) != 0 && !device)
{
errmsg = (char_u *)_("E667: Fsync failed");
end = 0;
diff --git a/src/fold.c b/src/fold.c
index 1aee87ce2..bb268fb25 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -902,6 +902,8 @@ foldMoveTo(updown, dir, count)
int level;
int last;
+ checkupdate(curwin);
+
/* Repeat "count" times. */
for (n = 0; n < count; ++n)
{
@@ -2883,7 +2885,7 @@ foldRemove(gap, top, bot)
{
/* Found an entry below top. */
fold_changed = TRUE;
- if (fp->fd_top + fp->fd_len > bot)
+ if (fp->fd_top + fp->fd_len - 1 > bot)
{
/* 5: Make fold that includes bot start below bot. */
foldMarkAdjustRecurse(&fp->fd_nested,
diff --git a/src/getchar.c b/src/getchar.c
index f05054091..dd52ac4e9 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1514,6 +1514,17 @@ vgetc()
continue;
}
#endif
+#ifdef HAVE_GTK2
+ /* GTK: <F10> normally selects the menu, but it's passed until
+ * here to allow mapping it. Intercept and invoke the GTK
+ * behavior if it's not mapped. */
+ if (c == K_F10 && gui.menubar != NULL)
+ {
+ gtk_menu_shell_select_first(GTK_MENU_SHELL(gui.menubar), FALSE);
+ continue;
+ }
+#endif
+
#ifdef FEAT_GUI
/* Translate K_CSI to CSI. The special key is only used to avoid
* it being recognized as the start of a special key. */
@@ -1540,7 +1551,14 @@ vgetc()
case K_KDIVIDE: c = '/'; break;
case K_KMULTIPLY: c = '*'; break;
case K_KENTER: c = CAR; break;
- case K_KPOINT: c = '.'; break;
+ case K_KPOINT:
+#ifdef WIN32
+ /* Can be either '.' or a ',', *
+ * depending on the type of keypad. */
+ c = MapVirtualKey(VK_DECIMAL, 2); break;
+#else
+ c = '.'; break;
+#endif
case K_K0: c = '0'; break;
case K_K1: c = '1'; break;
case K_K2: c = '2'; break;
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 6d6d55d09..b67b6f2d2 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -3080,6 +3080,17 @@ gui_mch_init(void)
gui.menubar = gtk_menu_bar_new();
gtk_widget_set_name(gui.menubar, "vim-menubar");
+# ifdef HAVE_GTK2
+ /* Avoid that GTK takes <F10> away from us. */
+ {
+ GtkSettings *gtk_settings;
+
+ gtk_settings = gtk_settings_get_for_screen(gdk_screen_get_default());
+ g_object_set(gtk_settings, "gtk-menu-bar-accel", NULL, NULL);
+ }
+# endif
+
+
# ifdef FEAT_GUI_GNOME
if (using_gnome)
{
diff --git a/src/gui_mac.c b/src/gui_mac.c
index f60567e57..7ad96fc29 100644
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -3792,6 +3792,27 @@ gui_mch_draw_string(row, col, s, len, flags)
(void)SwapQDTextFlags(qd_flags);
}
+ /*
+ * When antialiasing we're using srcOr mode, we have to clear the block
+ * before drawing the text.
+ * Also needed when 'linespace' is non-zero to remove the cursor and
+ * underlining.
+ * But not when drawing transparently.
+ * The following is like calling gui_mch_clear_block(row, col, row, col +
+ * len - 1), but without setting the bg color to gui.back_pixel.
+ */
+ if (((sys_version >= 0x1020 && p_antialias) || p_linespace != 0)
+ && !(flags & DRAW_TRANSP))
+ {
+ Rect rc;
+
+ rc.left = FILL_X(col);
+ rc.top = FILL_Y(row);
+ rc.right = FILL_X(col + len) + (col + len == Columns);
+ rc.bottom = FILL_Y(row + 1);
+ EraseRect(&rc);
+ }
+
if (sys_version >= 0x1020 && p_antialias)
{
StyleParameter face;
@@ -3806,22 +3827,6 @@ gui_mch_draw_string(row, col, s, len, flags)
/* Quartz antialiasing works only in srcOr transfer mode. */
TextMode(srcOr);
- if (!(flags & DRAW_TRANSP))
- {
- /*
- * Since we're using srcOr mode, we have to clear the block
- * before drawing the text. The following is like calling
- * gui_mch_clear_block(row, col, row, col + len - 1),
- * but without setting the bg color to gui.back_pixel.
- */
- Rect rc;
- rc.left = FILL_X(col);
- rc.top = FILL_Y(row);
- rc.right = FILL_X(col + len) + (col + len == Columns);
- rc.bottom = FILL_Y(row + 1);
- EraseRect(&rc);
- }
-
MoveTo(TEXT_X(col), TEXT_Y(row));
DrawText((char*)s, 0, len);
}
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 0afa12de2..461dcefc5 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -789,8 +789,7 @@ _WndProc(
break;
}
#ifdef MSWIN_FIND_REPLACE
- else
- if (uMsg == s_findrep_msg && s_findrep_msg != 0)
+ else if (uMsg == s_findrep_msg && s_findrep_msg != 0)
{
_OnFindRepl();
}
@@ -1411,20 +1410,6 @@ gui_mch_set_bg_color(guicolor_T color)
#include <imm.h>
/*
- * display composition string(korean)
- */
- static void
-DisplayCompStringOpaque(char_u *s, int len)
-{
- int OldBkMode = GetBkMode(s_hdc);
-
- SetBkMode(s_hdc, OPAQUE);
- gui_outstr_nowrap(s, len, GUI_MON_TRS_CURSOR,
- (guicolor_T)0, (guicolor_T)0, 0);
- SetBkMode(s_hdc, OldBkMode);
-}
-
-/*
* handle WM_IME_NOTIFY message
*/
static LRESULT
diff --git a/src/gui_w48.c b/src/gui_w48.c
index 4f0bab700..516d070eb 100644
--- a/src/gui_w48.c
+++ b/src/gui_w48.c
@@ -488,27 +488,49 @@ char_to_string(int ch, char_u *string, int slen)
WCHAR wstring[2];
char_u *ws = NULL;;
- /* "ch" is a UTF-16 character. Convert it to a string of bytes. When
- * "enc_codepage" is non-zero use the standard Win32 function, otherwise
- * use our own conversion function (e.g., for UTF-8). */
- wstring[0] = ch;
- if (enc_codepage > 0)
- len = WideCharToMultiByte(enc_codepage, 0, wstring, 1, string, slen,
- 0, NULL);
+ if (os_version.dwPlatformId != VER_PLATFORM_WIN32_NT)
+ {
+ /* On Windows 95/98 we apparently get the character in the active
+ * codepage, not in UCS-2. If conversion is needed convert it to
+ * UCS-2 first. */
+ if ((int)GetACP() == enc_codepage)
+ len = 0; /* no conversion required */
+ else
+ {
+ string[0] = ch;
+ len = MultiByteToWideChar(GetACP(), 0, string, 1, wstring, 2);
+ }
+ }
else
{
+ wstring[0] = ch;
len = 1;
- ws = ucs2_to_enc(wstring, &len);
- if (ws == NULL)
- len = 0;
+ }
+
+ if (len > 0)
+ {
+ /* "ch" is a UTF-16 character. Convert it to a string of bytes. When
+ * "enc_codepage" is non-zero use the standard Win32 function,
+ * otherwise use our own conversion function (e.g., for UTF-8). */
+ if (enc_codepage > 0)
+ len = WideCharToMultiByte(enc_codepage, 0, wstring, len,
+ string, slen, 0, NULL);
else
{
- if (len > slen) /* just in case */
- len = slen;
- mch_memmove(string, ws, len);
- vim_free(ws);
+ len = 1;
+ ws = ucs2_to_enc(wstring, &len);
+ if (ws == NULL)
+ len = 0;
+ else
+ {
+ if (len > slen) /* just in case */
+ len = slen;
+ mch_memmove(string, ws, len);
+ vim_free(ws);
+ }
}
}
+
if (len == 0)
#endif
{
@@ -682,9 +704,10 @@ _OnMouseButtonDown(
* Holding down the left and right buttons simulates pushing the middle
* button.
*/
- if (repeated_click &&
- ((button == MOUSE_LEFT && s_button_pending == MOUSE_RIGHT) ||
- (button == MOUSE_RIGHT && s_button_pending == MOUSE_LEFT)))
+ if (repeated_click
+ && ((button == MOUSE_LEFT && s_button_pending == MOUSE_RIGHT)
+ || (button == MOUSE_RIGHT
+ && s_button_pending == MOUSE_LEFT)))
{
/*
* Hmm, gui.c will ignore more than one button down at a time, so
@@ -745,7 +768,7 @@ _OnMouseMoveOrRelease(
{
/* Delayed action for mouse down event */
_OnMouseEvent(s_button_pending, s_x_pending,
- s_y_pending, FALSE, s_kFlags_pending);
+ s_y_pending, FALSE, s_kFlags_pending);
s_button_pending = -1;
}
if (s_uMsg == WM_MOUSEMOVE)
@@ -1532,6 +1555,9 @@ process_message(void)
int i;
int modifiers = 0;
int key;
+#ifdef FEAT_MENU
+ static char_u k10[] = {K_SPECIAL, 'k', ';', 0};
+#endif
GetMessage(&msg, NULL, 0, 0);
@@ -1619,11 +1645,11 @@ process_message(void)
&& (vk != VK_SPACE || !(GetKeyState(VK_MENU) & 0x8000)))
{
#ifdef FEAT_MENU
- /* Check for <F10>: Windows selects the menu. Ignore it when
- * 'winaltkeys' is "yes" or "menu" */
+ /* Check for <F10>: Windows selects the menu. When <F10> is
+ * mapped we want to use the mapping instead. */
if (vk == VK_F10
&& gui.menu_is_active
- && (*p_wak == 'y' || *p_wak == 'm'))
+ && check_map(k10, State, FALSE) == NULL)
break;
#endif
if (GetKeyState(VK_SHIFT) & 0x8000)
@@ -1734,9 +1760,10 @@ process_message(void)
#endif
#ifdef FEAT_MENU
- /* Check for <F10>: Windows selects the menu. Don't let Windows handle it
- * when 'winaltkeys' is "no" */
- if (vk != VK_F10 || *p_wak != 'n')
+ /* Check for <F10>: Default effect is to select the menu. When <F10> is
+ * mapped we need to stop it here to avoid strange effects (e.g., for the
+ * key-up event) */
+ if (vk != VK_F10 || check_map(k10, State, FALSE) == NULL)
#endif
DispatchMessage(&msg);
}
@@ -1829,6 +1856,11 @@ gui_mch_wait_for_chars(int wtime)
s_wait_timer = 0;
}
allow_scrollbar = FALSE;
+
+ /* Clear pending mouse button, the release event may have been
+ * taken by the dialog window. */
+ s_button_pending = -1;
+
return OK;
}
}
diff --git a/src/if_cscope.c b/src/if_cscope.c
index 012e86c76..f218ea421 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -1092,7 +1092,7 @@ cs_find_common(opt, pat, forceit, verbose)
return FALSE;
}
}
- if (qfpos != NULL && *qfpos != '0' && totmatches > 1)
+ if (qfpos != NULL && *qfpos != '0' && totmatches > 0)
{
/* fill error list */
FILE *f;
diff --git a/src/if_python.c b/src/if_python.c
index 8f4fdfd19..511378a0d 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -381,13 +381,14 @@ typedef PyObject PyThreadState;
#endif /* Python 1.4 */
#ifndef PY_CAN_RECURSE
-static PyThreadState* saved_python_thread = NULL;
+static PyThreadState *saved_python_thread = NULL;
/*
* Suspend a thread of the Python interpreter, other threads are allowed to
* run.
*/
-static void Python_SaveThread(void)
+ static void
+Python_SaveThread(void)
{
saved_python_thread = PyEval_SaveThread();
}
@@ -396,7 +397,8 @@ static void Python_SaveThread(void)
* Restore a thread of the Python interpreter, waits for other threads to
* block.
*/
-static void Python_RestoreThread(void)
+ static void
+Python_RestoreThread(void)
{
PyEval_RestoreThread(saved_python_thread);
saved_python_thread = NULL;
@@ -456,8 +458,10 @@ Python_Init(void)
if (PythonMod_Init())
goto fail;
-#ifndef PY_CAN_RECURSE
- /* the first python thread is vim's */
+ /* the first python thread is vim's, release the lock */
+#ifdef PY_CAN_RECURSE
+ PyEval_SaveThread();
+#else
Python_SaveThread();
#endif
diff --git a/src/keymap.h b/src/keymap.h
index 24b0d61d8..cb79ad1e1 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -383,7 +383,7 @@ enum key_extra
#define K_KDIVIDE TERMCAP2KEY('K', '8') /* keypad / */
#define K_KMULTIPLY TERMCAP2KEY('K', '9') /* keypad * */
#define K_KENTER TERMCAP2KEY('K', 'A') /* keypad Enter */
-#define K_KPOINT TERMCAP2KEY('K', 'B') /* keypad . */
+#define K_KPOINT TERMCAP2KEY('K', 'B') /* keypad . or ,*/
#define K_K0 TERMCAP2KEY('K', 'C') /* keypad 0 */
#define K_K1 TERMCAP2KEY('K', 'D') /* keypad 1 */
diff --git a/src/main.c b/src/main.c
index 3976a4433..5791bb640 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2228,6 +2228,12 @@ main_loop(cmdwin)
getout_preserve_modified(exitval)
int exitval;
{
+#if defined(UNIX)
+ /* Ignore SIGHUP, because a dropped connection may make Vim exit and then
+ * get a SIGHUP while exiting, which causes various reentrent problems. */
+ signal(SIGHUP, SIG_IGN);
+#endif
+
ml_close_notmod(); /* close all not-modified buffers */
ml_sync_all(FALSE, FALSE); /* preserve all swap files */
ml_close_all(FALSE); /* close all memfiles, without deleting */
diff --git a/src/menu.c b/src/menu.c
index 258b84da9..a64745bcc 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -2107,8 +2107,9 @@ ex_emenu(eap)
return;
}
- /* Found the menu, so execute. */
- if (restart_edit)
+ /* Found the menu, so execute.
+ * Use the Insert mode entry when returning to Insert mode. */
+ if (restart_edit && !current_SID)
{
mode = (char_u *)"Insert";
idx = MENU_INDEX_INSERT;
@@ -2123,8 +2124,7 @@ ex_emenu(eap)
/* GEDDES: This is not perfect - but it is a
* quick way of detecting whether we are doing this from a
* selection - see if the range matches up with the visual
- * select start and end.
- */
+ * select start and end. */
if ((curbuf->b_visual_start.lnum == eap->line1)
&& (curbuf->b_visual_end.lnum) == eap->line2)
{
@@ -2144,8 +2144,7 @@ ex_emenu(eap)
tpos.col = MAXCOL;
}
- /* Activate visual mode
- */
+ /* Activate visual mode */
VIsual_active = TRUE;
VIsual_reselect = TRUE;
check_cursor();
@@ -2155,8 +2154,7 @@ ex_emenu(eap)
check_cursor();
/* Adjust the cursor to make sure it is in the correct pos
- * for exclusive mode
- */
+ * for exclusive mode */
if (*p_sel == 'e' && gchar_cursor() != NUL)
++curwin->w_cursor.col;
}
@@ -2168,7 +2166,13 @@ ex_emenu(eap)
if (idx != MENU_INDEX_INVALID && menu->strings[idx] != NULL)
{
- ins_typebuf(menu->strings[idx], menu->noremap[idx], 0,
+ /* When executing a script or function execute the commands right now.
+ * Otherwise put them in the typeahead buffer. */
+ if (current_SID != 0)
+ exec_normal_cmd(menu->strings[idx], menu->noremap[idx],
+ menu->silent[idx]);
+ else
+ ins_typebuf(menu->strings[idx], menu->noremap[idx], 0,
TRUE, menu->silent[idx]);
}
else
diff --git a/src/message.c b/src/message.c
index d678bf3b9..caf7ac0a4 100644
--- a/src/message.c
+++ b/src/message.c
@@ -487,7 +487,7 @@ msg_source(attr)
}
/* remember the last sourcing name printed, also when it's empty */
- if (sourcing_name == NULL || other_sourcing_name)
+ if (sourcing_name == NULL || other_sourcing_name())
{
vim_free(last_sourcing_name);
if (sourcing_name == NULL)
diff --git a/src/misc1.c b/src/misc1.c
index ec744861e..4dc5a4179 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -7653,6 +7653,12 @@ get_lisp_indent()
void
prepare_to_exit()
{
+#if defined(UNIX)
+ /* Ignore SIGHUP, because a dropped connection may make Vim exit and then
+ * get a SIGHUP while exiting, which causes various reentrent problems. */
+ signal(SIGHUP, SIG_IGN);
+#endif
+
#ifdef FEAT_GUI
if (gui.in_use)
{
diff --git a/src/move.c b/src/move.c
index 0c37aa0d2..d1eb0257c 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1551,7 +1551,12 @@ scrollup_clamp()
--curwin->w_topfill;
else
#endif
+ {
+#ifdef FEAT_FOLDING
+ (void)hasFolding(curwin->w_topline, NULL, &curwin->w_topline);
+#endif
++curwin->w_topline;
+ }
++curwin->w_botline; /* approximate w_botline */
curwin->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE);
}
diff --git a/src/netbeans.c b/src/netbeans.c
index 50ea1886c..b51ddfbd3 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -2380,7 +2380,7 @@ special_keys(char_u *args)
if ((sep = strchr(tok, '-')) != NULL)
{
- *sep = NULL;
+ *sep = NUL;
while (*tok)
{
switch (*tok)
diff --git a/src/normal.c b/src/normal.c
index b252e2e48..83759b72c 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -1127,6 +1127,11 @@ getcount:
#endif
}
+ /* get the length of mapped chars again after typing a count, second
+ * character or "z333<cr>". */
+ if (old_mapped_len > 0)
+ old_mapped_len = typebuf_maplen();
+
/*
* If an operation is pending, handle it...
*/
diff --git a/src/ops.c b/src/ops.c
index 29afc56c9..2980f9301 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -2886,6 +2886,15 @@ op_yank(oap, deleting, mess)
*/
curbuf->b_op_start = oap->start;
curbuf->b_op_end = oap->end;
+ if (yanktype == MLINE
+#ifdef FEAT_VISUAL
+ && !oap->block_mode
+#endif
+ )
+ {
+ curbuf->b_op_start.col = 0;
+ curbuf->b_op_end.col = MAXCOL;
+ }
#ifdef FEAT_CLIPBOARD
/*
diff --git a/src/option.c b/src/option.c
index 6c62196ea..d3e47ebaa 100644
--- a/src/option.c
+++ b/src/option.c
@@ -302,6 +302,7 @@ struct vimoption
#define P_SECURE 0x40000L/* cannot change in modeline or secure mode */
#define P_GETTEXT 0x80000L/* expand default value with _() */
#define P_NOGLOB 0x100000L/* do not use local value for global vimrc */
+#define P_NFNAME 0x200000L/* only normal file name chars allowed */
/*
* options[] is initialized here.
@@ -422,7 +423,7 @@ static struct vimoption
{"backupdir", "bdir", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP|P_SECURE,
(char_u *)&p_bdir, PV_NONE,
{(char_u *)DFLT_BDIR, (char_u *)0L}},
- {"backupext", "bex", P_STRING|P_VI_DEF,
+ {"backupext", "bex", P_STRING|P_VI_DEF|P_NFNAME,
(char_u *)&p_bex, PV_NONE,
{
#ifdef VMS
@@ -864,7 +865,7 @@ static struct vimoption
{"fileformats", "ffs", P_STRING|P_VIM|P_COMMA|P_NODUP,
(char_u *)&p_ffs, PV_NONE,
{(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM}},
- {"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
+ {"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
#ifdef FEAT_AUTOCMD
(char_u *)&p_ft, PV_FT,
{(char_u *)"", (char_u *)0L}
@@ -953,6 +954,15 @@ static struct vimoption
{"formatprg", "fp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
(char_u *)&p_fp, PV_NONE,
{(char_u *)"", (char_u *)0L}},
+ {"fsync", "fs", P_BOOL|P_SECURE|P_VI_DEF,
+#ifdef HAVE_FSYNC
+ (char_u *)&p_fs, PV_NONE,
+ {(char_u *)TRUE, (char_u *)0L}
+#else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)FALSE, (char_u *)0L}
+#endif
+ },
{"gdefault", "gd", P_BOOL|P_VI_DEF|P_VIM,
(char_u *)&p_gd, PV_NONE,
{(char_u *)FALSE, (char_u *)0L}},
@@ -1278,7 +1288,8 @@ static struct vimoption
{"isprint", "isp", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
(char_u *)&p_isp, PV_NONE,
{
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2) || defined(MACOS) \
+#if defined(MSDOS) || defined(MSWIN) || defined(OS2) \
+ || (defined(MACOS) && !defined(MACOS_X)) \
|| defined(VMS)
(char_u *)"@,~-255",
#else
@@ -1302,7 +1313,7 @@ static struct vimoption
{(char_u *)0L, (char_u *)0L}
#endif
},
- {"keymap", "kmp", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT,
+ {"keymap", "kmp", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT|P_NFNAME,
#ifdef FEAT_KEYMAP
(char_u *)&p_keymap, PV_KMAP,
{(char_u *)"", (char_u *)0L}
@@ -1348,7 +1359,7 @@ static struct vimoption
{(char_u *)NULL,
#endif
(char_u *)0L}},
- {"langmenu", "lm", P_STRING|P_VI_DEF,
+ {"langmenu", "lm", P_STRING|P_VI_DEF|P_NFNAME,
#if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG)
(char_u *)&p_lm, PV_NONE,
#else
@@ -1594,7 +1605,7 @@ static struct vimoption
{(char_u *)0L, (char_u *)0L}
#endif
},
- {"patchmode", "pm", P_STRING|P_VI_DEF,
+ {"patchmode", "pm", P_STRING|P_VI_DEF|P_NFNAME,
(char_u *)&p_pm, PV_NONE,
{(char_u *)"", (char_u *)0L}},
{"path", "pa", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
@@ -1627,7 +1638,7 @@ static struct vimoption
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)FALSE, (char_u *)0L}},
- {"printdevice", "pdev", P_STRING|P_VI_DEF,
+ {"printdevice", "pdev", P_STRING|P_VI_DEF|P_SECURE,
#ifdef FEAT_PRINTER
(char_u *)&p_pdev, PV_NONE,
{(char_u *)"", (char_u *)0L}
@@ -2040,7 +2051,7 @@ static struct vimoption
{"switchbuf", "swb", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
(char_u *)&p_swb, PV_NONE,
{(char_u *)"", (char_u *)0L}},
- {"syntax", "syn", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
+ {"syntax", "syn", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
#ifdef FEAT_SYN_HL
(char_u *)&p_syn, PV_SYN,
{(char_u *)"", (char_u *)0L}
@@ -2145,7 +2156,7 @@ static struct vimoption
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)85L, (char_u *)0L}},
- {"titleold", NULL, P_STRING|P_VI_DEF|P_GETTEXT,
+ {"titleold", NULL, P_STRING|P_VI_DEF|P_GETTEXT|P_SECURE,
#ifdef FEAT_TITLE
(char_u *)&p_titleold, PV_NONE,
{(char_u *)N_("Thanks for flying Vim"),
@@ -2380,7 +2391,7 @@ static struct vimoption
{(char_u *)0L, (char_u *)0L}},
/* terminal output codes */
-#define p_term(sss, vvv) {sss, NULL, P_STRING|P_VI_DEF|P_RALL, \
+#define p_term(sss, vvv) {sss, NULL, P_STRING|P_VI_DEF|P_RALL|P_SECURE, \
(char_u *)&vvv, PV_NONE, \
{(char_u *)"", (char_u *)0L}},
@@ -2435,6 +2446,8 @@ static struct vimoption
p_term("t_vs", T_VS)
p_term("t_WP", T_CWP)
p_term("t_WS", T_CWS)
+ p_term("t_SI", T_CSI)
+ p_term("t_EI", T_CEI)
p_term("t_xs", T_XS)
p_term("t_ZH", T_CZH)
p_term("t_ZR", T_CZR)
@@ -3388,7 +3401,8 @@ do_set(arg, opt_flags)
errmsg = NULL;
startarg = arg; /* remember for error message */
- if (STRNCMP(arg, "all", 3) == 0 && !isalpha(arg[3]))
+ if (STRNCMP(arg, "all", 3) == 0 && !isalpha(arg[3])
+ && !(opt_flags & OPT_MODELINE))
{
/*
* ":set all" show all options.
@@ -3404,7 +3418,7 @@ do_set(arg, opt_flags)
else
showoptions(1, opt_flags);
}
- else if (STRNCMP(arg, "termcap", 7) == 0)
+ else if (STRNCMP(arg, "termcap", 7) == 0 && !(opt_flags & OPT_MODELINE))
{
showoptions(2, opt_flags);
show_termcodes();
@@ -4704,6 +4718,15 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
errmsg = e_secure;
}
+ /* Check for a "normal" file name in some options. Disallow a path
+ * separator (slash and/or backslash), wildcards and characters that are
+ * often illegal in a file name. */
+ else if ((options[opt_idx].flags & P_NFNAME)
+ && vim_strpbrk(*varp, "/\\*?[|<>") != NULL)
+ {
+ errmsg = e_invarg;
+ }
+
/* 'term' */
else if (varp == &T_NAME)
{
diff --git a/src/option.h b/src/option.h
index acb23de34..566a56117 100644
--- a/src/option.h
+++ b/src/option.h
@@ -19,26 +19,30 @@
# endif
#endif
-/* default values for p_efm 'errorformat' */
+/*
+ * Default values for 'errorformat'.
+ * The "%f|%l| %m" one is used for when the contents of the quickfix window is
+ * written to a file.
+ */
#ifdef AMIGA
-# define DFLT_EFM "%f>%l:%c:%t:%n:%m,%f:%l: %t%*\\D%n: %m,%f %l %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f:%l:%m"
+# define DFLT_EFM "%f>%l:%c:%t:%n:%m,%f:%l: %t%*\\D%n: %m,%f %l %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f:%l:%m,%f|%l| %m"
#else
# if defined(MSDOS) || defined(WIN3264)
-# define DFLT_EFM "%f(%l) : %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f(%l) : %m,%*[^ ] %f %l: %m,%f:%l:%m"
+# define DFLT_EFM "%f(%l) : %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f(%l) : %m,%*[^ ] %f %l: %m,%f:%l:%m,%f|%l| %m"
# else
# if defined(__EMX__) /* put most common here (i.e. gcc format) at front */
-# define DFLT_EFM "%f:%l:%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f(%l:%c) : %m"
+# define DFLT_EFM "%f:%l:%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f(%l:%c) : %m,%f|%l| %m"
# else
# if defined(__QNX__)
-# define DFLT_EFM "%f(%l):%*[^WE]%t%*\\D%n:%m"
+# define DFLT_EFM "%f(%l):%*[^WE]%t%*\\D%n:%m,%f|%l| %m"
# else
# ifdef VMS
-# define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f"
+# define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m"
# else /* Unix, probably */
# ifdef EBCDIC
-#define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f"
+#define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m"
# else
-#define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f"
+#define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m"
# endif
# endif
# endif
@@ -445,6 +449,7 @@ static char *(p_fdo_values[]) = {"all", "block", "hor", "mark", "percent",
# define FDO_JUMP 0x400
#endif
EXTERN char_u *p_fp; /* 'formatprg' */
+EXTERN int p_fs; /* 'fsync' */
EXTERN int p_gd; /* 'gdefault' */
#ifdef FEAT_PRINTER
EXTERN char_u *p_pdev; /* 'printdevice' */
diff --git a/src/os_msdos.c b/src/os_msdos.c
index 92b14ea30..1056fe0e5 100644
--- a/src/os_msdos.c
+++ b/src/os_msdos.c
@@ -505,14 +505,14 @@ mch_restore_cursor_shape(int restore)
if (restore)
{
if (saved)
- regs.h.ah = 0x01; /*Set Cursor*/
+ regs.h.ah = 0x01; /* Set Cursor */
else
return;
}
else
{
- regs.h.ah = 0x03; /*Get Cursor*/
- regs.h.bh = 0x00; /*Page */
+ regs.h.ah = 0x03; /* Get Cursor */
+ regs.h.bh = 0x00; /* Page */
saved = TRUE;
}
@@ -528,9 +528,9 @@ mch_set_cursor_shape(int thickness)
{
union REGS regs;
- regs.h.ch = 7 - thickness; /*Starting Line*/
- regs.h.cl = 7; /*Ending Line*/
- regs.h.ah = 0x01; /*Set Cursor*/
+ regs.h.ch = 7 - thickness; /* Starting Line */
+ regs.h.cl = 7; /* Ending Line */
+ regs.h.ah = 0x01; /* Set Cursor */
(void)int86(0x10, &regs, &regs);
}
diff --git a/src/os_unix.c b/src/os_unix.c
index 08e9fc8d2..373dce1c0 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -903,6 +903,13 @@ deathtrap SIGDEFARG(sigarg)
}
#endif
+#ifdef SIGHASARG
+ /* When SIGHUP is blocked: postpone its effect and return here. This
+ * avoids that a non-reentrant function is interrupted, e.g., free(). */
+ if (entered == 0 && sigarg == SIGHUP && !handle_sighup(SIGHUP_RCV))
+ SIGRETURN;
+#endif
+
/* Remember how often we have been called. */
++entered;
@@ -1174,6 +1181,39 @@ catch_signals(func_deadly, func_other)
}
/*
+ * Handling of SIGHUP:
+ * "when" == SIGHUP_RCV: when busy, postpone, otherwise return TRUE
+ * "when" == SIGHUP_BLOCK: Going to be busy, block SIGHUP
+ * "when" == SIGHUP_UNBLOCK: Going wait, unblock SIGHUP
+ * Returns TRUE when Vim should exit.
+ */
+ int
+handle_sighup(when)
+ int when;
+{
+ static int got_sighup = FALSE;
+ static int blocked = FALSE;
+
+ switch (when)
+ {
+ case SIGHUP_RCV: if (!blocked)
+ return TRUE; /* exit! */
+ got_sighup = TRUE;
+ got_int = TRUE; /* break any loops */
+ break;
+
+ case SIGHUP_BLOCK: blocked = TRUE;
+ break;
+
+ case SIGHUP_UNBLOCK: blocked = FALSE;
+ if (got_sighup)
+ kill(getpid(), SIGHUP);
+ break;
+ }
+ return FALSE;
+}
+
+/*
* Check_win checks whether we have an interactive stdout.
*/
/* ARGSUSED */
diff --git a/src/os_win32.c b/src/os_win32.c
index fce48f9fc..23a31f36e 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -228,15 +228,18 @@ get_exe_name(void)
# define GETTEXT_DLL "libintl.dll"
# endif
/* Dummy funcitons */
-static char* null_libintl_gettext(const char *);
-static char* null_libintl_textdomain(const char *);
-static char* null_libintl_bindtextdomain(const char *, const char *);
+static char *null_libintl_gettext(const char *);
+static char *null_libintl_textdomain(const char *);
+static char *null_libintl_bindtextdomain(const char *, const char *);
+static char *null_libintl_bind_textdomain_codeset(const char *, const char *);
static HINSTANCE hLibintlDLL = 0;
-char* (*dyn_libintl_gettext)(const char *) = null_libintl_gettext;
-char* (*dyn_libintl_textdomain)(const char *) = null_libintl_textdomain;
-char* (*dyn_libintl_bindtextdomain)(const char *, const char *)
+char *(*dyn_libintl_gettext)(const char *) = null_libintl_gettext;
+char *(*dyn_libintl_textdomain)(const char *) = null_libintl_textdomain;
+char *(*dyn_libintl_bindtextdomain)(const char *, const char *)
= null_libintl_bindtextdomain;
+char *(*dyn_libintl_bind_textdomain_codeset)(const char *, const char *)
+ = null_libintl_bind_textdomain_codeset;
int
dyn_libintl_init(char *libname)
@@ -287,6 +290,15 @@ dyn_libintl_init(char *libname)
return 0;
}
}
+
+ /* The bind_textdomain_codeset() function is optional. */
+ (FARPROC)dyn_libintl_bind_textdomain_codeset =
+ (FARPROC)GetProcAddress(hLibintlDLL,
+ "bind_textdomain_codeset");
+ if (dyn_libintl_bind_textdomain_codeset == NULL)
+ dyn_libintl_bind_textdomain_codeset =
+ null_libintl_bind_textdomain_codeset;
+
return 1;
}
@@ -299,6 +311,7 @@ dyn_libintl_end()
dyn_libintl_gettext = null_libintl_gettext;
dyn_libintl_textdomain = null_libintl_textdomain;
dyn_libintl_bindtextdomain = null_libintl_bindtextdomain;
+ dyn_libintl_bind_textdomain_codeset = null_libintl_bind_textdomain_codeset;
}
static char *
@@ -314,6 +327,13 @@ null_libintl_bindtextdomain(const char *domainname, const char *dirname)
}
static char *
+null_libintl_bind_textdomain_codeset(const char *domainname,
+ const char *codeset)
+{
+ return NULL;
+}
+
+ static char *
null_libintl_textdomain(const char *domainname)
{
return NULL;
diff --git a/src/proto/ex_docmd.pro b/src/proto/ex_docmd.pro
index b3a2d2d16..b6f3b7a7a 100644
--- a/src/proto/ex_docmd.pro
+++ b/src/proto/ex_docmd.pro
@@ -34,6 +34,7 @@ void do_exedit __ARGS((exarg_T *eap, win_T *old_curwin));
void do_sleep __ARGS((long msec));
FILE *open_exfile __ARGS((char_u *fname, int forceit, char *mode));
void update_topline_cursor __ARGS((void));
+void exec_normal_cmd __ARGS((char_u *cmd, int remap, int silent));
char_u *eval_vars __ARGS((char_u *src, int *usedlen, linenr_T *lnump, char_u **errormsg, char_u *srcstart));
char_u *expand_sfile __ARGS((char_u *arg));
int put_eol __ARGS((FILE *fd));
diff --git a/src/proto/os_unix.pro b/src/proto/os_unix.pro
index 9a3908b49..6018c8fce 100644
--- a/src/proto/os_unix.pro
+++ b/src/proto/os_unix.pro
@@ -11,6 +11,7 @@ void mch_didjmp __ARGS((void));
void mch_suspend __ARGS((void));
void mch_init __ARGS((void));
void reset_signals __ARGS((void));
+int handle_sighup __ARGS((int when));
int mch_check_win __ARGS((int argc, char **argv));
int mch_input_isatty __ARGS((void));
int mch_can_restore_title __ARGS((void));
diff --git a/src/proto/term.pro b/src/proto/term.pro
index 16924badc..3215b0e28 100644
--- a/src/proto/term.pro
+++ b/src/proto/term.pro
@@ -40,6 +40,7 @@ int mouse_model_popup __ARGS((void));
void scroll_start __ARGS((void));
void cursor_on __ARGS((void));
void cursor_off __ARGS((void));
+void term_cursor_shape __ARGS((void));
void scroll_region_set __ARGS((win_T *wp, int off));
void scroll_region_reset __ARGS((void));
void clear_termcodes __ARGS((void));
diff --git a/src/screen.c b/src/screen.c
index 68f6da1ae..88b17d4be 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -110,8 +110,8 @@ typedef struct
int attr; /* attributes to be used for a match */
int attr_cur; /* attributes currently active in win_line() */
linenr_T first_lnum; /* first lnum to search for multi-line pat */
- char_u *startp; /* in win_line() points to char where HL starts */
- char_u *endp; /* in win_line() points to char where HL ends */
+ colnr_T startcol; /* in win_line() points to char where HL starts */
+ colnr_T endcol; /* in win_line() points to char where HL ends */
} match_T;
static match_T search_hl; /* used for 'hlsearch' highlight matching */
@@ -944,8 +944,8 @@ win_update(wp)
/* When a change starts above w_topline and the end is below
* w_topline, start redrawing at w_topline.
- * If the end of the change is above w_topline: do like no changes was
- * maded, but redraw the first line to find changes in syntax. */
+ * If the end of the change is above w_topline: do like no change was
+ * made, but redraw the first line to find changes in syntax. */
if (mod_top != 0 && mod_top < wp->w_topline)
{
if (mod_bot > wp->w_topline)
@@ -955,6 +955,11 @@ win_update(wp)
top_end = 1;
#endif
}
+
+ /* When line numbers are displayed need to redraw all lines below
+ * inserted/deleted lines. */
+ if (mod_top != 0 && buf->b_mod_xlines != 0 && wp->w_p_nu)
+ mod_bot = MAXLNUM;
}
/*
@@ -1625,12 +1630,6 @@ win_update(wp)
}
}
}
-
- /* When inserting or deleting lines and 'number' is set:
- * Redraw all lines below the change to update the line
- * numbers. */
- if (buf->b_mod_xlines != 0 && wp->w_p_nu)
- bot_start = 0;
}
#ifdef FEAT_FOLDING
@@ -2642,6 +2641,8 @@ win_line(wp, lnum, startrow, endrow)
fromcol = -10;
tocol = MAXCOL;
}
+ else if (bot->col == MAXCOL)
+ tocol = MAXCOL;
else
{
pos = *bot;
@@ -2852,8 +2853,8 @@ win_line(wp, lnum, startrow, endrow)
shl = &search_hl;
for (;;)
{
- shl->startp = NULL;
- shl->endp = NULL;
+ shl->startcol = MAXCOL;
+ shl->endcol = MAXCOL;
shl->attr_cur = 0;
if (shl->rm.regprog != NULL)
{
@@ -2868,25 +2869,25 @@ win_line(wp, lnum, startrow, endrow)
if (shl->lnum != 0 && shl->lnum <= lnum)
{
if (shl->lnum == lnum)
- shl->startp = line + shl->rm.startpos[0].col;
+ shl->startcol = shl->rm.startpos[0].col;
else
- shl->startp = line;
+ shl->startcol = 0;
if (lnum == shl->lnum + shl->rm.endpos[0].lnum
- shl->rm.startpos[0].lnum)
- shl->endp = line + shl->rm.endpos[0].col;
+ shl->endcol = shl->rm.endpos[0].col;
else
- shl->endp = line + MAXCOL;
+ shl->endcol = MAXCOL;
/* Highlight one character for an empty match. */
- if (shl->startp == shl->endp)
+ if (shl->startcol == shl->endcol)
{
#ifdef FEAT_MBYTE
- if (has_mbyte && *shl->endp != NUL)
- shl->endp += (*mb_ptr2len_check)(shl->endp);
+ if (has_mbyte && line[shl->endcol] != NUL)
+ shl->endcol += (*mb_ptr2len_check)(line + shl->endcol);
else
#endif
- ++shl->endp;
+ ++shl->endcol;
}
- if (shl->startp < ptr) /* match at leftcol */
+ if ((long)shl->startcol < v) /* match at leftcol */
{
shl->attr_cur = shl->attr;
search_attr = shl->attr;
@@ -3150,22 +3151,22 @@ win_line(wp, lnum, startrow, endrow)
* Do this first for search_hl, then for match_hl, so that
* ":match" overrules 'hlsearch'.
*/
+ v = (long)(ptr - line);
shl = &search_hl;
for (;;)
{
while (shl->rm.regprog != NULL)
{
- if (shl->startp != NULL
- && ptr >= shl->startp
- && ptr < shl->endp)
+ if (shl->startcol != MAXCOL
+ && v >= (long)shl->startcol
+ && v < (long)shl->endcol)
{
shl->attr_cur = shl->attr;
}
- else if (ptr == shl->endp)
+ else if (v == (long)shl->endcol)
{
shl->attr_cur = 0;
- v = (long)(ptr - line);
next_search_hl(wp, shl, lnum, (colnr_T)v);
/* Need to get the line again, a multi-line regexp
@@ -3175,23 +3176,23 @@ win_line(wp, lnum, startrow, endrow)
if (shl->lnum == lnum)
{
- shl->startp = line + shl->rm.startpos[0].col;
+ shl->startcol = shl->rm.startpos[0].col;
if (shl->rm.endpos[0].lnum == 0)
- shl->endp = line + shl->rm.endpos[0].col;
+ shl->endcol = shl->rm.endpos[0].col;
else
- shl->endp = line + MAXCOL;
+ shl->endcol = MAXCOL;
- if (shl->startp == shl->endp)
+ if (shl->startcol == shl->endcol)
{
/* highlight empty match, try again after
* it */
#ifdef FEAT_MBYTE
if (has_mbyte)
- shl->endp +=
- (*mb_ptr2len_check)(shl->endp);
+ shl->endcol += (*mb_ptr2len_check)(line
+ + shl->endcol);
else
#endif
- ++shl->endp;
+ ++shl->endcol;
}
/* Loop to check if the match starts at the
@@ -3635,8 +3636,22 @@ win_line(wp, lnum, startrow, endrow)
c = ' ';
}
}
- else if (c == NUL && wp->w_p_list && lcs_eol_one > 0)
+ else if (c == NUL
+ && ((wp->w_p_list && lcs_eol > 0)
+ || ((fromcol >= 0 || fromcol_prev >= 0)
+ && tocol > vcol
+ && VIsual_mode != Ctrl_V
+ && (
+# ifdef FEAT_RIGHTLEFT
+ wp->w_p_rl ? (col >= 0) :
+# endif
+ (col < W_WIDTH(wp)))
+ && !(noinvcur
+ && (colnr_T)vcol == wp->w_virtcol)))
+ && lcs_eol_one >= 0)
{
+ /* Display a '$' after the line or highlight an extra
+ * character if the line break is included. */
#if defined(FEAT_DIFF) || defined(LINE_ATTR)
/* For a diff line the highlighting continues after the
* "$". */
@@ -3667,7 +3682,10 @@ win_line(wp, lnum, startrow, endrow)
c_extra = NUL;
}
}
- c = lcs_eol;
+ if (wp->w_p_list)
+ c = lcs_eol;
+ else
+ c = ' ';
lcs_eol_one = -1;
--ptr; /* put it back at the NUL */
if (area_attr == 0 && search_attr == 0)
@@ -3847,8 +3865,8 @@ win_line(wp, lnum, startrow, endrow)
&& ((area_attr != 0 && vcol == fromcol)
#ifdef FEAT_SEARCH_EXTRA
/* highlight 'hlsearch' match at end of line */
- || ptr - 1 == search_hl.startp
- || ptr - 1 == match_hl.startp
+ || (ptr - line) - 1 == (long)search_hl.startcol
+ || (ptr - line) - 1 == (long)match_hl.startcol
#endif
))
{
@@ -3885,7 +3903,7 @@ win_line(wp, lnum, startrow, endrow)
#ifdef FEAT_SEARCH_EXTRA
if (area_attr == 0)
{
- if (ptr - 1 == match_hl.startp)
+ if ((ptr - line) - 1 == (long)match_hl.startcol)
char_attr = match_hl.attr;
else
char_attr = search_hl.attr;
diff --git a/src/search.c b/src/search.c
index 4513ea110..6a915e170 100644
--- a/src/search.c
+++ b/src/search.c
@@ -4031,7 +4031,7 @@ find_pattern_in_path(ptr, dir, len, whole, skip_comments,
#ifdef RISCOS
/* UnixLib knows best how to munge c file names - turn munging back on. */
- __riscosify_control = __RISCOSIFY_LONG_TRUNCATE;
+ int __riscosify_control = 0;
#endif
if (type != CHECK_PATH && type != FIND_DEFINE
diff --git a/src/syntax.c b/src/syntax.c
index 4956aec44..0c706c82d 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -2339,6 +2339,10 @@ check_state_ends()
cur_si->si_h_endpos = cur_si->si_eoe_pos;
cur_si->si_flags |= HL_MATCH;
update_si_attr(current_state.ga_len - 1);
+
+ /* what matches next may be different now, clear it */
+ next_match_idx = 0;
+ next_match_col = MAXCOL;
break;
}
else
@@ -2439,6 +2443,8 @@ update_si_attr(idx)
{
sip->si_attr = CUR_STATE(idx - 1).si_attr;
sip->si_trans_id = CUR_STATE(idx - 1).si_trans_id;
+ sip->si_h_startpos = CUR_STATE(idx - 1).si_h_startpos;
+ sip->si_h_endpos = CUR_STATE(idx - 1).si_h_endpos;
if (sip->si_cont_list == NULL)
{
sip->si_flags |= HL_TRANS_CONT;
@@ -5620,7 +5626,8 @@ in_id_list(cur_si, list, ssp, contained)
int r;
/* If spp has a "containedin" list and "cur_si" is in it, return TRUE. */
- if (cur_si != NULL && ssp->cont_in_list != NULL)
+ if (cur_si != NULL && ssp->cont_in_list != NULL
+ && !(cur_si->si_flags & HL_MATCH))
{
/* Ignore transparent items without a contains argument. Double check
* that we don't go back past the first one. */
diff --git a/src/tag.c b/src/tag.c
index 1e6d5ac5d..b83eaf452 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -2382,7 +2382,15 @@ get_tagfname(first, buf)
ga_init2(&tag_fnames, (int)sizeof(char_u *), 10);
do_in_runtimepath((char_u *)
#ifdef FEAT_MULTI_LANG
+# ifdef VMS
+ /* Functions decc$to_vms() and decc$translate_vms() crash
+ * on some VMS systems with wildcards "??". Seems ECO
+ * patches do fix the problem in C RTL, but we can't use
+ * an #ifdef for that. */
+ "doc/tags doc/tags-*"
+# else
"doc/tags doc/tags-??"
+# endif
#else
"doc/tags"
#endif
diff --git a/src/term.c b/src/term.c
index 71b19116c..a83f50679 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1643,6 +1643,7 @@ set_termname(term)
{KS_CIS, "IS"}, {KS_CIE, "IE"},
{KS_TS, "ts"}, {KS_FS, "fs"},
{KS_CWP, "WP"}, {KS_CWS, "WS"},
+ {KS_CSI, "SI"}, {KS_CEI, "EI"},
{(enum SpecialKey)0, NULL}
};
@@ -3400,6 +3401,31 @@ cursor_off()
}
/*
+ * Set cursor shape to match Insert mode.
+ */
+ void
+term_cursor_shape()
+{
+ static int showing_insert_mode = MAYBE;
+
+ if (!full_screen || *T_CSI == NUL || *T_CEI == NUL)
+ return;
+
+ if (State & INSERT)
+ {
+ if (showing_insert_mode != TRUE)
+ out_str(T_CSI); /* disable cursor */
+ showing_insert_mode = TRUE;
+ }
+ else
+ {
+ if (showing_insert_mode != FALSE)
+ out_str(T_CEI); /* disable cursor */
+ showing_insert_mode = FALSE;
+ }
+}
+
+/*
* Set scrolling region for window 'wp'.
* The region starts 'off' lines from the start of the window.
* Also set the vertical scroll region for a vertically split window. Always
diff --git a/src/term.h b/src/term.h
index 17b1065ca..c400020b5 100644
--- a/src/term.h
+++ b/src/term.h
@@ -76,6 +76,8 @@ enum SpecialKey
KS_CWP, /* set window position in pixels */
KS_CWS, /* set window size in characters */
KS_CRV, /* request version string */
+ KS_CSI, /* start insert mode (bar cursor) */
+ KS_CEI, /* end insert mode (block cursor) */
#ifdef FEAT_VERTSPLIT
KS_CSV, /* scroll region vertical */
#endif
@@ -148,6 +150,8 @@ extern char_u *(term_strings[]); /* current terminal strings */
#define T_FS (term_str(KS_FS)) /* set window title end */
#define T_CWP (term_str(KS_CWP)) /* window position */
#define T_CWS (term_str(KS_CWS)) /* window size */
+#define T_CSI (term_str(KS_CSI)) /* start insert mode */
+#define T_CEI (term_str(KS_CEI)) /* end insert mode */
#define T_CRV (term_str(KS_CRV)) /* request version string */
#define T_OP (term_str(KS_OP)) /* original color pair */
diff --git a/src/ui.c b/src/ui.c
index 47ff80ec6..3963bd545 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -176,7 +176,13 @@ ui_inchar(buf, maxlen, wtime, tb_change_cnt)
# ifdef FEAT_GUI
else
# endif
+ {
+ if (wtime == -1)
+ handle_sighup(SIGHUP_UNBLOCK); /* allow SIGHUP to kill us */
retval = mch_inchar(buf, maxlen, wtime, tb_change_cnt);
+ if (wtime == -1)
+ handle_sighup(SIGHUP_BLOCK); /* block SIGHUP */
+ }
#endif
ctrl_c_interrupts = TRUE;
@@ -1852,7 +1858,10 @@ ui_cursor_shape()
# ifdef FEAT_GUI
if (gui.in_use)
gui_update_cursor_later();
+ else
# endif
+ term_cursor_shape();
+
# ifdef MCH_CURSOR_SHAPE
mch_update_cursor();
# endif
diff --git a/src/version.h b/src/version.h
index 67b47d570..e8f1078c1 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2004 Oct 4)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2004 Oct 4, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2004 Dec 9)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2004 Dec 9, compiled "
diff --git a/src/vim.h b/src/vim.h
index c68e1a7ce..cd283d23d 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -434,9 +434,10 @@ typedef unsigned short u8char_T;
# define FEAT_GETTEXT
# endif
/* These are in os_win32.c */
-extern char* (*dyn_libintl_gettext)(const char* msgid);
-extern char* (*dyn_libintl_bindtextdomain)(const char* domainname, const char* dirname);
-extern char* (*dyn_libintl_textdomain)(const char* domainname);
+extern char *(*dyn_libintl_gettext)(const char *msgid);
+extern char *(*dyn_libintl_bindtextdomain)(const char *domainname, const char *dirname);
+extern char *(*dyn_libintl_bind_textdomain_codeset)(const char *domainname, const char *codeset);
+extern char *(*dyn_libintl_textdomain)(const char *domainname);
#endif
@@ -448,7 +449,11 @@ extern char* (*dyn_libintl_textdomain)(const char* domainname);
# ifdef DYNAMIC_GETTEXT
# define _(x) (*dyn_libintl_gettext)((char *)(x))
# define N_(x) x
-# define bindtextdomain(domain,dir) (*dyn_libintl_bindtextdomain)(domain,dir)
+# define bindtextdomain(domain, dir) (*dyn_libintl_bindtextdomain)((domain), (dir))
+# define bind_textdomain_codeset(domain, codeset) (*dyn_libintl_bind_textdomain_codeset)((domain), (codeset))
+# if !defined(HAVE_BIND_TEXTDOMAIN_CODESET)
+# define HAVE_BIND_TEXTDOMAIN_CODESET 1
+# endif
# define textdomain(domain) (*dyn_libintl_textdomain)(domain)
# else
# include <libintl.h>
@@ -466,6 +471,10 @@ extern char* (*dyn_libintl_textdomain)(const char* domainname);
# undef bindtextdomain
# endif
# define bindtextdomain(x, y) /* empty */
+# ifdef bind_textdomain_codeset
+# undef bind_textdomain_codeset
+# endif
+# define bind_textdomain_codeset(x, y) /* empty */
# ifdef textdomain
# undef textdomain
# endif
@@ -1834,4 +1843,12 @@ typedef int VimClipboard; /* This is required for the prototypes. */
# include <XSUB.h>
#endif
+/* values for handle_sighup() */
+#define SIGHUP_RCV 1
+#define SIGHUP_BLOCK 2
+#define SIGHUP_UNBLOCK 3
+#ifndef UNIX
+# define handle_sighup(x) /* nothing */
+#endif
+
#endif /* VIM__H */
diff --git a/src/window.c b/src/window.c
index 47da663b5..ad3222a33 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1924,7 +1924,11 @@ win_close(win, free_buf)
curbuf = curwin->w_buffer;
close_curwin = TRUE;
}
- if (p_ea)
+ if (p_ea
+#ifdef FEAT_VERTSPLIT
+ && (*p_ead == 'b' || *p_ead == dir)
+#endif
+ )
win_equal(curwin, TRUE,
#ifdef FEAT_VERTSPLIT
dir