From 0f2d02569cd41e1ffac4195ec47b1ca9b3f08418 Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Fri, 23 Jan 2015 10:36:54 +0100 Subject: vim-patch:31f7581 Update runtime files and translations. https://code.google.com/p/vim/source/detail?r=31f7581068a9c3119e3bd2cd74160eb8282c3c6e --- runtime/doc/map.txt | 10 +++--- runtime/doc/todo.txt | 83 ++++++++++++++++++++++++++++---------------------- runtime/filetype.vim | 8 ++--- runtime/optwin.vim | 4 ++- runtime/syntax/j.vim | 42 ++++++++++++++----------- runtime/syntax/rst.vim | 13 ++++++-- 6 files changed, 94 insertions(+), 66 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 5f1c4a6261..1be2827c2c 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 7.4. Last change: 2014 Sep 30 +*map.txt* For Vim version 7.4. Last change: 2014 Oct 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -923,9 +923,11 @@ Examples: ({CURSOR} is where you type a non-keyword character) > < "test;;" is not expanded "test ;;" is expanded to "test " -To avoid the abbreviation in insert mode: Type part of the abbreviation, exit -insert mode with , re-enter insert mode with "a" and type the rest. Or -type CTRL-V before the character after the abbreviation. +To avoid the abbreviation in Insert mode: Type CTRL-V before the character +that would trigger the abbreviation. E.g. CTRL-V . Or type part of +the abbreviation, exit insert mode with , re-enter insert mode with "a" +and type the rest. + To avoid the abbreviation in Command-line mode: Type CTRL-V twice somewhere in the abbreviation to avoid it to be replaced. A CTRL-V in front of a normal character is mostly ignored otherwise. diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index b885b041d1..bfe67c2757 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.4. Last change: 2014 Oct 02 +*todo.txt* For Vim version 7.4. Last change: 2014 Oct 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -35,6 +35,8 @@ not be repeated below, unless there is extra information. -------------------- Known bugs and current work ----------------------- Regexp problems: +- The NFA engine does not implement the time limit passed to + nfa_regexec_multi() - Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@ -" Last Change: 2014 Sep 05 +" Last Change: 2014 Oct 09 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -1147,7 +1147,7 @@ au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple au BufNewFile,BufRead *.map setf map " Markdown -au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,README.md setf markdown +au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown " Mason au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason @@ -1239,8 +1239,8 @@ au BufNewFile,BufRead *.mod \ setf modsim3 | \ endif -" Modula 2 -au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.md,*.mi setf modula2 +" Modula 2 (.md removed in favor of Markdown) +au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.mi setf modula2 " Modula 3 (.m3, .i3, .mg, .ig) au BufNewFile,BufRead *.[mi][3g] setf modula3 diff --git a/runtime/optwin.vim b/runtime/optwin.vim index aebe02fe00..eb96bb7da3 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -1,7 +1,7 @@ " These commands create the option window. " " Maintainer: Bram Moolenaar -" Last Change: 2014 Aug 06 +" Last Change: 2014 Oct 09 " If there already is an option window, jump to that one. if bufwinnr("option-window") > 0 @@ -724,6 +724,7 @@ call OptionG("km", &km) call Header("editing text") call append("$", "undolevels\tmaximum number of changes that can be undone") +call append("$", "\t(global or local to buffer)") call append("$", " \tset ul=" . &ul) call append("$", "undoreload\tmaximum number lines to save for undo on a buffer reload") call append("$", " \tset ur=" . &ur) @@ -969,6 +970,7 @@ call BinOptionG("bk", &bk) call append("$", "backupskip\tpatterns that specify for which files a backup is not made") call append("$", " \tset bsk=" . &bsk) call append("$", "backupcopy\twhether to make the backup as a copy or rename the existing file") +call append("$", "\t(global or local to buffer)") call append("$", " \tset bkc=" . &bkc) call append("$", "backupdir\tlist of directories to put backup files in") call OptionG("bdir", &bdir) diff --git a/runtime/syntax/j.vim b/runtime/syntax/j.vim index bde954506e..0cdd59b887 100644 --- a/runtime/syntax/j.vim +++ b/runtime/syntax/j.vim @@ -2,7 +2,7 @@ " Language: J " Maintainer: David Bürgin <676c7473@gmail.com> " URL: https://github.com/glts/vim-j -" Last Change: 2014-05-25 +" Last Change: 2014-10-05 if exists('b:current_syntax') finish @@ -12,7 +12,7 @@ let s:save_cpo = &cpo set cpo&vim syntax case match -syntax sync minlines=50 +syntax sync minlines=100 syntax cluster jStdlibItems contains=jStdlibNoun,jStdlibAdverb,jStdlibConjunction,jStdlibVerb syntax cluster jPrimitiveItems contains=jNoun,jAdverb,jConjunction,jVerb,jCopula @@ -30,26 +30,32 @@ syntax keyword jStdlibVerb AND Endian IFDEF Note OR XOR alpha17 alpha27 anddf an syntax match jStdlibNoun /\<\%(adverb\|conjunction\|dyad\|monad\|noun\|verb\)\>/ syntax match jStdlibVerb /\<\%(assert\|break\|do\)\>\.\@!/ -" Numbers. Matching J numbers is difficult. The regular expression used for -" the general case roughly embodies this grammar sketch: +" Numbers. Matching J numbers is difficult. In fact, the job cannot be done +" with regular expressions alone. Below is a sketch of the pattern used. It +" accepts most well-formed numbers and rejects most of the ill-formed ones. +" See http://www.jsoftware.com/help/dictionary/dcons.htm for reference. " -" BASE := /_?\d+(\.\d*)?([eE]_?\d+)?/ -" RATIONAL := BASE | BASE r BASE -" COMPLEX := BASE | BASE (j|a[dr]) BASE -" JNUMBER := RATIONAL | RATIONAL [px] RATIONAL | COMPLEX | COMPLEX [px] COMPLEX +" "double1" and "double2" patterns: +" (_?\d+(\.\d*)?|_\.\d+)([eE]_?\d+)? +" (_?\d+(\.\d*)?|_\.\d+|\.\d+)([eE]_?\d+)? " -" The grammar is implemented as shown in this pseudo-regexp: +" "rational1" and "rational2" patterns: +" \k(r\k)?|__? +" \k(r\k)?|__? " -" base rational complex remainder -" /\< B ( [r]B ([px]B([r]B)?)? | (j|a[dr])B ([px]B((j|a[dr])B)?)? | [px]B ((j|a[dr]|r)B)? )?/ +" "complex1" and "complex2" patterns: +" \k((j|a[dr])\k)? +" \k((j|a[dr])\k)? " -" All in all, a compromise between correctness and practicality had to be -" made. See http://www.jsoftware.com/help/dictionary/dcons.htm for reference. -syntax match jNumber /\<_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(r_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(r_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\=\)\|\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\=\)\|\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\|r\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\)\=/ -syntax match jNumber /\<_\=\d\+\%([eE]\d\+\)\=b_\=[0-9a-z]\+\%(\.[0-9a-z]\+\)\=/ -syntax match jNumber /\<__\=\>/ -syntax match jNumber /\<_\./ -syntax match jNumber /\<_\=\d\+x\>/ +" "basevalue" pattern: +" _?[0-9a-z]+(\.[0-9a-z]*)?|_?\.[0-9a-z]+ +" +" all numbers: +" \b\k([px]\k)?(b\k)?(?![0-9A-Za-z_.]) +syntax match jNumber /\<_\.[0-9A-Za-z_.]\@!/ +syntax match jNumber /\<_\=\d\+x[0-9A-Za-z_.]\@!/ +syntax match jNumber /\<\%(__\=r_\=\d\+\|_\=\d\+r__\=\)[0-9A-Za-z_.]\@!/ +syntax match jNumber /\<\%(\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\)\%([eE]_\=\d\+\)\=\%(r\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\)\=\|__\=\)\%(\%(j\|a[dr]\)\%(\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\%(r\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\)\=\|__\=\)\)\=\%([px]\%(\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\%(r\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\)\=\|__\=\)\%(\%(j\|a[dr]\)\%(\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\%(r\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\)\=\|__\=\)\)\=\)\=\%(b\%(_\=[0-9a-z]\+\%(\.[0-9a-z]*\)\=\|_\=\.[0-9a-z]\+\)\)\=[0-9A-Za-z_.]\@!/ syntax region jString oneline start=/'/ skip=/''/ end=/'/ diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim index fce9e5dd3e..c1f25699e7 100644 --- a/runtime/syntax/rst.vim +++ b/runtime/syntax/rst.vim @@ -1,8 +1,8 @@ " Vim syntax file -" Language: reStructuredText documentation format -" Maintainer: Marshall Ward +" Language: reStructuredText documentation format +" Maintainer: Marshall Ward " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2014-08-23 +" Latest Revision: 2014-10-03 if exists("b:current_syntax") finish @@ -150,12 +150,19 @@ endif for code in g:rst_syntax_code_list unlet! b:current_syntax + " guard against setting 'isk' option which might cause problems (issue #108) + let prior_isk = &l:iskeyword exe 'syn include @rst'.code.' syntax/'.code.'.vim' exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold ' \.'start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)# ' \.'skip=#^$# ' \.'end=#^\z1\@!# contains=@NoSpell,@rst'.code exe 'syn cluster rstDirectives add=rstDirective'.code + " reset 'isk' setting, if it has been changed + if &l:iskeyword !=# prior_isk + let &l:iskeyword = prior_isk + endif + unlet! prior_isk endfor " TODO: Use better syncing. -- cgit