summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-01-08 16:06:37 +0100
committerBram Moolenaar <Bram@vim.org>2011-01-08 16:06:37 +0100
commit2a8a3ecb67de119e39b4a9ffaff3460036db0210 (patch)
treebc76cf48934293007aeff07fcf74188a0a5708cb /runtime
parent13d831ff0c8879bdf59e6de35a106ccb9b4766da (diff)
downloadvim-2a8a3ecb67de119e39b4a9ffaff3460036db0210.zip
Updated runtime files.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/tohtml.vim38
-rw-r--r--runtime/doc/debug.txt6
-rw-r--r--runtime/doc/eval.txt24
-rw-r--r--runtime/doc/gui_w32.txt6
-rw-r--r--runtime/doc/index.txt13
-rw-r--r--runtime/doc/mlang.txt4
-rw-r--r--runtime/doc/motion.txt8
-rw-r--r--runtime/doc/options.txt4
-rw-r--r--runtime/doc/os_win32.txt3
-rw-r--r--runtime/doc/repeat.txt14
-rw-r--r--runtime/doc/syntax.txt20
-rw-r--r--runtime/doc/tagsrch.txt10
-rw-r--r--runtime/doc/todo.txt77
-rw-r--r--runtime/doc/undo.txt17
-rw-r--r--runtime/filetype.vim13
-rw-r--r--runtime/plugin/tohtml.vim23
-rw-r--r--runtime/syntax/2html.vim126
-rw-r--r--runtime/syntax/xquery.vim92
18 files changed, 332 insertions, 166 deletions
diff --git a/runtime/autoload/tohtml.vim b/runtime/autoload/tohtml.vim
index c9dd2f764..ce97ec9fa 100644
--- a/runtime/autoload/tohtml.vim
+++ b/runtime/autoload/tohtml.vim
@@ -1,6 +1,6 @@
" Vim autoload file for the tohtml plugin.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
-" Last Change: 2010 Oct 07
+" Last Change: 2011 Jan 05
"
" Additional contributors:
"
@@ -600,18 +600,18 @@ func! tohtml#GetUserSettings() "{{{
endif
" get current option settings with appropriate defaults {{{
- call tohtml#GetOption(user_settings, 'no_progress', !has("statusline") )
- call tohtml#GetOption(user_settings, 'diff_one_file', 0 )
- call tohtml#GetOption(user_settings, 'number_lines', &number )
- call tohtml#GetOption(user_settings, 'use_css', 1 )
- call tohtml#GetOption(user_settings, 'ignore_conceal', 0 )
- call tohtml#GetOption(user_settings, 'ignore_folding', 0 )
- call tohtml#GetOption(user_settings, 'dynamic_folds', 0 )
- call tohtml#GetOption(user_settings, 'no_foldcolumn', 0 )
- call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
- call tohtml#GetOption(user_settings, 'no_pre', 0 )
- call tohtml#GetOption(user_settings, 'whole_filler', 0 )
- call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
+ call tohtml#GetOption(user_settings, 'no_progress', !has("statusline") )
+ call tohtml#GetOption(user_settings, 'diff_one_file', 0 )
+ call tohtml#GetOption(user_settings, 'number_lines', &number )
+ call tohtml#GetOption(user_settings, 'use_css', 1 )
+ call tohtml#GetOption(user_settings, 'ignore_conceal', 0 )
+ call tohtml#GetOption(user_settings, 'ignore_folding', 0 )
+ call tohtml#GetOption(user_settings, 'dynamic_folds', 0 )
+ call tohtml#GetOption(user_settings, 'no_foldcolumn', 0 )
+ call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
+ call tohtml#GetOption(user_settings, 'no_pre', 0 )
+ call tohtml#GetOption(user_settings, 'whole_filler', 0 )
+ call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
" }}}
" override those settings that need it {{{
@@ -643,6 +643,18 @@ func! tohtml#GetUserSettings() "{{{
let user_settings.no_pre = 1
endif "}}}
+ " set up expand_tabs option after all the overrides so we know the
+ " appropriate defaults {{{
+ if user_settings.no_pre == 0
+ call tohtml#GetOption(user_settings,
+ \ 'expand_tabs',
+ \ &expandtab || &ts != 8 || user_settings.number_lines ||
+ \ (user_settings.dynamic_folds && !user_settings.no_foldcolumn))
+ else
+ let user_settings.expand_tabs = 1
+ endif
+ " }}}
+
if exists("g:html_use_encoding") "{{{
" user specified the desired MIME charset, figure out proper
" 'fileencoding' from it or warn the user if we cannot
diff --git a/runtime/doc/debug.txt b/runtime/doc/debug.txt
index a38b9f67c..12b0bb182 100644
--- a/runtime/doc/debug.txt
+++ b/runtime/doc/debug.txt
@@ -1,4 +1,4 @@
-*debug.txt* For Vim version 7.3. Last change: 2010 Sep 14
+*debug.txt* For Vim version 7.3. Last change: 2010 Dec 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -21,8 +21,8 @@ When Vim crashes in one of the test files, and you are using gcc for
compilation, here is what you can do to find out exactly where Vim crashes.
This also applies when using the MingW tools.
-1. Compile Vim with the "-g" option (there is a line in the Makefile for this,
- which you can uncomment). Also make sure "strip" is disabled (do not
+1. Compile Vim with the "-g" option (there is a line in the src/Makefile for
+ this, which you can uncomment). Also make sure "strip" is disabled (do not
install it, or use the line "STRIP = /bin/true").
2. Execute these commands (replace "11" with the test that fails): >
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 43ff985aa..d1c0b02a5 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -6133,17 +6133,17 @@ cmdline_compl Compiled with |cmdline-completion| support.
cmdline_hist Compiled with |cmdline-history| support.
cmdline_info Compiled with 'showcmd' and 'ruler' support.
comments Compiled with |'comments'| support.
+compatible Compiled to be very Vi compatible.
cryptv Compiled with encryption support |encryption|.
cscope Compiled with |cscope| support.
-compatible Compiled to be very Vi compatible.
debug Compiled with "DEBUG" defined.
dialog_con Compiled with console dialog support.
dialog_gui Compiled with GUI dialog support.
diff Compiled with |vimdiff| and 'diff' support.
digraphs Compiled with support for digraphs.
dnd Compiled with support for the "~ register |quote_~|.
-dos32 32 bits DOS (DJGPP) version of Vim.
dos16 16 bits DOS version of Vim.
+dos32 32 bits DOS (DJGPP) version of Vim.
ebcdic Compiled on a machine with ebcdic character set.
emacs_tags Compiled with support for Emacs tags.
eval Compiled with expression evaluation support. Always
@@ -6166,15 +6166,15 @@ fork Compiled to use fork()/exec() instead of system().
gettext Compiled with message translation |multi-lang|
gui Compiled with GUI enabled.
gui_athena Compiled with Athena GUI.
+gui_gnome Compiled with Gnome support (gui_gtk is also defined).
gui_gtk Compiled with GTK+ GUI (any version).
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
-gui_gnome Compiled with Gnome support (gui_gtk is also defined).
gui_mac Compiled with Macintosh GUI.
gui_motif Compiled with Motif GUI.
gui_photon Compiled with Photon GUI.
+gui_running Vim is running in the GUI, or it will start soon.
gui_win32 Compiled with MS Windows Win32 GUI.
gui_win32s idem, and Win32s system being used (Windows 3.1)
-gui_running Vim is running in the GUI, or it will start soon.
hangul_input Compiled with Hangul input support. |hangul|
iconv Can use iconv() for conversion.
insert_expand Compiled with support for CTRL-X expansion commands in
@@ -6196,20 +6196,20 @@ menu Compiled with support for |:menu|.
mksession Compiled with support for |:mksession|.
modify_fname Compiled with file name modifiers. |filename-modifiers|
mouse Compiled with support mouse.
-mouseshape Compiled with support for 'mouseshape'.
mouse_dec Compiled with support for Dec terminal mouse.
mouse_gpm Compiled with support for gpm (Linux console mouse)
mouse_netterm Compiled with support for netterm mouse.
mouse_pterm Compiled with support for qnx pterm mouse.
mouse_sysmouse Compiled with support for sysmouse (*BSD console mouse)
mouse_xterm Compiled with support for xterm mouse.
+mouseshape Compiled with support for 'mouseshape'.
multi_byte Compiled with support for 'encoding'
multi_byte_encoding 'encoding' is set to a multi-byte encoding.
multi_byte_ime Compiled with support for IME input method.
multi_lang Compiled with support for multiple languages.
mzscheme Compiled with MzScheme interface |mzscheme|.
-netbeans_intg Compiled with support for |netbeans|.
netbeans_enabled Compiled with support for |netbeans| and connected.
+netbeans_intg Compiled with support for |netbeans|.
ole Compiled with OLE automation support for Win32.
os2 OS/2 version of Vim.
osfiletype Compiled with support for osfiletypes |+osfiletype|
@@ -6230,11 +6230,11 @@ showcmd Compiled with 'showcmd' support.
signs Compiled with |:sign| support.
smartindent Compiled with 'smartindent' support.
sniff Compiled with SNiFF interface support.
+spell Compiled with spell checking support |spell|.
startuptime Compiled with |--startuptime| support.
statusline Compiled with support for 'statusline', 'rulerformat'
and special formats of 'titlestring' and 'iconstring'.
sun_workshop Compiled with support for Sun |workshop|.
-spell Compiled with spell checking support |spell|.
syntax Compiled with syntax highlighting support |syntax|.
syntax_items There are active syntax highlighting items for the
current buffer.
@@ -6255,9 +6255,9 @@ title Compiled with window title support |'title'|.
toolbar Compiled with support for |gui-toolbar|.
unix Unix version of Vim.
user_commands User-defined commands.
-viminfo Compiled with viminfo support.
-vim_starting True while initial source'ing takes place. |startup|
vertsplit Compiled with vertically split windows |:vsplit|.
+vim_starting True while initial source'ing takes place. |startup|
+viminfo Compiled with viminfo support.
virtualedit Compiled with 'virtualedit' option.
visual Compiled with Visual mode.
visualextra Compiled with extra Visual mode commands.
@@ -6266,13 +6266,13 @@ vms VMS version of Vim.
vreplace Compiled with |gR| and |gr| commands.
wildignore Compiled with 'wildignore' option.
wildmenu Compiled with 'wildmenu' option.
-windows Compiled with support for more than one window.
-winaltkeys Compiled with 'winaltkeys' option.
win16 Win16 version of Vim (MS-Windows 3.1).
win32 Win32 version of Vim (MS-Windows 95/98/ME/NT/2000/XP).
-win64 Win64 version of Vim (MS-Windows 64 bit).
win32unix Win32 version of Vim, using Unix files (Cygwin)
+win64 Win64 version of Vim (MS-Windows 64 bit).
win95 Win32 version for MS-Windows 95/98/ME.
+winaltkeys Compiled with 'winaltkeys' option.
+windows Compiled with support for more than one window.
writebackup Compiled with 'writebackup' default on.
xfontset Compiled with X fontset support |xfontset|.
xim Compiled with X input method support |xim|.
diff --git a/runtime/doc/gui_w32.txt b/runtime/doc/gui_w32.txt
index d71e90e04..7b60c3b4a 100644
--- a/runtime/doc/gui_w32.txt
+++ b/runtime/doc/gui_w32.txt
@@ -1,4 +1,4 @@
-*gui_w32.txt* For Vim version 7.3. Last change: 2007 Aug 30
+*gui_w32.txt* For Vim version 7.3. Last change: 2010 Dec 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -293,7 +293,9 @@ Normally, Vim waits for a command to complete before continuing (this makes
sense for most shell commands which produce output for Vim to use). If you
want Vim to start a program and return immediately, you can use the following
syntax on W95 & NT: >
- :!start {command}
+ :!start [/min] {command}
+The optional "/min" causes the window to be minimized.
+
On Win32s, you will have to go to another window instead. Don't forget that
you must tell Windows 3.1x to keep executing a DOS command in the background
while you switch back to Vim.
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 1d3f0d53c..bd9f3823e 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1,4 +1,4 @@
-*index.txt* For Vim version 7.3. Last change: 2010 Jul 21
+*index.txt* For Vim version 7.3. Last change: 2011 Jan 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -29,7 +29,7 @@ For a complete listing of all help items see |help-tags|.
==============================================================================
1. Insert mode *insert-index*
-tag char action ~
+tag char action in Insert mode ~
-----------------------------------------------------------------------
|i_CTRL-@| CTRL-@ insert previously inserted text and stop
insert
@@ -459,7 +459,7 @@ tag char note action in Normal mode ~
These can be used after an operator or in Visual mode to select an object.
-tag command action in Normal mode ~
+tag command action in op-pending and Visual mode ~
------------------------------------------------------------------------------
|v_aquote| a" double quoted string
|v_a'| a' single quoted string
@@ -721,6 +721,7 @@ tag char note action in Normal mode ~
|gJ| gJ 2 join lines without inserting space
|gP| ["x]gP 2 put the text [from register x] before the
cursor N times, leave the cursor after it
+|gQ| gQ switch to "Ex" mode with Vim editing
|gR| gR 2 enter Virtual Replace mode
|gU| gU{motion} 2 make Nmove text uppercase
|gV| gV don't reselect the previous Visual area
@@ -951,11 +952,13 @@ Normal characters are inserted at the current cursor position.
"Completion" below refers to context-sensitive completion. It will complete
file names, tags, commands etc. as appropriate.
+tag command action in Command-line editing mode ~
+------------------------------------------------------------------------------
CTRL-@ not used
|c_CTRL-A| CTRL-A do completion on the pattern in front of the
cursor and insert all matches
|c_CTRL-B| CTRL-B cursor to begin of command-line
-|c_CTRL-C| CTRL-C same as <ESC>
+|c_CTRL-C| CTRL-C same as <Esc>
|c_CTRL-D| CTRL-D list completions that match the pattern in
front of the cursor
|c_CTRL-E| CTRL-E cursor to end of command-line
@@ -1046,6 +1049,8 @@ This is a brief but complete listing of all the ":" commands, without
mentioning any arguments. The optional part of the command name is inside [].
The commands are sorted on the non-optional part of their name.
+tag command action ~
+------------------------------------------------------------------------------
|:!| :! filter lines or execute an external command
|:!!| :!! repeat last ":!" command
|:#| :# same as ":number"
diff --git a/runtime/doc/mlang.txt b/runtime/doc/mlang.txt
index c9baec435..c7b3df07c 100644
--- a/runtime/doc/mlang.txt
+++ b/runtime/doc/mlang.txt
@@ -1,4 +1,4 @@
-*mlang.txt* For Vim version 7.3. Last change: 2010 Jul 20
+*mlang.txt* For Vim version 7.3. Last change: 2010 Dec 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -68,7 +68,7 @@ use of "-" and "_".
With the "ctype" argument the language used for
character encoding is set. This affects the libraries
that Vim was linked with. It's unusual to set this to
- a different value from 'encoding'. This sets
+ a different value from 'encoding' or "C". This sets
$LC_CTYPE.
With the "time" argument the language used for time
and date messages is set. This affects strftime().
diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt
index f54b803c4..04d77feff 100644
--- a/runtime/doc/motion.txt
+++ b/runtime/doc/motion.txt
@@ -1033,20 +1033,20 @@ The maximum number of entries is fixed at 100.
For example, after three jump commands you have this jump list:
- jump line col file/line ~
+ jump line col file/text ~
3 1 0 some text ~
2 70 0 another line ~
1 1154 23 end. ~
> ~
-The "file/line" column shows the file name, or the text at the jump if it is
+The "file/text" column shows the file name, or the text at the jump if it is
in the current file (an indent is removed and a long line is truncated to fit
in the window).
You are currently in line 1167. If you then use the CTRL-O command, the
cursor is put in line 1154. This results in:
- jump line col file/line ~
+ jump line col file/text ~
2 1 0 some text ~
1 70 0 another line ~
> 0 1154 23 end. ~
@@ -1076,7 +1076,7 @@ command. You can explicitly add a jump by setting the ' mark.
After the CTRL-O command that got you into line 1154 you could give another
jump command (e.g., "G"). The jump list would then become:
- jump line col file/line ~
+ jump line col file/text ~
4 1 0 some text ~
3 70 0 another line ~
2 1167 0 foo bar ~
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 25f6c97a7..4b5df2d68 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.3. Last change: 2010 Dec 08
+*options.txt* For Vim version 7.3. Last change: 2010 Dec 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2862,7 +2862,7 @@ A jump table for the options with a short description can be found at |Q_op|.
When 'binary' is set, the value of 'fileformats' is not used.
Note that when Vim starts up with an empty buffer this option is not
- use. Set 'fileformat' in your .vimrc instead.
+ used. Set 'fileformat' in your .vimrc instead.
For systems with a Dos-like <EOL> (<CR><NL>), when reading files that
are ":source"ed and for vimrc files, automatic <EOL> detection may be
diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt
index 2a14f1307..9557f2e95 100644
--- a/runtime/doc/os_win32.txt
+++ b/runtime/doc/os_win32.txt
@@ -1,4 +1,4 @@
-*os_win32.txt* For Vim version 7.3. Last change: 2010 Jul 20
+*os_win32.txt* For Vim version 7.3. Last change: 2010 Dec 19
VIM REFERENCE MANUAL by George Reilly
@@ -313,6 +313,7 @@ A. When using :! to run an external command, you can run it with "start": >
with :!start do not get passed Vim's open file handles, which means they do
not have to be closed before Vim.
To avoid this special treatment, use ":! start".
+ The optional "/min" argument causes the window to be minimized.
Q. I'm using Win32s, and when I try to run an external command like "make",
Vim doesn't wait for it to finish! Help!
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt
index 331b6f9bb..eec13c0e2 100644
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -1,4 +1,4 @@
-*repeat.txt* For Vim version 7.3. Last change: 2009 Nov 04
+*repeat.txt* For Vim version 7.3. Last change: 2011 Jan 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -102,7 +102,7 @@ To abort this type CTRL-C twice.
q{0-9a-zA-Z"} Record typed characters into register {0-9a-zA-Z"}
(uppercase to append). The 'q' command is disabled
while executing a register, and it doesn't work inside
- a mapping. {Vi: no recording}
+ a mapping and |:normal|. {Vi: no recording}
q Stops recording. (Implementation note: The 'q' that
stops recording is not stored in the register, unless
@@ -112,9 +112,13 @@ q Stops recording. (Implementation note: The 'q' that
@{0-9a-z".=*} Execute the contents of register {0-9a-z".=*} [count]
times. Note that register '%' (name of the current
file) and '#' (name of the alternate file) cannot be
- used. For "@=" you are prompted to enter an
- expression. The result of the expression is then
- executed. See also |@:|. {Vi: only named registers}
+ used.
+ The register is executed like a mapping, that means
+ that the difference between 'wildchar' and 'wildcharm'
+ applies.
+ For "@=" you are prompted to enter an expression. The
+ result of the expression is then executed.
+ See also |@:|. {Vi: only named registers}
*@@* *E748*
@@ Repeat the previous @{0-9a-z":*} [count] times.
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 40a0f0236..d56cc340d 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -475,6 +475,26 @@ risk of making some things look a bit different, use: >
This will use <br> at the end of each line and use "&nbsp;" for repeated
spaces.
+If you do use the "<pre>" tags, <Tab> characters in the text are included in
+the generated output if they will have no effect on the appearance of the
+text and it looks like they are in the document intentionally. This allows for
+the HTML output to be copied and pasted from a browser without losing the
+actual whitespace used in the document.
+
+Specifically, <Tab> characters will be included if the 'tabstop' option is set
+to the default of 8, 'expandtab' is not set, and if neither the foldcolumn nor
+the line numbers are included in the HTML output (see options above). When any
+of these conditions are not met, any <Tab> characters in the text are expanded
+to the appropriate number of spaces in the HTML output.
+
+When "<pre>" is included, you can force |:TOhtml| to keep the tabs even if the
+other conditions are not met with: >
+ :let g:html_expand_tabs = 0
+Note that this can easily break text alignment and indentation in the HTML.
+
+Force tabs to be expanded even when they would be kept using: >
+ :let g:html_expand_tabs = 1
+
For diff mode on a single file (with g:html_diff_one_file) a sequence of more
than 3 filler lines is displayed as three lines with the middle line
mentioning the total number of inserted lines. If you prefer to see all the
diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt
index 70c6c68a4..5334bb357 100644
--- a/runtime/doc/tagsrch.txt
+++ b/runtime/doc/tagsrch.txt
@@ -115,7 +115,7 @@ CTRL-T Jump to [count] older entry in the tag stack
The output of ":tags" looks like this:
- # TO tag FROM line in file/line
+ # TO tag FROM line in file/text
1 1 main 1 harddisk2:text/vim/test
> 2 2 FuncA 58 i = FuncA(10);
3 1 FuncC 357 harddisk2:text/vim/src/amiga.c
@@ -135,7 +135,7 @@ you were before the tag command. The line number will be correct, also when
deleting/inserting lines, unless this was done by another program (e.g.
another instance of Vim).
-For the current file, the "file/line" column shows the text at the position.
+For the current file, the "file/text" column shows the text at the position.
An indent is removed and a long line is truncated to fit in the window.
You can jump to previously used tags with several commands. Some examples:
@@ -164,9 +164,9 @@ entry was not at the bottom, the entries below the last used one are
deleted. This means that an old branch in the call graph is lost. After the
commands explained above the tag stack will look like this:
- # TO tag FROM line in file
- 1 main 1 harddisk2:text/vim/test
- 2 FuncB 59 harddisk2:text/vim/src/main.c
+ # TO tag FROM line in file/text
+ 1 1 main 1 harddisk2:text/vim/test
+ 2 1 FuncB 59 harddisk2:text/vim/src/main.c
*E73*
When you try to use the tag stack while it doesn't contain anything you will
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 10d144016..2277c4117 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.3. Last change: 2010 Dec 08
+*todo.txt* For Vim version 7.3. Last change: 2011 Jan 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -33,6 +33,9 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
'cursorline' is displayed too short when there are concealed characters and
'list' is set, 'listchars' at default value. (Dennis Preiser, 2010 Aug 15)
+When running external command with ":make", cursor line is redrawn on top of
+external output.
+
Conceal: using Tab for cchar causes problems. Should reject it. (ZyX, 2010
Aug 25)
@@ -44,6 +47,8 @@ Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2,
only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug
21, Ben Fritz, 2010 Sep 14)
+Bug in repeating Visual "u". (Lawrence Kesteloot, 2010 Dec 20)
+
Windows keys not set properly on Windows 7? (cncyber, 2010 Aug 26)
This line hangs Vim, because of syntax HL:
@@ -52,11 +57,6 @@ call append(line, "INFO ....12....18....24....30....36....42....48....54....60.
Building the MingW version without clipboard but with multi-byte doesn't
work. (Bill Lam, 2010 Sep 18)
-When reading from stdin, don't enable signals before finishing reading?
-Otherwise the program producing the text may get killed by SIGWINCH.
-(Benjamin R. Haskell) Xavier: It's because reading from stdin returns -1.
-Patch from Xavier de Gaye, 2010 Dec 7. More generic solution?
-
Bug: E685 error for func_unref(). (ZyX, 2010 Aug 5)
Using ":break" or something else that stops executing commands inside a
@@ -65,6 +65,13 @@ Using ":break" or something else that stops executing commands inside a
Vim using lots of memory when joining lines. (John Little, 2010 Dec 3)
+On 64 bit MS-Windows "long" is only 32 bits, but we sometimes need to store a
+64 bits value. Change all number options to use nropt_T and define it to the
+right type.
+
+Patch to improve mf_hash, dynamic sizing. (Ivan Krasilnikov, 2010 Dec 17)
+Needs tests.
+
string() can't parse back "inf" and "nan". Fix documentation or fix code?
(ZyX, 2010 Aug 23)
@@ -74,9 +81,15 @@ mapping, how to restore the script ID?
Patch to fix \%V item in regexp. (Christian Brabandt, 2010 Nov 8)
Update Nov 19. James Vega: still not right. Christian: it's difficult.
+Patch to add up to 99 match groups. (Christian Brabandt, 2010 Dec 22)
+Also add named groups: \%{name}(re) and \%{name}g
+
Highlighting stops working after changing it many times. Script to reproduce
it: Pablo Contreras, 2010 Oct 12 Windows XP and 7. Font is never freed?
+Loading autoload script even when usage is inside "if 0". (Christian Brabandt,
+2010 Dec 18)
+
When 'cursorcolumn' is set locally to a window, ":new" opens a window with the
same highlighting but 'cursorcolumn' is empty. (Tyru, 2010 Nov 15)
@@ -100,15 +113,7 @@ do?
Searching mixed with Visual mode doesn't redraw properly. (James Vega, 2010 Nov
22)
-Win32: When using Chinese tear-off menu doesn't work. (Weasley, 2010 Oct 31)
-Patch by Alex Jakushev, 2010 Nov 2.
-
-Using ":call" inside "if 0" does not see that a function returns a Dict and
-gives error for "." as string concatenation. (Yasuhiro Matsumoto, 2010 Oct 20)
-Patch: Oct 20.
-
-Patch to move check for emsg_not_now() up to avoid statusline not being
-updated. (James Vega, 2010 Nov 4)
+Patch to support ":!start /b cmd". (Xaizek, 2010 Dec 22)
Copy/paste between Vim and Google chrome doesn't work well for multi-byte
characters. (Ben Haskell, 2010 Sep 17)
@@ -128,6 +133,9 @@ Nov 25)
GTK: Patch to fix menu popping down. (Hong Xu, 2010 Dec 4, Dec 5)
+Python: Adding line to buffer other than the current one doesn't work
+correctly. (Rozbujnik, 2010 Dec 19)
+
Patch to add 'systemencoding', convert between 'encoding' and this for file
names, shell commands and the like. (Kikuchan, 2010 Oct 14)
Assume the system converts between the actual encoding of the filesystem to
@@ -171,11 +179,17 @@ mkdir().
'cindent' not correct when 'list' is set. (Zdravi Korusef, 2010 Apr 15)
+When 'paste' is changed with 'pastetoggle', the ruler doesn't reflect this
+right away. (Samuel Ferencik, 2010 Dec 7)
+
Windows installer: licence text should not use indent, causes bad word wrap.
(Benjamin Fritz, 2010 Aug 16)
Mac with X11: clipboard doesn't work properly. (Raf, 2010 Aug 16)
+Using CompilerSet doesn't record where an option was set from. E.g., in the
+gcc compiler plugin. (Gary Johnson, 2010 Dec 13)
+
":helpgrep" does not put the cursor in the correct column when preceded by
accented character. (Tony Mechelynck, 2010 Apr 15)
@@ -188,6 +202,9 @@ Echo starts in the wrong column:
Patch for GVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7)
+When writing a file > 2Gbyte, the reported number of bytes is negative.
+(Antonio Colombo, 2010 Dec 18)
+
Patch: Let rare word highlighting overrule good word highlighting.
(Jakson A. Aquino, 2010 Jul 30)
@@ -200,9 +217,16 @@ instead of one. (Constantin Pan, 2010 Sep 10)
Crash in setqflist(). (Benoit Mortgat, 2010 Nov 18)
+Patch to handle resizing when tab is opened, when at full size. (Yukihiro
+Nakadaira, 2010 Jan 6)
+
Writing nested List and Dict in viminfo gives error message and can't be read
back. (Yukihiro Nakadaira, 2010 Nov 13)
+Can 'undolevels' be a buffer-local option? Helps for making big changes in
+one file only, set 'ul' to -1 only for that buffer.
+Patch by Christian Brabandt, 2010 Dec 17. Needs test.
+
Dos uninstal may delete vim.bat from the wrong directory (e.g., when someone
makes his own wrapper). Add a magic string with the version number to the
.bat file and check for it in the uninstaller. E.g.
@@ -258,6 +282,9 @@ Check if there are new reported defects: http://scan.coverity.com/rung2.html
Patch to support :undo absolute jump to file save number. (Christian Brabandt,
2010 Nov 5)
+Patch to use 'foldnextmax' also for "marker" foldmethod. (Arnaud Lacombe, 2011
+Jan 7)
+
When setting 'undofile' while the file is already loaded, but unchanged, try
to read the undo file. Requires computing a checksum of the text. (Andy
Wokula)
@@ -297,6 +324,10 @@ Jun 1)
Cannot use getchar() inside :normal and using an expression mapping. Is this
supposed to work? (XyX, 2010 Sep 22)
+When using an expression mapping with a multi-byte character each byte is
+converted to a utf-8 character. (ZyX, 2011 Jan 4)
+Patch for possible solution. (Yukihiro Nakadaira, 2011 Jan 5)
+
When a:base in 'completefunc' starts with a number it's passed as a number,
not a string. (Sean Ma) Need to add flag to call_func_retlist() to force a
string value.
@@ -458,18 +489,17 @@ Session file generates error upon loading, cause bu --remote-silent-tab.
Using ~ works OK on 'a' with composing char, but not on 0x0418 with composing
char 0x0301. (Tony Mechelynck, 2009 Mar 4)
+A function on a dictionary is not profiled. (Zyx, 2010 Dec 25)
+
Inconsistent: starting with $LANG set to es_ES.utf-8 gives Spanish
messages, even though locale is not supported. But ":lang messages
es_ES.utf-8" gives an error and doesn't switch messages. (Dominique Pelle,
2009 Jan 26)
-When $HOME contains special characters, sich as a comma, escape them when used
+When $HOME contains special characters, such as a comma, escape them when used
in an option. (Michael Hordijk, 2009 May 5)
Turn "esc" argument of expand_env_esc() into string of chars to be escaped.
-Can 'undolevels' be a buffer-local option? Helps for making big changes in
-one file only, set 'ul' to -1 only for that buffer.
-
Should make 'ignorecase' global-local, so that it makes sense setting it from
a modeline.
@@ -841,6 +871,9 @@ go to Insert mode and add a few lines. Then backspacing every other time
moves the cursor instead of deleting. (Chris Kaiser, 2007 Sep 25)
Patch to use Modern UI 2.0 for the Nsis installer. (Guopeng Wen, 2010 Jul 30)
+8 Windows install with NSIS: make it possible to do a silent install, see
+ http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
+ Version from Guopeng Wen that does this (2010 Dec 27)
Changes for Win32 makefile. (Mike Williams, 2007 Jan 22, Alexei Alexandrov,
2007 Feb 8)
@@ -1566,8 +1599,6 @@ Win32 GUI known bugs:
scroll?
7 Scrollbar width doesn't change when selecting other windows appearance.
Also background color of Toolbar and rectangle below vert. scrollbar.
-7 "!start /min cmd" should run in a minimized window, instead of using
- "/min" as the command name. (Rogall)
6 Drawing text transparently doesn't seem to work (when drawing part cursor).
8 CTRL key doesn't always work in combination with ALT key. It does work
for function keys, not for alphabetic characters. Perhaps this is because
@@ -2330,8 +2361,6 @@ Help:
User Friendlier:
-8 Windows install with NSIS: make it possible to do a silent install, see
- http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
8 Windows install with install.exe: Use .exe instead of .bat files for
links, so that command line arguments are passed on unmodified? (Walter
Briscoe)
@@ -4455,6 +4484,8 @@ Various improvements:
7 Instead of filtering errors with a shell script it should be possible to
do this with Vim script. A function that filters the raw text that comes
from the 'makeprg'?
+9 Add %F to 'errorformat': file name without spaces. Useful on Unix to
+ avoid matching something up to a time 11:22:33.
- Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
Govindachar)
7 Add a command that goes back to the position from before jumping to the
diff --git a/runtime/doc/undo.txt b/runtime/doc/undo.txt
index b806a31e4..e9406e6aa 100644
--- a/runtime/doc/undo.txt
+++ b/runtime/doc/undo.txt
@@ -1,4 +1,4 @@
-*undo.txt* For Vim version 7.3. Last change: 2010 Oct 21
+*undo.txt* For Vim version 7.3. Last change: 2010 Dec 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -125,16 +125,23 @@ This is explained in the user manual: |usr_32.txt|.
*:undol* *:undolist*
:undol[ist] List the leafs in the tree of changes. Example:
- number changes time saved ~
- 4 10 10:34:11
- 18 4 11:01:46 7
+ number changes when saved ~
+ 88 88 2010/01/04 14:25:53
+ 108 107 08/07 12:47:51
+ 136 46 13:33:01 7
+ 166 164 3 seconds ago
The "number" column is the change number. This number
continuously increases and can be used to identify a
specific undo-able change, see |:undo|.
The "changes" column is the number of changes to this
leaf from the root of the tree.
- The "time" column is the time this change was made.
+ The "when" column is the date and time when this
+ change was made. The four possible formats are:
+ N seconds ago
+ HH:MM:SS hour, minute, seconds
+ MM/DD HH:MM:SS idem, with month and day
+ YYYY/MM/DD HH:MM:SS idem, with year
The "saved" column specifies, if this change was
written to disk and which file write it was. This can
be used with the |:later| and |:earlier| commands.
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 79090f0ee..ef1318088 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: 2010 Sep 29
+" Last Change: 2010 Dec 17
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1614,7 +1614,16 @@ au BufNewFile,BufRead *.rtf setf rtf
au BufNewFile,BufRead .irbrc,irbrc setf ruby
" Ruby
-au BufNewFile,BufRead *.rb,*.rbw,*.gem,*.gemspec setf ruby
+au BufNewFile,BufRead *.rb,*.rbw setf ruby
+
+" RubyGems
+au BufNewFile,BufRead *.gemspec setf ruby
+
+" Rackup
+au BufNewFile,BufRead *.ru setf ruby
+
+" Bundler
+au BufNewFile,BufRead Gemfile setf ruby
" Ruby on Rails
au BufNewFile,BufRead *.builder,*.rxml,*.rjs setf ruby
diff --git a/runtime/plugin/tohtml.vim b/runtime/plugin/tohtml.vim
index 651a40c18..ece30105c 100644
--- a/runtime/plugin/tohtml.vim
+++ b/runtime/plugin/tohtml.vim
@@ -1,25 +1,32 @@
" Vim plugin for converting a syntax highlighted file to HTML.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
-" Last Change: 2010 Oct 28
+" Last Change: 2011 Jan 06
"
" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
" $VIMRUNTIME/syntax/2html.vim
"
" TODO:
-" * Patch to leave tab characters in when noexpandtab set (Andy Spencer)
-" * Make folds show up when using a range and dynamic folding
-" * Remove fold column when there are no folds and using dynamic folding
+" * Explicitly trigger IE8+ Standards Mode?
+" * Make it so deleted lines in a diff don't create side-scrolling
" * Restore open/closed folds and cursor position after processing each file
" with option not to restore for speed increase
-" * Add extra meta info (generation time, etc.)
-" * Tidy up so we can use strict doctype in even more situations?
+" * Undercurl support via dotted bottom border?
+" * Add extra meta info (generation time, etc.)?
+" * Tidy up so we can use strict doctype in even more situations
" * Implementation detail: add threshold for writing the lines to the html
" buffer before we're done (5000 or so lines should do it)
" * TODO comments for code cleanup scattered throughout
"
"
" Changelog:
-" 7.3_v7 (this version): see betas released on vim_dev below:
+" 7.3_v8 (this version): Add html_expand_tabs option to allow leaving tab
+" characters in generated output (Andy Spencer). Escape
+" text that looks like a modeline so Vim doesn't use
+" anything in the converted HTML as a modeline.
+" Bugfixes: Fix folding when a fold starts before the
+" conversion range. Remove fold column when there are
+" no folds.
+" 7.3_v7 (840c3cadb842): see betas released on vim_dev below:
" 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way.
" 7.3_v7b2: Remove automatic detection of encodings that are not
" supported by all major browsers according to
@@ -54,7 +61,7 @@
if exists('g:loaded_2html_plugin')
finish
endif
-let g:loaded_2html_plugin = 'vim7.3_v7'
+let g:loaded_2html_plugin = 'vim7.3_v8'
" Define the :TOhtml command when:
" - 'compatible' is not set
diff --git a/runtime/syntax/2html.vim b/runtime/syntax/2html.vim
index 22ce73152..d37ca1aad 100644
--- a/runtime/syntax/2html.vim
+++ b/runtime/syntax/2html.vim
@@ -1,6 +1,6 @@
" Vim syntax support file
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
-" Last Change: 2010 Sep 04
+" Last Change: 2011 Jan 06
"
" Additional contributors:
"
@@ -124,7 +124,18 @@ function! s:HtmlFormat(text, style_name, diff_style_name)
let l:style_name = a:style_name . (a:diff_style_name == '' ? '' : ' ') . a:diff_style_name
" Replace the reserved html characters
- let formatted = substitute(substitute(substitute(substitute(substitute(formatted, '&', '\&amp;', 'g'), '<', '\&lt;', 'g'), '>', '\&gt;', 'g'), '"', '\&quot;', 'g'), "\x0c", '<hr class="PAGE-BREAK">', 'g')
+ let formatted = substitute(formatted, '&', '\&amp;', 'g')
+ let formatted = substitute(formatted, '<', '\&lt;', 'g')
+ let formatted = substitute(formatted, '>', '\&gt;', 'g')
+ let formatted = substitute(formatted, '"', '\&quot;', 'g')
+ " TODO: Use &apos; for "'"?
+
+ " Replace a "form feed" character with HTML to do a page break
+ let formatted = substitute(formatted, "\x0c", '<hr class="PAGE-BREAK">', 'g')
+
+ " Mangle modelines so Vim doesn't try to use HTML text as a modeline if
+ " editing this file in the future
+ let formatted = substitute(formatted, '\v(\s+%(vim?|ex)):', '\1\&#0058;', 'g')
" Replace double spaces, leading spaces, and trailing spaces if needed
if ' ' != s:HtmlSpace
@@ -558,9 +569,6 @@ if s:settings.dynamic_folds
" level, so subtract 2 from index of first non-dash after the dashes
" in order to get the fold level of the current fold
let s:level = match(foldtextresult(s:lnum), '+-*\zs[^-]') - 2
- if s:level+1 > s:foldcolumn
- let s:foldcolumn = s:level+1
- endif
" store fold info for later use
let s:newfold = {'firstline': s:lnum, 'lastline': foldclosedend(s:lnum), 'level': s:level,'type': "closed-fold"}
call add(s:allfolds, s:newfold)
@@ -590,9 +598,6 @@ if s:settings.dynamic_folds
" level, so subtract 2 from index of first non-dash after the dashes
" in order to get the fold level of the current fold
let s:level = match(foldtextresult(s:lnum), '+-*\zs[^-]') - 2
- if s:level+1 > s:foldcolumn
- let s:foldcolumn = s:level+1
- endif
let s:newfold = {'firstline': s:lnum, 'lastline': foldclosedend(s:lnum), 'level': s:level,'type': "closed-fold"}
" only add the fold if we don't already have it
if empty(s:allfolds) || index(s:allfolds, s:newfold) == -1
@@ -622,6 +627,48 @@ if s:settings.dynamic_folds
" close all folds again so we can get the fold text as we go
silent! %foldclose!
+
+ for afold in s:allfolds
+ let removed = 0
+ if exists("g:html_start_line") && exists("g:html_end_line")
+ if afold.firstline < g:html_start_line
+ if afold.lastline < g:html_end_line && afold.lastline > g:html_start_line
+ " if a fold starts before the range to convert but stops within the
+ " range, we need to include it. Make it start on the first converted
+ " line.
+ let afold.firstline = g:html_start_line
+ else
+ " if the fold lies outside the range or the start and stop enclose
+ " the entire range, don't bother parsing it
+ call remove(s:allfolds, index(s:allfolds, afold))
+ let removed = 1
+ endif
+ elseif afold.firstline > g:html_end_line
+ " If the entire fold lies outside the range we need to remove it.
+ call remove(s:allfolds, index(s:allfolds, afold))
+ let removed = 1
+ endif
+ elseif exists("g:html_start_line")
+ if afold.firstline < g:html_start_line
+ " if there is no last line, but there is a first line, the end of the
+ " fold will always lie within the region of interest, so keep it
+ let afold.firstline = g:html_start_line
+ endif
+ elseif exists("g:html_end_line")
+ " if there is no first line we default to the first line in the buffer so
+ " the fold start will always be included if the fold itself is included.
+ " If however the entire fold lies outside the range we need to remove it.
+ if afold.firstline > g:html_end_line
+ call remove(s:allfolds, index(s:allfolds, afold))
+ let removed = 1
+ endif
+ endif
+ if !removed
+ if afold.level+1 > s:foldcolumn
+ let s:foldcolumn = afold.level+1
+ endif
+ endif
+ endfor
endif
" Now loop over all lines in the original text to convert to html.
@@ -669,6 +716,13 @@ endif
let s:foldId = 0
+if !s:settings.expand_tabs
+ " If keeping tabs, add them to printable characters so we keep them when
+ " formatting text (strtrans() doesn't replace printable chars)
+ let s:old_isprint = &isprint
+ setlocal isprint+=9
+endif
+
while s:lnum <= s:end
" If there are filler lines for diff mode, show these above the line.
@@ -747,7 +801,7 @@ while s:lnum <= s:end
call remove(s:foldstack, 0)
endwhile
- " Now insert an opening any new folds that start on this line
+ " Now insert an opening for any new folds that start on this line
let s:firstfold = 1
while !empty(s:allfolds) && get(s:allfolds,0).firstline == s:lnum
let s:foldId = s:foldId + 1
@@ -884,30 +938,32 @@ while s:lnum <= s:end
endif
if s:settings.ignore_conceal || !s:concealinfo[0]
- " Expand tabs
+ " Expand tabs if needed
let s:expandedtab = strpart(s:line, s:startcol - 1, s:col - s:startcol)
- let s:offset = 0
- let s:idx = stridx(s:expandedtab, "\t")
- while s:idx >= 0
- if has("multi_byte_encoding")
- if s:startcol + s:idx == 1
- let s:i = &ts
- else
- if s:idx == 0
- let s:prevc = matchstr(s:line, '.\%' . (s:startcol + s:idx + s:offset) . 'c')
+ if s:settings.expand_tabs
+ let s:offset = 0
+ let s:idx = stridx(s:expandedtab, "\t")
+ while s:idx >= 0
+ if has("multi_byte_encoding")
+ if s:startcol + s:idx == 1
+ let s:i = &ts
else
- let s:prevc = matchstr(s:expandedtab, '.\%' . (s:idx + 1) . 'c')
+ if s:idx == 0
+ let s:prevc = matchstr(s:line, '.\%' . (s:startcol + s:idx + s:offset) . 'c')
+ else
+ let s:prevc = matchstr(s:expandedtab, '.\%' . (s:idx + 1) . 'c')
+ endif
+ let s:vcol = virtcol([s:lnum, s:startcol + s:idx + s:offset - len(s:prevc)])
+ let s:i = &ts - (s:vcol % &ts)
endif
- let s:vcol = virtcol([s:lnum, s:startcol + s:idx + s:offset - len(s:prevc)])
- let s:i = &ts - (s:vcol % &ts)
+ let s:offset -= s:i - 1
+ else
+ let s:i = &ts - ((s:idx + s:startcol - 1) % &ts)
endif
- let s:offset -= s:i - 1
- else
- let s:i = &ts - ((s:idx + s:startcol - 1) % &ts)
- endif
- let s:expandedtab = substitute(s:expandedtab, '\t', repeat(' ', s:i), '')
- let s:idx = stridx(s:expandedtab, "\t")
- endwhile
+ let s:expandedtab = substitute(s:expandedtab, '\t', repeat(' ', s:i), '')
+ let s:idx = stridx(s:expandedtab, "\t")
+ endwhile
+ end
" get the highlight group name to use
let s:id = synIDtrans(s:id)
@@ -1073,7 +1129,7 @@ endif
" Cleanup
%s:\s\+$::e
-" Restore old settings
+" Restore old settings (new window first)
let &l:foldenable = s:old_fen
let &l:foldmethod = s:old_fdm
let &report = s:old_report
@@ -1083,11 +1139,20 @@ let &paste = s:old_paste
let &magic = s:old_magic
let @/ = s:old_search
let &more = s:old_more
+
+" switch to original window to restore those settings
exe s:orgwin . "wincmd w"
+
+if !s:settings.expand_tabs
+ let &l:isprint = s:old_isprint
+endif
let &l:stl = s:origwin_stl
let &l:et = s:old_et
let &l:scrollbind = s:old_bind
+
+" and back to the new window again to end there
exe s:newwin . "wincmd w"
+
let &l:stl = s:newwin_stl
exec 'resize' s:old_winheight
let &l:winfixheight = s:old_winfixheight
@@ -1098,6 +1163,7 @@ let &ls=s:ls
unlet s:htmlfont
unlet s:old_et s:old_paste s:old_icon s:old_report s:old_title s:old_search
unlet s:old_magic s:old_more s:old_fdm s:old_fen s:old_winheight
+unlet! s:old_isprint
unlet s:whatterm s:idlist s:lnum s:end s:margin s:fgc s:bgc s:old_winfixheight
unlet! s:col s:id s:attr s:len s:line s:new s:expandedtab s:concealinfo
unlet! s:orgwin s:newwin s:orgbufnr s:idx s:i s:offset s:ls s:origwin_stl
diff --git a/runtime/syntax/xquery.vim b/runtime/syntax/xquery.vim
index dcb2685c9..129a283bc 100644
--- a/runtime/syntax/xquery.vim
+++ b/runtime/syntax/xquery.vim
@@ -1,10 +1,11 @@
" Vim syntax file
" Language: XQuery
-" Author: Jean-Marc Vanel <http://jmvanel.free.fr/>
-" Last Change: mar jui 12 18:04:05 CEST 2005
+" Author: René Neumann <necoro@necoro.eu>
+" Author: Steve Spigarelli <http://spig.net/>
+" Original Author: Jean-Marc Vanel <http://jmvanel.free.fr/>
+" Last Change: December 11, 2010
" Filenames: *.xq
" URL: http://jmvanel.free.fr/vim/xquery.vim
-" $Id: xquery.vim,v 1.1 2005/07/18 21:44:56 vimboss Exp $
" REFERENCES:
" [1] http://www.w3.org/TR/xquery/
@@ -14,22 +15,26 @@ if exists("b:current_syntax")
finish
endif
+" - is allowed in keywords
+setlocal iskeyword+=-
+
runtime syntax/xml.vim
syn case match
" From XQuery grammar:
-syn keyword xqueryStatement ancestor ancestor-or-self and as ascending at attribute base-uri by case cast castable child collation construction declare default descendant descendant-or-self descending div document element else empty encoding eq every except external following following-sibling for function ge greatest gt idiv if import in inherit-namespaces instance intersect is le least let lt mod module namespace ne no of or order ordered ordering parent preceding preceding-sibling preserve return satisfies schema self some stable strip then to treat typeswitch union unordered validate variable version where xmlspace xquery yes
+syn keyword xqStatement ancestor ancestor-or-self and as ascending at attribute base-uri boundary-space by case cast castable child collation construction declare default descendant descendant-or-self descending div document element else empty encoding eq every except external following following-sibling for function ge greatest gt idiv if import in inherit-namespaces instance intersect is le least let lt mod module namespace ne no of or order ordered ordering parent preceding preceding-sibling preserve return satisfies schema self some stable strip then to treat typeswitch union unordered validate variable version where xmlspace xquery yes
" TODO contains clashes with vim keyword
-syn keyword xqueryFunction abs adjust-date-to-timezone adjust-date-to-timezone adjust-dateTime-to-timezone adjust-dateTime-to-timezone adjust-time-to-timezone adjust-time-to-timezone avg base-uri base-uri boolean ceiling codepoint-equal codepoints-to-string collection collection compare concat count current-date current-dateTime current-time data dateTime day-from-date day-from-dateTime days-from-duration deep-equal deep-equal default-collation distinct-values distinct-values doc doc-available document-uri empty ends-with ends-with error error error error escape-uri exactly-one exists false floor hours-from-dateTime hours-from-duration hours-from-time id id idref idref implicit-timezone in-scope-prefixes index-of index-of insert-before lang lang last local-name local-name local-name-from-QName lower-case matches matches max max min min minutes-from-dateTime minutes-from-duration minutes-from-time month-from-date month-from-dateTime months-from-duration name name namespace-uri namespace-uri namespace-uri-for-prefix namespace-uri-from-QName nilled node-name normalize-space normalize-space normalize-unicode normalize-unicode not number number one-or-more position prefix-from-QName QName remove replace replace resolve-QName resolve-uri resolve-uri reverse root root round round-half-to-even round-half-to-even seconds-from-dateTime seconds-from-duration seconds-from-time starts-with starts-with static-base-uri string string string-join string-length string-length string-to-codepoints subsequence subsequence substring substring substring-after substring-after substring-before substring-before sum sum timezone-from-date timezone-from-dateTime timezone-from-time tokenize tokenize trace translate true unordered upper-case year-from-date year-from-dateTime years-from-duration zero-or-one
+syn keyword xqFunction abs adjust-date-to-timezone adjust-date-to-timezone adjust-dateTime-to-timezone adjust-dateTime-to-timezone adjust-time-to-timezone adjust-time-to-timezone avg base-uri base-uri boolean ceiling codepoint-equal codepoints-to-string collection collection compare concat count current-date current-dateTime current-time data dateTime day-from-date day-from-dateTime days-from-duration deep-equal deep-equal default-collation distinct-values distinct-values doc doc-available document-uri empty ends-with ends-with error error error error escape-uri exactly-one exists false floor hours-from-dateTime hours-from-duration hours-from-time id id idref idref implicit-timezone in-scope-prefixes index-of index-of insert-before lang lang last local-name local-name local-name-from-QName lower-case matches matches max max min min minutes-from-dateTime minutes-from-duration minutes-from-time month-from-date month-from-dateTime months-from-duration name name namespace-uri namespace-uri namespace-uri-for-prefix namespace-uri-from-QName nilled node-name normalize-space normalize-space normalize-unicode normalize-unicode not number number one-or-more position prefix-from-QName QName remove replace replace resolve-QName resolve-uri resolve-uri reverse root root round round-half-to-even round-half-to-even seconds-from-dateTime seconds-from-duration seconds-from-time starts-with starts-with static-base-uri string string string-join string-length string-length string-to-codepoints subsequence subsequence substring substring substring-after substring-after substring-before substring-before sum sum timezone-from-date timezone-from-dateTime timezone-from-time tokenize tokenize trace translate true unordered upper-case year-from-date year-from-dateTime years-from-duration zero-or-one
+
+syn keyword xqOperator add-dayTimeDuration-to-date add-dayTimeDuration-to-dateTime add-dayTimeDuration-to-time add-dayTimeDurations add-yearMonthDuration-to-date add-yearMonthDuration-to-dateTime add-yearMonthDurations base64Binary-equal boolean-equal boolean-greater-than boolean-less-than concatenate date-equal date-greater-than date-less-than dateTime-equal dateTime-greater-than dateTime-less-than dayTimeDuration-equal dayTimeDuration-greater-than dayTimeDuration-less-than divide-dayTimeDuration divide-dayTimeDuration-by-dayTimeDuration divide-yearMonthDuration divide-yearMonthDuration-by-yearMonthDuration except gDay-equal gMonth-equal gMonthDay-equal gYear-equal gYearMonth-equal hexBinary-equal intersect is-same-node multiply-dayTimeDuration multiply-yearMonthDuration node-after node-before NOTATION-equal numeric-add numeric-divide numeric-equal numeric-greater-than numeric-integer-divide numeric-less-than numeric-mod numeric-multiply numeric-subtract numeric-unary-minus numeric-unary-plus QName-equal subtract-dates-yielding-dayTimeDuration subtract-dateTimes-yielding-dayTimeDuration subtract-dayTimeDuration-from-date subtract-dayTimeDuration-from-dateTime subtract-dayTimeDuration-from-time subtract-dayTimeDurations subtract-times subtract-yearMonthDuration-from-date subtract-yearMonthDuration-from-dateTime subtract-yearMonthDurations time-equal time-greater-than time-less-than to union yearMonthDuration-equal yearMonthDuration-greater-than yearMonthDuration-less-than
-syn keyword xqueryOperator add-dayTimeDuration-to-date add-dayTimeDuration-to-dateTime add-dayTimeDuration-to-time add-dayTimeDurations add-yearMonthDuration-to-date add-yearMonthDuration-to-dateTime add-yearMonthDurations base64Binary-equal boolean-equal boolean-greater-than boolean-less-than concatenate date-equal date-greater-than date-less-than dateTime-equal dateTime-greater-than dateTime-less-than dayTimeDuration-equal dayTimeDuration-greater-than dayTimeDuration-less-than divide-dayTimeDuration divide-dayTimeDuration-by-dayTimeDuration divide-yearMonthDuration divide-yearMonthDuration-by-yearMonthDuration except gDay-equal gMonth-equal gMonthDay-equal gYear-equal gYearMonth-equal hexBinary-equal intersect is-same-node multiply-dayTimeDuration multiply-yearMonthDuration node-after node-before NOTATION-equal numeric-add numeric-divide numeric-equal numeric-greater-than numeric-integer-divide numeric-less-than numeric-mod numeric-multiply numeric-subtract numeric-unary-minus numeric-unary-plus QName-equal subtract-dates-yielding-dayTimeDuration subtract-dateTimes-yielding-dayTimeDuration subtract-dayTimeDuration-from-date subtract-dayTimeDuration-from-dateTime subtract-dayTimeDuration-from-time subtract-dayTimeDurations subtract-times subtract-yearMonthDuration-from-date subtract-yearMonthDuration-from-dateTime subtract-yearMonthDurations time-equal time-greater-than time-less-than to union yearMonthDuration-equal yearMonthDuration-greater-than yearMonthDuration-less-than
+syn match xqType "xs:\(\|Datatype\|primitive\|string\|boolean\|float\|double\|decimal\|duration\|dateTime\|time\|date\|gYearMonth\|gYear\|gMonthDay\|gDay\|gMonth\|hexBinary\|base64Binary\|anyURI\|QName\|NOTATION\|\|normalizedString\|token\|language\|IDREFS\|ENTITIES\|NMTOKEN\|NMTOKENS\|Name\|NCName\|ID\|IDREF\|ENTITY\|integer\|nonPositiveInteger\|negativeInteger\|long\|int\|short\|byte\|nonNegativeInteger\|unsignedLong\|unsignedInt\|unsignedShort\|unsignedByte\|positiveInteger\)"
-syn match xqueryType "xs:\(\|Datatype\|primitive\|string\|boolean\|float\|double\|decimal\|duration\|dateTime\|time\|date\|gYearMonth\|gYear\|gMonthDay\|gDay\|gMonth\|hexBinary\|base64Binary\|anyURI\|QName\|NOTATION\|\|normalizedString\|token\|language\|IDREFS\|ENTITIES\|NMTOKEN\|NMTOKENS\|Name\|NCName\|ID\|IDREF\|ENTITY\|integer\|nonPositiveInteger\|negativeInteger\|long\|int\|short\|byte\|nonNegativeInteger\|unsignedLong\|unsignedInt\|unsignedShort\|unsignedByte\|positiveInteger\)"
" From XPath grammar:
-syn keyword xqueryXPath some every in in satisfies if then else to div idiv mod union intersect except instance of treat castable cast eq ne lt le gt ge is child descendant attribute self descendant-or-self following-sibling following namespace parent ancestor preceding-sibling preceding ancestor-or-self void item node document-node text comment processing-instruction attribute schema-attribute schema-element
+syn keyword xqXPath some every in in satisfies if then else to div idiv mod union intersect except instance of treat castable cast eq ne lt le gt ge is child descendant attribute self descendant-or-self following-sibling following namespace parent ancestor preceding-sibling preceding ancestor-or-self void item node document-node text comment processing-instruction attribute schema-attribute schema-element
" eXist extensions
syn match xqExist "&="
@@ -37,44 +42,41 @@ syn match xqExist "&="
" XQdoc
syn match XQdoc contained "@\(param\|return\|author\)\>"
-highlight def link xqueryStatement Statement
-highlight def link xqueryFunction Function
-highlight def link xqueryOperator Operator
-highlight def link xqueryType Type
-highlight def link xqueryXPath Operator
-highlight def link XQdoc Special
-highlight def link xqExist Operator
-
-
-"floating point number, with dot, optional exponent
-syn match cFloat "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
-"floating point number, starting with a dot, optional exponent
-syn match cFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
-"floating point number, without dot, with exponent
-syn match cFloat "\d\+e[-+]\=\d\+[fl]\=\>"
-syn match cNumber "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
-syn match cNumber "\<\d\+\>"
-highlight def link cNumber Number
-highlight def link cFloat Number
-
-syn region xqComment start='(:' excludenl end=':)' contains=XQdoc
-highlight def link xqComment Comment
-" syntax match xqVariable "$\w\+"
-syntax match xqVariable +$\<[a-zA-Z:_][-.0-9a-zA-Z0-9:_]*\>+
-highlight def link xqVariable Identifier
-
-" Redefine the default XML highlighting:
-highlight def link xmlTag Structure
-highlight def link xmlTagName Structure
-highlight def link xmlEndTag Structure
-
-syntax match xqSeparator ",\|;"
-highlight link xqSeparator Operator
-
-syn region xqCode transparent contained start='{' excludenl end='}' contains=xmlRegionBis,xqComment,xqueryStatement,xmlString,xqSeparator,cNumber,xqVariable keepend extend
+" floating point number, with dot, optional exponent
+syn match xqFloat "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
+" floating point number, starting with a dot, optional exponent
+syn match xqFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
+" floating point number, without dot, with exponent
+syn match xqFloat "\d\+e[-+]\=\d\+[fl]\=\>"
+syn match xqNumber "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
+syn match xqNumber "\<\d\+\>"
-syn region xmlRegionBis start=+<\z([^ /!?<>"']\+\)+ skip=+<!--\_.\{-}-->+ end=+</\z1\_\s\{-}>+ end=+/>+ fold contains=xmlTag,xmlEndTag,xmlCdata,xmlRegionBis,xmlComment,xmlEntity,xmlProcessing,xqCode keepend extend
+syn region xqString start=+"+ end=+"+
+syn region xqComment start='(:' excludenl end=':)' contains=XQdoc
-syn region List transparent start='(' excludenl end=')' contains=xqCode,xmlRegion,xqComment,xqSeparator,xqueryStatement,xqVariable,xqueryType keepend extend
+syn match xqVariable "$\<[a-zA-Z:_][-.0-9a-zA-Z0-9:_]*\>"
+syn match xqSeparator ",\|;"
+syn region xqCode transparent contained start='{' excludenl end='}' contains=xqFunction,xqCode,xmlRegionBis,xqComment,xqStatement,xmlString,xqSeparator,xqNumber,xqVariable,xqString keepend extend
+syn region xmlRegionBis start=+<\z([^ /!?<>"']\+\)+ skip=+<!--\_.\{-}-->+ end=+</\z1\_\s\{-}>+ end=+/>+ fold contains=xmlTag,xmlEndTag,xmlCdata,xmlRegionBis,xmlComment,xmlEntity,xmlProcessing,xqCode keepend extend
+hi def link xqNumber Number
+hi def link xqFloat Number
+hi def link xqString String
+hi def link xqVariable Identifier
+hi def link xqComment Comment
+hi def link xqSeparator Operator
+hi def link xqStatement Statement
+hi def link xqFunction Function
+hi def link xqOperator Operator
+hi def link xqType Type
+hi def link xqXPath Operator
+hi def link XQdoc Special
+hi def link xqExist Operator
+
+" override the xml highlighting
+"hi link xmlTag Structure
+"hi link xmlTagName Structure
+"hi link xmlEndTag Structure
+
+let b:current_syntax = "xquery"