From 3d86857f28f0c9b93c5f56c8ce846ddd26ddbf38 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 28 Apr 2021 01:30:18 -0400 Subject: [PATCH] vim-patch:2cfb4a2a7248 Update runtime files https://github.com/vim/vim/commit/2cfb4a2a7248eeb40112bb482ab5b15f01b20433 --- runtime/ftplugin/dosbatch.vim | 13 +++++++++++-- runtime/plugin/gzip.vim | 6 +++++- runtime/syntax/asciidoc.vim | 22 +++++++++++----------- runtime/syntax/make.vim | 4 ++-- runtime/syntax/masm.vim | 7 ++++--- 5 files changed, 33 insertions(+), 19 deletions(-) diff --git a/runtime/ftplugin/dosbatch.vim b/runtime/ftplugin/dosbatch.vim index 070bdc4ba2..0c5cde2503 100644 --- a/runtime/ftplugin/dosbatch.vim +++ b/runtime/ftplugin/dosbatch.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: MS-DOS .bat files " Maintainer: Mike Williams -" Last Change: 14th April 2019 +" Last Change: 7th May 2020 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -19,12 +19,21 @@ setlocal comments=b:rem,b:@rem,b:REM,b:@REM,::: setlocal commentstring=::\ %s setlocal formatoptions-=t formatoptions+=rol +" Lookup DOS keywords using Windows command help. +if executable('help.exe') + if has('terminal') + setlocal keywordprg=:term\ help.exe + else + setlocal keywordprg=help.exe + endif +endif + " Define patterns for the browse file filter if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\nAll Files (*.*)\t*.*\n" endif -let b:undo_ftplugin = "setlocal comments< formatoptions<" +let b:undo_ftplugin = "setlocal comments< formatoptions< keywordprg<" \ . "| unlet! b:browsefiler" let &cpo = s:cpo_save diff --git a/runtime/plugin/gzip.vim b/runtime/plugin/gzip.vim index 5e13b92d1e..ffc00f6fd6 100644 --- a/runtime/plugin/gzip.vim +++ b/runtime/plugin/gzip.vim @@ -20,7 +20,7 @@ augroup gzip " " Set binary mode before reading the file. " Use "gzip -d", gunzip isn't always available. - autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst setlocal bin + autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst,*.br setlocal bin autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn") autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d") autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress") @@ -28,6 +28,7 @@ augroup gzip autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d") autocmd BufReadPost,FileReadPost *.lz call gzip#read("lzip -d") autocmd BufReadPost,FileReadPost *.zst call gzip#read("zstd -d --rm") + autocmd BufReadPost,FileReadPost *.br call gzip#read("brotli -d --rm") autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip") autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2") autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f") @@ -35,6 +36,7 @@ augroup gzip autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z") autocmd BufWritePost,FileWritePost *.lz call gzip#write("lzip") autocmd BufWritePost,FileWritePost *.zst call gzip#write("zstd --rm") + autocmd BufWritePost,FileWritePost *.br call gzip#write("brotli --rm") autocmd FileAppendPre *.gz call gzip#appre("gzip -dn") autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d") autocmd FileAppendPre *.Z call gzip#appre("uncompress") @@ -42,6 +44,7 @@ augroup gzip autocmd FileAppendPre *.xz call gzip#appre("xz -d") autocmd FileAppendPre *.lz call gzip#appre("lzip -d") autocmd FileAppendPre *.zst call gzip#appre("zstd -d --rm") + autocmd FileAppendPre *.br call gzip#appre("brotli -d --rm") autocmd FileAppendPost *.gz call gzip#write("gzip") autocmd FileAppendPost *.bz2 call gzip#write("bzip2") autocmd FileAppendPost *.Z call gzip#write("compress -f") @@ -49,4 +52,5 @@ augroup gzip autocmd FileAppendPost *.xz call gzip#write("xz -z") autocmd FileAppendPost *.lz call gzip#write("lzip") autocmd FileAppendPost *.zst call gzip#write("zstd --rm") + autocmd FileAppendPost *.br call gzip#write("brotli --rm") augroup END diff --git a/runtime/syntax/asciidoc.vim b/runtime/syntax/asciidoc.vim index ccb079e06b..29451f9eab 100644 --- a/runtime/syntax/asciidoc.vim +++ b/runtime/syntax/asciidoc.vim @@ -1,13 +1,15 @@ " Vim syntax file -" Language: AsciiDoc -" Author: Stuart Rackham (inspired by Felix -" Obenhuber's original asciidoc.vim script). -" URL: http://asciidoc.org/ -" Licence: GPL (http://www.gnu.org) -" Remarks: Vim 6 or greater -" Last Update: 2014 Aug 29 (see Issue 240) +" Language: AsciiDoc +" Maintainer: @aerostitch on GitHub (tag me in your issue in the +" github/vim/vim repository and I'll answer when available) +" Original author: Stuart Rackham (inspired by Felix +" Obenhuber's original asciidoc.vim script). +" URL: http://asciidoc.org/ +" Licence: GPL (http://www.gnu.org) +" Remarks: Vim 6 or greater +" Last Update: 2020 May 03 (see Issue 240) " Limitations: -" +" " - Nested quoted text formatting is highlighted according to the outer " format. " - If a closing Example Block delimiter may be mistaken for a title @@ -23,9 +25,7 @@ if exists("b:current_syntax") finish endif -syn clear -syn sync fromstart -syn sync linebreaks=100 +" Use the default syntax syncing. " Run :help syn-priority to review syntax matching priority. syn keyword asciidocToDo TODO FIXME CHECK TEST XXX ZZZ DEPRECATED diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim index 2a64dcd85c..d0d7f1523b 100644 --- a/runtime/syntax/make.vim +++ b/runtime/syntax/make.vim @@ -3,7 +3,7 @@ " Maintainer: Roland Hieber , " Previous Maintainer: Claudio Fleiner " URL: https://github.com/vim/vim/blob/master/runtime/syntax/make.vim -" Last Change: 2020 Mar 04 +" Last Change: 2020 May 03 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -73,7 +73,7 @@ syn match makePreCondit "^ *\(ifn\=\(eq\|def\)\>\|else\(\s\+ifn\=\(eq\|def\)\)\= syn match makeInclude "^ *[-s]\=include\s.*$" syn match makeStatement "^ *vpath" syn match makeExport "^ *\(export\|unexport\)\>" -syn match makeOverride "^ *override" +syn match makeOverride "^ *override\>" " Statements / Functions (GNU make) syn match makeStatement contained "(\(abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|file\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|guile\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|subst\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 diff --git a/runtime/syntax/masm.vim b/runtime/syntax/masm.vim index bb3c9681bc..abee78b86d 100644 --- a/runtime/syntax/masm.vim +++ b/runtime/syntax/masm.vim @@ -2,8 +2,7 @@ " Language: Microsoft Macro Assembler (80x86) " Orig Author: Rob Brady " Maintainer: Wu Yongwei -" Last Change: $Date: 2013/11/13 11:49:24 $ -" $Revision: 1.48 $ +" Last Change: 2020-05-07 17:04:10 +0800 " Quit when a syntax file was already loaded if exists("b:current_syntax") @@ -13,10 +12,12 @@ endif let s:cpo_save = &cpo set cpo&vim +setlocal iskeyword=@,48-57,_,36,60,62,63,@-@ + syn case ignore -syn match masmIdentifier "[@a-z_$?][@a-z0-9_$?]*" +syn match masmIdentifier "[@a-z_$?][@a-z0-9_$?<>]*" syn match masmLabel "^\s*[@a-z_$?][@a-z0-9_$?]*:"he=e-1 syn match masmDecimal "[-+]\?\d\+[dt]\?"