diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-01-14 19:42:21 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-01-14 19:42:21 +0100 |
commit | 83caecf31437c1e1af342186514f2a073ee1427e (patch) | |
tree | dbafd7f8242016c1d3337de12419e8632038468b /runtime | |
parent | d574ea2f80b271aff4bac7dc7fa83b292f0ac486 (diff) |
Updated runtime files.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/todo.txt | 35 | ||||
-rw-r--r-- | runtime/filetype.vim | 6 | ||||
-rw-r--r-- | runtime/ftplugin/j.vim | 32 | ||||
-rw-r--r-- | runtime/indent/j.vim | 22 | ||||
-rw-r--r-- | runtime/syntax/config.vim | 20 | ||||
-rw-r--r-- | runtime/syntax/j.vim | 16 |
6 files changed, 55 insertions, 76 deletions
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 12fc033180..7d53f86867 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -34,8 +34,6 @@ not be repeated below, unless there is extra information. *known-bugs* -------------------- Known bugs and current work ----------------------- -Crash report from Stephen Martin, 2015 Jan 12. - Regexp problems: - The NFA engine does not implement the time limit passed to nfa_regexec_multi() @@ -58,13 +56,6 @@ Regexp problems: "/\%(<\1>\)\@<=.*\%(<\/\(\w\+\)>\)\@=" matching text inside HTML tags. - Diff highlighting can be very slow. (Issue 309) -Patch to make Dynamic Ruby work with Ruby 2.2.0. (Ken Takata 2015 Jan 10) - -Update J runtime files. (glts, 2015 Jan 11) - -The range for :wincmd is not always a window number, can also be a column -count. Remove the range check. What to use for ":$wincmd"? - Still using freed memory after using setloclist(). (lcd, 2014 Jul 23) More info Jul 24. Not clear why. @@ -77,10 +68,6 @@ work. (ZyX, 2013 Sep 28) Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15) -Patch on Issue 292, recognizing polkit filetype. - -Issue 133: patch for config.vim, maintainer not responding. - ":cd C:\Windows\System32\drivers\etc*" does not work, even though the directory exists. (Sergio Gallelli, 2013 Dec 29) @@ -94,30 +81,8 @@ wrong name. (Aram, 2014 Nov 7) Vim 7.4. Value returned by virtcol() changes depending on how lines wrap. This is inconsistent with the documentation. -Ukrainian vimtutor. (Issue 288) - -Patch to fix that eval('$') does not give an error. Yasuhiro Matsumoto, 2015 -Jan 12. - -Regenerate the Unicode tables in mbyte.c. -Diff from ZyX, 2014 Dec 6. - -Patch to fix relative numbers. (Christian Brabandt, 2014 Nov 17) -Update Nov 26. - -Patch to improve config.vim syntax. Issue 305. Maintainer last update was in -2008. - -Patch on issue 310, matchadd() seems to hang. - -Patch to fix that getcurpos() returns a negative number, instead of MAXCOL. -(Hirohito Higashi, 2014 Dec 8) - Better greek spell checking. Issue 299. -Patch for wrong cursor positioning when 'linebreak' is set. (Christian -Brabandt, 2015 Jan 11) - Patch to fix wrong formatting if 'linebreak' is set. (Christian Brabandt, 2014 Nov 12) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 019345baf7..5ad76cc634 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: 2015 Jan 07 +" Last Change: 2015 Jan 14 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -2029,6 +2029,10 @@ func! s:FTRules() setf conf " Better than hog return endif + if path =~ '^/\(etc\|usr/share\)/polkit-1/rules\.d' + setf javascript + return + endif try let config_lines = readfile('/etc/udev/udev.conf') catch /^Vim\%((\a\+)\)\=:E484/ diff --git a/runtime/ftplugin/j.vim b/runtime/ftplugin/j.vim index bcd606ffa0..71ac4c5418 100644 --- a/runtime/ftplugin/j.vim +++ b/runtime/ftplugin/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-04-05 +" Last Change: 2015-01-11 if exists('b:did_ftplugin') finish @@ -16,39 +16,41 @@ setlocal iskeyword=48-57,A-Z,_,a-z setlocal comments=:NB. setlocal commentstring=NB.\ %s setlocal formatoptions-=t -setlocal shiftwidth=2 softtabstop=2 expandtab +setlocal shiftwidth=2 +setlocal softtabstop=2 +setlocal expandtab setlocal matchpairs=(:) let b:undo_ftplugin = 'setlocal matchpairs< expandtab< softtabstop< shiftwidth< formatoptions< commentstring< comments< iskeyword<' " Section movement with ]] ][ [[ []. The start/end patterns below are amended " inside the function in order to avoid matching on the current cursor line. -let s:sectionstart = '.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>.*' +let s:sectionstart = '\%(\s*Note\|.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\)\>.*' let s:sectionend = '\s*)\s*' function! s:SearchSection(end, backwards, visualmode) abort if a:visualmode !=# '' normal! gv endif - let flags = a:backwards ? 'bsW' : 'sW' + let l:flags = a:backwards ? 'bsW' : 'sW' if a:end - call search('^' . s:sectionend . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags) + call search('^' . s:sectionend . (a:backwards ? '\n\_.\{-}\%#' : '$'), l:flags) else - call search('^' . s:sectionstart . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags) + call search('^' . s:sectionstart . (a:backwards ? '\n\_.\{-}\%#' : '$'), l:flags) endif endfunction -noremap <script> <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, '')<CR> -xnoremap <script> <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, visualmode())<CR> +noremap <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, '')<CR> +xnoremap <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, visualmode())<CR> sunmap <buffer> ]] -noremap <script> <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, '')<CR> -xnoremap <script> <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, visualmode())<CR> +noremap <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, '')<CR> +xnoremap <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, visualmode())<CR> sunmap <buffer> ][ -noremap <script> <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, '')<CR> -xnoremap <script> <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, visualmode())<CR> +noremap <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, '')<CR> +xnoremap <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, visualmode())<CR> sunmap <buffer> [[ -noremap <script> <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, '')<CR> -xnoremap <script> <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, visualmode())<CR> +noremap <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, '')<CR> +xnoremap <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, visualmode())<CR> sunmap <buffer> [] let b:undo_ftplugin .= ' | silent! execute "unmap <buffer> ]]"' @@ -66,7 +68,7 @@ endif " Enhanced "%" matching (see ":help matchit") if exists('loaded_matchit') && !exists('b:match_words') let b:match_ignorecase = 0 - let b:match_words = '^.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>:^\s*\:\s*$:^\s*)\s*$' + let b:match_words = '^\%(\s*Note\|.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>:^\s*\:\s*$:^\s*)\s*$' \ . ',\<\%(for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.:\<\%(case\|catch[dt]\=\|else\%(if\)\=\|fcase\)\.:\<end\.' let b:undo_ftplugin .= ' | unlet! b:match_ignorecase b:match_words' endif diff --git a/runtime/indent/j.vim b/runtime/indent/j.vim index e268e1fcd3..ea3d50936b 100644 --- a/runtime/indent/j.vim +++ b/runtime/indent/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-04-05 +" Last Change: 2015-01-11 if exists('b:did_indent') finish @@ -26,25 +26,25 @@ if !exists('g:j_indent_definitions') endif function GetJIndent() abort - let prevlnum = prevnonblank(v:lnum-1) - if prevlnum == 0 + let l:prevlnum = prevnonblank(v:lnum - 1) + if l:prevlnum == 0 return 0 endif - let indent = indent(prevlnum) - let prevline = getline(prevlnum) - if prevline =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.\%(\%(\<end\.\)\@!.\)*$' + let l:indent = indent(l:prevlnum) + let l:prevline = getline(l:prevlnum) + if l:prevline =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.\%(\%(\<end\.\)\@!.\)*$' " Increase indentation after an initial control word that starts or " continues a block and is not terminated by "end." - let indent += shiftwidth() - elseif g:j_indent_definitions && (prevline =~# '\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>' || prevline =~# '^\s*:\s*$') + let l:indent += shiftwidth() + elseif g:j_indent_definitions && (l:prevline =~# '\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>' || l:prevline =~# '^\s*:\s*$') " Increase indentation in explicit definitions of adverbs, conjunctions, " and verbs - let indent += shiftwidth() + let l:indent += shiftwidth() endif " Decrease indentation in lines that start with either control words that " continue or end a block, or the special items ")" and ":" if getline(v:lnum) =~# '^\s*\%()\|:\|\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|end\|fcase\)\.\)' - let indent -= shiftwidth() + let l:indent -= shiftwidth() endif - return indent + return l:indent endfunction diff --git a/runtime/syntax/config.vim b/runtime/syntax/config.vim index 20ca19ced0..cd83b24352 100644 --- a/runtime/syntax/config.vim +++ b/runtime/syntax/config.vim @@ -1,11 +1,13 @@ " Vim syntax file " Language: configure.in script: M4 with sh " Maintainer: Christian Hammesr <ch@lathspell.westend.com> -" Last Change: 2008 Sep 03 +" Last Change: 2015 Jan 14 +" (patch from Yngve Inntjore Levinsen to detect AC_MSG) +" (patch from Khym Chanur to add @Spell) " Well, I actually even do not know much about m4. This explains why there " is probably very much missing here, yet ! -" But I missed a good hilighting when editing my GNU autoconf/automake +" But I missed good highlighting when editing my GNU autoconf/automake " script, so I wrote this quick and dirty patch. @@ -20,14 +22,19 @@ endif " define the config syntax syn match configdelimiter "[()\[\];,]" syn match configoperator "[=|&\*\+\<\>]" -syn match configcomment "\(dnl.*\)\|\(#.*\)" +syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell syn match configfunction "\<[A-Z_][A-Z0-9_]*\>" syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>" +syn keyword configDnl dnl contained syn keyword configkeyword if then else fi test for in do done syn keyword configspecial cat rm eval -syn region configstring start=+"+ skip=+\\"+ end=+"+ -syn region configstring start=+'+ skip=+\\'+ end=+'+ -syn region configstring start=+`+ skip=+\\'+ end=+`+ + +" This shortens the script, see syn-ext-match.. +syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell + +" Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string. +syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell +syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell " Define the default highlighting. " For version 5.7 and earlier: only when not done already @@ -43,6 +50,7 @@ if version >= 508 || !exists("did_config_syntax_inits") HiLink configdelimiter Delimiter HiLink configoperator Operator HiLink configcomment Comment + HiLink configDnl Comment HiLink configfunction Function HiLink confignumber Number HiLink configkeyword Keyword diff --git a/runtime/syntax/j.vim b/runtime/syntax/j.vim index 0cdd59b887..4912942e8b 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-10-05 +" Last Change: 2015-01-11 if exists('b:current_syntax') finish @@ -23,12 +23,12 @@ syntax match jControl /\<\%(for\|goto\|label\)_\a\k*\./ " Standard library names. A few names need to be defined with ":syntax match" " because they would otherwise take precedence over the corresponding jControl " and jDefineExpression items. -syntax keyword jStdlibNoun ARGV BINPATH CR CRLF DEL Debug EAV EMPTY FF FHS IF64 IFIOS IFJCDROID IFJHS IFQT IFRASPI IFUNIX IFWIN IFWINCE IFWINE IFWOW64 JB01 JBOXED JCHAR JCMPX JFL JINT JPTR JSIZES JSTR JTYPES JVERSION LF LF2 TAB UNAME UNXLIB andurl dbhelp libjqt -syntax keyword jStdlibAdverb define each every fapplylines inv inverse items leaf rows table +syntax keyword jStdlibNoun ARGV BINPATH CR CRLF DEL Debug EAV EMPTY FF FHS IF64 IFIOS IFJCDROID IFJHS IFQT IFRASPI IFUNIX IFWIN IFWINCE IFWINE IFWOW64 JB01 JBOXED JCHAR JCMPX JFL JINT JPTR JSIZES JSTR JTYPES JVERSION LF LF2 TAB UNAME UNXLIB dbhelp libjqt +syntax keyword jStdlibAdverb define each every fapplylines inv inverse items leaf rows rxapply rxmerge table syntax keyword jStdlibConjunction bind cuts def on -syntax keyword jStdlibVerb AND Endian IFDEF Note OR XOR alpha17 alpha27 anddf android_exec_host andunzip apply boxopen boxxopen bx calendar cd cdcb cder cderx cdf charsub chopstring clear coclass cocreate cocurrent codestroy coerase cofind cofindv cofullname coinfo coinsert coname conames conew conl conouns conounsx copath copathnl copathnlx coreset costate cut cutLF cutopen cutpara datatype dbctx dberm dberr dbg dbjmp dblocals dblxq dblxs dbnxt dbq dbr dbret dbrr dbrrx dbrun dbs dbsig dbsq dbss dbst dbstack dbstk dbstop dbstopme dbstopnext dbstops dbtrace dbview deb debc delstring detab dfh dir dircompare dircompares dirfind dirpath dirss dirssrplc dirtree dirused dlb dltb dltbs dquote drop dropafter dropto dtb dtbs echo empty endian erase evtloop exit expand f2utf8 fappend fappends fboxname fc fcopynew fdir ferase fetch fexist fexists fgets file2url fixdotdot fliprgb fmakex foldpara foldtext fpathcreate fpathname fputs fread freadblock freadr freads frename freplace fsize fss fssrplc fstamp fstringreplace ftype fview fwrite fwritenew fwrites getargs getdate getenv getqtbin hfd hostpathsep ic install iospath isatty isotimestamp isutf8 jcwdpath joinstring jpathsep jsystemdefs list ljust load loadd mema memf memr memw nameclass namelist names nc nl pick quote require rjust rplc script scriptd setbreak show sign sminfo smoutput sort split splitnostring splitstring ss startupandroid startupconsole startupide stderr stdin stdout stringreplace symdat symget symset take takeafter taketo timespacex timestamp timex tmoutput toCRLF toHOST toJ todate todayno tolower topara toupper tsdiff tsrep tstamp type ucp ucpcount unxlib usleep utf8 uucp valdate wcsize weekday weeknumber weeksinyear winpathsep +syntax keyword jStdlibVerb AND Endian IFDEF OR XOR anddf android_exec_am android_exec_host andunzip apply boxopen boxxopen bx calendar cd cdcb cder cderx cdf charsub chopstring cleartags clear coclass cocreate cocurrent codestroy coerase cofind cofindv cofullname coinfo coinsert compare coname conames conew conl conouns conounsx copath copathnl copathnlx coreset costate cut cutLF cutopen cutpara datatype dbctx dberm dberr dbg dbjmp dblocals dblxq dblxs dbnxt dbq dbr dbret dbrr dbrrx dbrun dbs dbsig dbsq dbss dbst dbstack dbstk dbstop dbstopme dbstopnext dbstops dbtrace dbview deb debc delstring detab dfh dir dircompare dircompares dirfind dirpath dirss dirssrplc dirtree dirused dlb dltb dltbs dquote drop dropafter dropto dtb dtbs echo empty endian erase evtloop exit expand f2utf8 fappend fappends fboxname fc fcompare fcompares fcopynew fdir ferase fetch fexist fexists fgets file2url fixdotdot fliprgb fmakex foldpara foldtext fpathcreate fpathname fputs fread freadblock freadr freads frename freplace fsize fss fssrplc fstamp fstringreplace ftype fview fwrite fwritenew fwrites getalpha getargs getdate getenv getqtbin hfd hostpathsep ic install iospath isatty isotimestamp isutf8 jcwdpath joinstring jpath jpathsep jsystemdefs launch list ljust load loadd loadtags mema memf memr memw nameclass namelist names nc nl pick quote require rjust rplc rxE rxall rxcomp rxcut rxeq rxerror rxfirst rxfree rxfrom rxhandles rxin rxindex rxinfo rxmatch rxmatches rxrplc rxutf8 script scriptd scripts setalpha setbreak shell show sign sminfo smoutput sort split splitnostring splitstring ss startupandroid startupconsole startupide stderr stdin stdout stringreplace symdat symget symset ta tagcp tagopen tagselect take takeafter taketo timespacex timestamp timex tmoutput toCRLF toHOST toJ todate todayno tolower topara toupper tsdiff tsrep tstamp type ucp ucpcount unxlib usleep utf8 uucp valdate wcsize weekday weeknumber weeksinyear winpathsep xedit syntax match jStdlibNoun /\<\%(adverb\|conjunction\|dyad\|monad\|noun\|verb\)\>/ -syntax match jStdlibVerb /\<\%(assert\|break\|do\)\>\.\@!/ +syntax match jStdlibVerb /\<\%(Note\|\%(assert\|break\|do\)\.\@!\)\>/ " 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 @@ -75,12 +75,12 @@ syntax match jConjunction /;\.\|\^:\|![.:]/ " the next line. The trick is to split the problem into two regions and link " them with "nextgroup=". The fold wrapper provides syntax folding. syntax region jNounDefineFold - \ matchgroup=NONE start=/\<\%(\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>\)\@=/ + \ matchgroup=NONE start=/\%(\%(\%(^\s*Note\)\|\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>\)\@=/ \ keepend matchgroup=NONE end=/^\s*)\s*$/ \ contains=jNounDefineStart \ fold syntax region jNounDefineStart - \ matchgroup=jDefineExpression start=/\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>/ + \ matchgroup=jDefineExpression start=/\%(\%(^\s*Note\)\|\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>/ \ keepend matchgroup=NONE end=/$/ \ contains=@jStdlibItems,@jPrimitiveItems,jNumber,jString,jParenGroup,jParen,jComment \ contained oneline skipempty nextgroup=jDefineEnd,jNounDefine @@ -112,7 +112,7 @@ syntax region jParenGroup \ oneline transparent syntax keyword jTodo contained TODO FIXME XXX -syntax match jComment /NB\..*$/ contains=jTodo,@Spell +syntax match jComment /\<NB\..*$/ contains=jTodo,@Spell syntax match jSharpBang /\%^#!.*$/ |