Skip to content

Commit fd2995b

Browse files
committed
Runtime file updates.
1 parent 3f46d71 commit fd2995b

File tree

7 files changed

+163
-37
lines changed

7 files changed

+163
-37
lines changed

runtime/doc/autocmd.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 7.4. Last change: 2014 May 02
1+
*autocmd.txt* For Vim version 7.4. Last change: 2014 Aug 22
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/tags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3454,6 +3454,7 @@ CTRL-^ editing.txt /*CTRL-^*
34543454
CTRL-{char} intro.txt /*CTRL-{char}*
34553455
Chinese mbyte.txt /*Chinese*
34563456
Cmd-event autocmd.txt /*Cmd-event*
3457+
CmdUndefined autocmd.txt /*CmdUndefined*
34573458
Cmdline cmdline.txt /*Cmdline*
34583459
Cmdline-mode cmdline.txt /*Cmdline-mode*
34593460
CmdwinEnter autocmd.txt /*CmdwinEnter*

runtime/doc/todo.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*todo.txt* For Vim version 7.4. Last change: 2014 Aug 22
1+
*todo.txt* For Vim version 7.4. Last change: 2014 Aug 23
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -54,10 +54,6 @@ Regexp problems:
5454
Still using freed memory after using setloclist(). (lcd, 2014 Jul 23)
5555
More info Jul 24. Not clear why.
5656

57-
Patch for:
58-
CmdUndefined - Like FuncUndefined but for user commands.
59-
Yasuhiro Matsumoto, 2014 Aug 18
60-
6157
Patch to make getregtype() return the right size for non-linux systems.
6258
(Yasuhiro Matsumoto, 2014 Jul 8)
6359
Breaks test_eval. Inefficient, can we only compute y_width when needed?
@@ -265,7 +261,7 @@ Issue 28.
265261
Go through more coverity reports.
266262

267263
Patch to add ":undorecover", get as much text out of the undo file as
268-
possible. (Christian Brabandt, 2014 Mar 12, update Aug 16)
264+
possible. (Christian Brabandt, 2014 Mar 12, update Aug 22)
269265

270266
Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24)
271267

runtime/filetype.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim support file to detect file types
22
"
33
" Maintainer: Bram Moolenaar <Bram@vim.org>
4-
" Last Change: 2014 Aug 22
4+
" Last Change: 2014 Aug 23
55

66
" Listen very carefully, I will say this only once
77
if exists("did_load_filetypes")
@@ -1011,7 +1011,7 @@ au BufNewFile,BufRead *.jgr setf jgraph
10111011
au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
10121012

10131013
" JSON
1014-
au BufNewFile,BufRead *.json setf json
1014+
au BufNewFile,BufRead *.json,*.jsonp setf json
10151015

10161016
" Kixtart
10171017
au BufNewFile,BufRead *.kix setf kix

runtime/indent/html.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
" Header: "{{{
33
" Maintainer: Bram Moolenaar
44
" Original Author: Andy Wokula <anwoku@yahoo.de>
5-
" Last Change: 2014 Jul 04
5+
" Last Change: 2014 Aug 23
66
" Version: 1.0
77
" Description: HTML indent script with cached state for faster indenting on a
88
" range of lines.
@@ -497,7 +497,7 @@ func! s:FreshState(lnum)
497497
" If previous line ended in a closing tag, line up with the opening tag.
498498
if !swendtag && text =~ '</\w\+\s*>\s*$'
499499
call cursor(state.lnum, 99999)
500-
normal F<
500+
normal! F<
501501
let start_lnum = HtmlIndent_FindStartTag()
502502
if start_lnum > 0
503503
let state.baseindent = indent(start_lnum)
@@ -898,7 +898,7 @@ func! HtmlIndent()
898898
" a tag works very differently. Do not do this when the line starts with
899899
" "<", it gets the "htmlTag" ID but we are not inside a tag then.
900900
if curtext !~ '^\s*<'
901-
normal ^
901+
normal! ^
902902
let stack = synstack(v:lnum, col('.')) " assumes there are no tabs
903903
let foundHtmlString = 0
904904
for synid in reverse(stack)

runtime/syntax/json.vim

Lines changed: 139 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,143 @@
11
" Vim syntax file
2-
" Language: JSON
3-
" Maintainer: David Barnett <daviebdawg+vim@gmail.com>
4-
" Last Change: 2014 Jul 16
5-
6-
" For version 5.x: Clear all syntax items.
7-
" For version 6.x and later: Quit when a syntax file was already loaded.
8-
if exists('b:current_syntax')
9-
finish
2+
" Language: JSON
3+
" Maintainer: Eli Parra <eli@elzr.com>
4+
" Last Change: 2014 Aug 23
5+
" Version: 0.12
6+
7+
if !exists("main_syntax")
8+
if version < 600
9+
syntax clear
10+
elseif exists("b:current_syntax")
11+
finish
12+
endif
13+
let main_syntax = 'json'
14+
endif
15+
16+
syntax match jsonNoise /\%(:\|,\)/
17+
18+
" NOTE that for the concealing to work your conceallevel should be set to 2
19+
20+
" Syntax: Strings
21+
" Separated into a match and region because a region by itself is always greedy
22+
syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze[[:blank:]\r\n]*[,}\]]/ contains=jsonString
23+
if has('conceal')
24+
syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape contained
25+
else
26+
syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=jsonEscape contained
27+
endif
28+
29+
" Syntax: JSON does not allow strings with single quotes, unlike JavaScript.
30+
syn region jsonStringSQError oneline start=+'+ skip=+\\\\\|\\"+ end=+'+
31+
32+
" Syntax: JSON Keywords
33+
" Separated into a match and region because a region by itself is always greedy
34+
syn match jsonKeywordMatch /"\([^"]\|\\\"\)\+"[[:blank:]\r\n]*\:/ contains=jsonKeyword
35+
if has('conceal')
36+
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ concealends contained
37+
else
38+
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contained
39+
endif
40+
41+
" Syntax: Escape sequences
42+
syn match jsonEscape "\\["\\/bfnrt]" contained
43+
syn match jsonEscape "\\u\x\{4}" contained
44+
45+
" Syntax: Numbers
46+
syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>\ze[[:blank:]\r\n]*[,}\]]"
47+
48+
" ERROR WARNINGS **********************************************
49+
if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1)
50+
" Syntax: Strings should always be enclosed with quotes.
51+
syn match jsonNoQuotesError "\<[[:alpha:]][[:alnum:]]*\>"
52+
syn match jsonTripleQuotesError /"""/
53+
54+
" Syntax: An integer part of 0 followed by other digits is not allowed.
55+
syn match jsonNumError "-\=\<0\d\.\d*\>"
56+
57+
" Syntax: Decimals smaller than one should begin with 0 (so .1 should be 0.1).
58+
syn match jsonNumError "\:\@<=[[:blank:]\r\n]*\zs\.\d\+"
59+
60+
" Syntax: No comments in JSON, see http://stackoverflow.com/questions/244777/can-i-comment-a-json-file
61+
syn match jsonCommentError "//.*"
62+
syn match jsonCommentError "\(/\*\)\|\(\*/\)"
63+
64+
" Syntax: No semicolons in JSON
65+
syn match jsonSemicolonError ";"
66+
67+
" Syntax: No trailing comma after the last element of arrays or objects
68+
syn match jsonTrailingCommaError ",\_s*[}\]]"
69+
70+
" Syntax: Watch out for missing commas between elements
71+
syn match jsonMissingCommaError /\("\|\]\|\d\)\zs\_s\+\ze"/
72+
syn match jsonMissingCommaError /\(\]\|\}\)\_s\+\ze"/ "arrays/objects as values
73+
syn match jsonMissingCommaError /}\_s\+\ze{/ "objects as elements in an array
74+
syn match jsonMissingCommaError /\(true\|false\)\_s\+\ze"/ "true/false as value
75+
endif
76+
77+
" ********************************************** END OF ERROR WARNINGS
78+
" Allowances for JSONP: function call at the beginning of the file,
79+
" parenthesis and semicolon at the end.
80+
" Function name validation based on
81+
" http://stackoverflow.com/questions/2008279/validate-a-javascript-function-name/2008444#2008444
82+
syn match jsonPadding "\%^[[:blank:]\r\n]*[_$[:alpha:]][_$[:alnum:]]*[[:blank:]\r\n]*("
83+
syn match jsonPadding ");[[:blank:]\r\n]*\%$"
84+
85+
" Syntax: Boolean
86+
syn match jsonBoolean /\(true\|false\)\(\_s\+\ze"\)\@!/
87+
88+
" Syntax: Null
89+
syn keyword jsonNull null
90+
91+
" Syntax: Braces
92+
syn region jsonFold matchgroup=jsonBraces start="{" end=/}\(\_s\+\ze\("\|{\)\)\@!/ transparent fold
93+
syn region jsonFold matchgroup=jsonBraces start="\[" end=/]\(\_s\+\ze"\)\@!/ transparent fold
94+
95+
" Define the default highlighting.
96+
" For version 5.7 and earlier: only when not done already
97+
" For version 5.8 and later: only when an item doesn't have highlighting yet
98+
if version >= 508 || !exists("did_json_syn_inits")
99+
if version < 508
100+
let did_json_syn_inits = 1
101+
command -nargs=+ HiLink hi link <args>
102+
else
103+
command -nargs=+ HiLink hi def link <args>
104+
endif
105+
HiLink jsonPadding Operator
106+
HiLink jsonString String
107+
HiLink jsonTest Label
108+
HiLink jsonEscape Special
109+
HiLink jsonNumber Number
110+
HiLink jsonBraces Delimiter
111+
HiLink jsonNull Function
112+
HiLink jsonBoolean Boolean
113+
HiLink jsonKeyword Label
114+
115+
if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1)
116+
HiLink jsonNumError Error
117+
HiLink jsonCommentError Error
118+
HiLink jsonSemicolonError Error
119+
HiLink jsonTrailingCommaError Error
120+
HiLink jsonMissingCommaError Error
121+
HiLink jsonStringSQError Error
122+
HiLink jsonNoQuotesError Error
123+
HiLink jsonTripleQuotesError Error
124+
endif
125+
HiLink jsonQuote Quote
126+
HiLink jsonNoise Noise
127+
delcommand HiLink
128+
endif
129+
130+
let b:current_syntax = "json"
131+
if main_syntax == 'json'
132+
unlet main_syntax
10133
endif
11134

12-
" Use JavaScript syntax. JSON is a subset of JavaScript.
13-
runtime! syntax/javascript.vim
14-
unlet b:current_syntax
135+
" Vim settings
136+
" vim: ts=8 fdm=marker
15137

16-
let b:current_syntax = 'json'
138+
" MIT License
139+
" Copyright (c) 2013, Jeroen Ruigrok van der Werven, Eli Parra
140+
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
141+
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
142+
"THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
143+
"See https://twitter.com/elzr/status/294964017926119424

runtime/syntax/rst.vim

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
" Vim syntax file
22
" Language: reStructuredText documentation format
3-
" Maintainer: Nikolai Weibull <now@bitwi.se>
4-
" Latest Revision: 2013-11-26
3+
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
4+
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
5+
" Latest Revision: 2014-08-23
56

67
if exists("b:current_syntax")
78
finish
@@ -47,7 +48,7 @@ syn match rstSimpleTableLines contained display
4748
syn cluster rstDirectives contains=rstFootnote,rstCitation,
4849
\ rstHyperlinkTarget,rstExDirective
4950

50-
syn match rstExplicitMarkup '^\.\.\_s'
51+
syn match rstExplicitMarkup '^\s*\.\.\_s'
5152
\ nextgroup=@rstDirectives,rstComment,rstSubstitutionDefinition
5253

5354
let s:ReferenceName = '[[:alnum:]]\+\%([_.-][[:alnum:]]\+\)*'
@@ -99,11 +100,11 @@ function! s:DefineInlineMarkup(name, start, middle, end)
99100
\ ""
100101

101102
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, "'", "'")
102-
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '"', '"')
103-
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '(', ')')
104-
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\[', '\]')
105-
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '{', '}')
106-
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '<', '>')
103+
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '"', '"')
104+
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '(', ')')
105+
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\[', '\]')
106+
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '{', '}')
107+
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '<', '>')
107108

108109
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|[/:]\)', '')
109110

@@ -136,23 +137,24 @@ syn match rstStandaloneHyperlink contains=@NoSpell
136137
\ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]"
137138

138139
syn region rstCodeBlock contained matchgroup=rstDirective
139-
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\s+
140+
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\_s*\n\ze\z(\s\+\)+
140141
\ skip=+^$+
141-
\ end=+^\s\@!+
142+
\ end=+^\z1\@!+
142143
\ contains=@NoSpell
143144
syn cluster rstDirectives add=rstCodeBlock
144145

145146
if !exists('g:rst_syntax_code_list')
146-
let g:rst_syntax_code_list = ['vim', 'java', 'cpp', 'lisp', 'php', 'python', 'perl']
147+
let g:rst_syntax_code_list = ['vim', 'java', 'cpp', 'lisp', 'php',
148+
\ 'python', 'perl', 'sh']
147149
endif
148150

149151
for code in g:rst_syntax_code_list
150152
unlet! b:current_syntax
151153
exe 'syn include @rst'.code.' syntax/'.code.'.vim'
152154
exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold '
153-
\.'start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\s*$# '
155+
\.'start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)# '
154156
\.'skip=#^$# '
155-
\.'end=#^\s\@!# contains=@NoSpell,@rst'.code.' keepend'
157+
\.'end=#^\z1\@!# contains=@NoSpell,@rst'.code
156158
exe 'syn cluster rstDirectives add=rstDirective'.code
157159
endfor
158160

0 commit comments

Comments
 (0)