aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/autocmd.txt4
-rw-r--r--runtime/doc/change.txt8
-rw-r--r--runtime/doc/cmdline.txt17
-rw-r--r--runtime/doc/editing.txt30
-rw-r--r--runtime/doc/eval.txt1
-rw-r--r--runtime/indent/sh.vim19
-rw-r--r--runtime/makemenu.vim1
-rw-r--r--runtime/plugin/matchit.vim2
-rw-r--r--runtime/synmenu.vim1
-rw-r--r--runtime/syntax/datascript.vim14
-rw-r--r--runtime/syntax/synload.vim4
11 files changed, 62 insertions, 39 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 9f1b7702ed..7dfc1d5d2f 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 7.4. Last change: 2015 Jul 20
+*autocmd.txt* For Vim version 7.4. Last change: 2015 Aug 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1100,7 +1100,7 @@ Instead of a pattern buffer-local autocommands use one of these forms:
Examples: >
:au CursorHold <buffer> echo 'hold'
:au CursorHold <buffer=33> echo 'hold'
- :au CursorHold <buffer=abuf> echo 'hold'
+ :au BufNewFile * CursorHold <buffer=abuf> echo 'hold'
All the commands for autocommands also work with buffer-local autocommands,
simply use the special string instead of the pattern. Examples: >
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 861f736426..cc32187840 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -1,4 +1,4 @@
-*change.txt* For Vim version 7.4. Last change: 2015 Jun 25
+*change.txt* For Vim version 7.4. Last change: 2015 Aug 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -622,9 +622,9 @@ For MS-Windows: $TMP, $TEMP, $USERPROFILE, current-dir.
may add [flags], see |:s_flags|.
Note that after `:substitute` the '&' flag can't be
used, it's recognized as a pattern separator.
- The space between `:substitute` and the 'c', 'g' and
- 'r' flags isn't required, but in scripts it's a good
- idea to keep it to avoid confusion.
+ The space between `:substitute` and the 'c', 'g',
+ 'i', 'I' and 'r' flags isn't required, but in scripts
+ it's a good idea to keep it to avoid confusion.
:[range]~[&][flags] [count] *:~*
Repeat last substitute with same substitute string
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index 1236bc6e16..f6fdc22da4 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -1,4 +1,4 @@
-*cmdline.txt* For Vim version 7.4. Last change: 2015 Jul 21
+*cmdline.txt* For Vim version 7.4. Last change: 2015 Jul 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -715,13 +715,13 @@ to insert special things while typing you can use the CTRL-R command. For
example, "%" stands for the current file name, while CTRL-R % inserts the
current file name right away. See |c_CTRL-R|.
-Note: If you want to avoid the special characters in a Vim script you may want
-to use |fnameescape()|. Also see |`=|.
+Note: If you want to avoid the effects of special characters in a Vim script
+you may want to use |fnameescape()|. Also see |`=|.
In Ex commands, at places where a file name can be used, the following
characters have a special meaning. These can also be used in the expression
-function expand() |expand()|.
+function |expand()|.
% Is replaced with the current file name. *:_%* *c_%*
# Is replaced with the alternate file name. *:_#* *c_#*
This is remembered for every window.
@@ -757,6 +757,7 @@ it, no matter how many backslashes.
\# #
\\# \#
Also see |`=|.
+
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
*:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
@@ -777,7 +778,7 @@ Note: these are typed literally, they are not special keys!
<afile> only when the file name isn't used to match with
(for FileType, Syntax and SpellFileMissing events).
<sfile> When executing a ":source" command, is replaced with the
- file name of the sourced file. *E498*
+ file name of the sourced file. *E498*
When executing a function, is replaced with
"function {function-name}"; function call nesting is
indicated like this:
@@ -845,7 +846,7 @@ These modifiers can be given, in this order:
:gs?pat?sub?
Substitute all occurrences of "pat" with "sub". Otherwise
this works like ":s".
- :S Escape special characters for use with a shell command (see
+ :S Escape special characters for use with a shell command (see
|shellescape()|). Must be the last one. Examples: >
:!dir <cfile>:S
:call system('chmod +w -- ' . expand('%:S'))
@@ -898,9 +899,8 @@ name). This is included for backwards compatibility with version 3.0, the
Note: Where a file name is expected wildcards expansion is done. On Unix the
shell is used for this, unless it can be done internally (for speed).
-Backticks also work, like in >
+Unless in |restricted-mode|, backticks work also, like in >
:n `echo *.c`
-(backtick expansion is not possible in |restricted-mode|)
But expansion is only done if there are any wildcards before expanding the
'%', '#', etc.. This avoids expanding wildcards inside a file name. If you
want to expand the result of <cfile>, add a wildcard character to it.
@@ -937,6 +937,7 @@ for the file "$home" in the root directory. A few examples:
\$home file "$home" in current directory
/\$home file "$home" in root directory
\\$home file "\\", followed by expanded $home
+
Also see |`=|.
==============================================================================
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index 507ee14baf..7dea905c2b 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1,4 +1,4 @@
-*editing.txt* For Vim version 7.4. Last change: 2015 Jul 21
+*editing.txt* For Vim version 7.4. Last change: 2015 Jul 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -378,22 +378,34 @@ Finds files:
/usr/include/sys/types.h
/usr/inc_old/types.h
*backtick-expansion* *`-expansion*
-On Unix and a few other systems you can also use backticks in the file name,
-for example: >
- :e `find . -name ver\\*.c -print`
-The backslashes before the star are required to prevent "ver*.c" to be
-expanded by the shell before executing the find program.
+On Unix and a few other systems you can also use backticks for the file name
+argument, for example: >
+ :next `find . -name ver\\*.c -print`
+The backslashes before the star are required to prevent the shell from
+expanding "ver*.c" prior to execution of the find program. The backslash
+before the shell pipe symbol "|" prevents Vim from parsing it as command
+termination.
This also works for most other systems, with the restriction that the
backticks must be around the whole item. It is not possible to have text
directly before the first or just after the last backtick.
*`=*
-You can have the backticks expanded as a Vim expression, instead of an
-external command, by using the syntax `={expr}` e.g.: >
+You can have the backticks expanded as a Vim expression, instead of as an
+external command, by putting an equal sign right after the first backtick,
+e.g.: >
:e `=tempname()`
The expression can contain just about anything, thus this can also be used to
avoid the special meaning of '"', '|', '%' and '#'. However, 'wildignore'
does apply like to other wildcards.
+
+Environment variables are expanded before evaluating the expression, thus this
+does not work: >
+ :e `=$HOME . '.vimrc'`
+Because $HOME is expanding early, resulting in: >
+ :e `=/home/user . '.vimrc'`
+This does work: >
+ :e `=expand('$HOME') . '.vimrc'`
+
If the expression returns a string then names are to be separated with line
breaks. When the result is a |List| then each item is used as a name. Line
breaks also separate names.
@@ -1294,7 +1306,7 @@ There are a few things to remember when editing binary files:
and when the file is written the <NL> will be replaced with <CR> <NL>.
- <Nul> characters are shown on the screen as ^@. You can enter them with
"CTRL-V CTRL-@" or "CTRL-V 000".
-- To insert a <NL> character in the file split up a line. When writing the
+- To insert a <NL> character in the file split a line. When writing the
buffer to a file a <NL> will be written for the <EOL>.
- Vim normally appends an <EOL> at the end of the file if there is none.
Setting the 'binary' option prevents this. If you want to add the final
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 6a1eac6814..cf1394d799 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1858,6 +1858,7 @@ getbufvar( {expr}, {varname} [, {def}])
any variable {varname} in buffer {expr}
getchar( [expr]) Number get one character from the user
getcharmod( ) Number modifiers for the last typed character
+getcharsearch() Dict last character search
getcmdline() String return the current command-line
getcmdpos() Number return cursor position in command-line
getcmdtype() String return current command-line type
diff --git a/runtime/indent/sh.vim b/runtime/indent/sh.vim
index 29a25a2108..b2f35b23a7 100644
--- a/runtime/indent/sh.vim
+++ b/runtime/indent/sh.vim
@@ -1,10 +1,11 @@
" Vim indent file
-" Language: Shell Script
-" Maintainer: Currently unmaintained. If you want to take it, please
-" email Bram
+" Language: Shell Script
+" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
-" Original Author: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2014-08-22
+" Original Author: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2015-07-28
+" License: Vim (see :h license)
+" Repository: https://github.com/chrisbra/vim-sh-indent
if exists("b:did_indent")
finish
@@ -12,7 +13,7 @@ endif
let b:did_indent = 1
setlocal indentexpr=GetShIndent()
-setlocal indentkeys+=0=then,0=do,0=else,0=elif,0=fi,0=esac,0=done,),0=;;,0=;&
+setlocal indentkeys+=0=then,0=do,0=else,0=elif,0=fi,0=esac,0=done,0=end,),0=;;,0=;&
setlocal indentkeys+=0=fin,0=fil,0=fip,0=fir,0=fix
setlocal indentkeys-=:,0#
setlocal nosmartindent
@@ -56,8 +57,8 @@ function! GetShIndent()
let ind = indent(lnum)
let line = getline(lnum)
- if line =~ '^\s*\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\)\>'
- if line !~ '\<\%(fi\|esac\|done\)\>\s*\%(#.*\)\=$'
+ if line =~ '^\s*\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\|foreach\)\>'
+ if line !~ '\<\%(fi\|esac\|done\|end\)\>\s*\%(#.*\)\=$'
let ind += s:indent_value('default')
endif
elseif s:is_case_label(line, pnum)
@@ -78,7 +79,7 @@ function! GetShIndent()
let pine = line
let line = getline(v:lnum)
- if line =~ '^\s*\%(then\|do\|else\|elif\|fi\|done\)\>' || line =~ '^\s*}'
+ if line =~ '^\s*\%(then\|do\|else\|elif\|fi\|done\|end\)\>' || line =~ '^\s*}'
let ind -= s:indent_value('default')
elseif line =~ '^\s*esac\>' && s:is_case_empty(getline(v:lnum - 1))
let ind -= s:indent_value('default')
diff --git a/runtime/makemenu.vim b/runtime/makemenu.vim
index b78fdfd601..839dbdac07 100644
--- a/runtime/makemenu.vim
+++ b/runtime/makemenu.vim
@@ -177,6 +177,7 @@ SynMenu DE.Doxygen.C\ with\ doxygen:c.doxygen
SynMenu DE.Doxygen.C++\ with\ doxygen:cpp.doxygen
SynMenu DE.Doxygen.IDL\ with\ doxygen:idl.doxygen
SynMenu DE.Doxygen.Java\ with\ doxygen:java.doxygen
+SynMenu DE.Doxygen.DataScript\ with\ doxygen:datascript.doxygen
SynMenu DE.Dracula:dracula
SynMenu DE.DSSSL:dsl
SynMenu DE.DTD:dtd
diff --git a/runtime/plugin/matchit.vim b/runtime/plugin/matchit.vim
index 74c1a1eb92..70867b1f93 100644
--- a/runtime/plugin/matchit.vim
+++ b/runtime/plugin/matchit.vim
@@ -303,7 +303,7 @@ fun! s:CleanUp(options, mode, startline, startcol, ...)
let regexp = s:Wholematch(matchline, a:1, currcol-1)
let endcol = matchend(matchline, regexp)
if endcol > currcol " This is NOT off by one!
- execute "normal!" . (endcol - currcol) . "l"
+ call cursor(0, endcol)
endif
endif " a:0
endif " a:mode != "o" && etc.
diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim
index 2db72a2b60..76f60131f2 100644
--- a/runtime/synmenu.vim
+++ b/runtime/synmenu.vim
@@ -161,6 +161,7 @@ an 50.30.290 &Syntax.DE.Doxygen.C\ with\ doxygen :cal SetSyn("c.doxygen")<CR>
an 50.30.300 &Syntax.DE.Doxygen.C++\ with\ doxygen :cal SetSyn("cpp.doxygen")<CR>
an 50.30.310 &Syntax.DE.Doxygen.IDL\ with\ doxygen :cal SetSyn("idl.doxygen")<CR>
an 50.30.320 &Syntax.DE.Doxygen.Java\ with\ doxygen :cal SetSyn("java.doxygen")<CR>
+an 50.30.320 &Syntax.DE.Doxygen.DataScript\ with\ doxygen :cal SetSyn("datascript.doxygen")<CR>
an 50.30.330 &Syntax.DE.Dracula :cal SetSyn("dracula")<CR>
an 50.30.340 &Syntax.DE.DSSSL :cal SetSyn("dsl")<CR>
an 50.30.350 &Syntax.DE.DTD :cal SetSyn("dtd")<CR>
diff --git a/runtime/syntax/datascript.vim b/runtime/syntax/datascript.vim
index 2b4ec513b4..a983b8e34c 100644
--- a/runtime/syntax/datascript.vim
+++ b/runtime/syntax/datascript.vim
@@ -1,11 +1,12 @@
" Vim syntax file
-" Language: Datascript
+" Language: DataScript
" Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
-" Last Change: 2014 Feb 26
+" Last Change: 2015 Jul 30
"
" DataScript is a formal language for modelling binary datatypes,
" bitstreams or file formats. For more information, see:
-" http://datascript.berlios.de/DataScriptLanguageOverview.html
+"
+" http://dstools.sourceforge.net/DataScriptLanguageOverview.html
if version < 600
syntax clear
@@ -19,6 +20,8 @@ syn keyword dsPackage import package
syn keyword dsType bit bool string
syn keyword dsType int int8 int16 int32 int64
syn keyword dsType uint8 uint16 uint32 uint64
+syn keyword dsType varint16 varint32 varint64
+syn keyword dsType varuint16 varuint32 varuint64
syn keyword dsType leint16 leint32 leint64
syn keyword dsType leuint16 leuint32 leuint64
syn keyword dsEndian little big
@@ -32,7 +35,8 @@ syn keyword dsOperator sizeof bitsizeof lengthof is sum forall in
syn keyword dsStorageClass const
syn keyword dsTodo contained TODO FIXME XXX
syn keyword dsSql sql sql_table sql_database sql_pragma sql_index
-syn keyword dsSql sql_integer sql_metadata sql_key foreign_key
+syn keyword dsSql sql_integer sql_metadata sql_key sql_virtual
+syn keyword dsSql using reference_key foreign_key to
" dsCommentGroup allows adding matches for special things in comments.
syn cluster dsCommentGroup contains=dsTodo
@@ -61,6 +65,8 @@ syn region dsComment
syn region dsString
\ start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
+syn sync ccomment dsComment
+
" Define the default highlighting.
hi def link dsType Type
hi def link dsEndian StorageClass
diff --git a/runtime/syntax/synload.vim b/runtime/syntax/synload.vim
index 48b5956b3c..6183f33a59 100644
--- a/runtime/syntax/synload.vim
+++ b/runtime/syntax/synload.vim
@@ -60,8 +60,8 @@ fun! s:SynSet()
endfun
-" Handle adding doxygen to other languages (C, C++, C#, IDL)
-au Syntax c,cpp,cs,idl,php
+" Handle adding doxygen to other languages (C, C++, C#, IDL, java, php, DataScript)
+au Syntax c,cpp,cs,idl,java,php,datascript
\ if (exists('b:load_doxygen_syntax') && b:load_doxygen_syntax)
\ || (exists('g:load_doxygen_syntax') && g:load_doxygen_syntax)
\ | runtime! syntax/doxygen.vim