diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-29 20:43:22 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-29 21:08:09 -0400 |
commit | 9f54d125d2b601029cb2b6dbffcc361c2e8fb974 (patch) | |
tree | 6670d7d22bb7808feec25f08ee155b0eedb7f531 | |
parent | 09f3e62bc623dd3cbcbc708b019b55a8b9449de7 (diff) | |
download | rneovim-9f54d125d2b601029cb2b6dbffcc361c2e8fb974.tar.gz rneovim-9f54d125d2b601029cb2b6dbffcc361c2e8fb974.tar.bz2 rneovim-9f54d125d2b601029cb2b6dbffcc361c2e8fb974.zip |
vim-patch:3d1cde8a2f28
Update runtime files.
https://github.com/vim/vim/commit/3d1cde8a2f28dce2c82d2b2b4c5e35e6662030e0
-rw-r--r-- | runtime/compiler/checkstyle.vim | 20 | ||||
-rw-r--r-- | runtime/compiler/gawk.vim | 34 | ||||
-rw-r--r-- | runtime/compiler/gjs.vim | 25 | ||||
-rw-r--r-- | runtime/compiler/jest.vim | 30 | ||||
-rw-r--r-- | runtime/compiler/jjs.vim | 24 | ||||
-rw-r--r-- | runtime/compiler/jshint.vim | 25 | ||||
-rw-r--r-- | runtime/compiler/jsonlint.vim | 25 | ||||
-rw-r--r-- | runtime/compiler/rubocop.vim | 23 | ||||
-rw-r--r-- | runtime/compiler/stylelint.vim | 26 | ||||
-rw-r--r-- | runtime/compiler/typedoc.vim | 28 | ||||
-rw-r--r-- | runtime/doc/cmdline.txt | 3 | ||||
-rw-r--r-- | runtime/doc/quickfix.txt | 2 | ||||
-rw-r--r-- | runtime/doc/recover.txt | 4 | ||||
-rw-r--r-- | runtime/doc/repeat.txt | 4 | ||||
-rw-r--r-- | runtime/doc/spell.txt | 2 | ||||
-rw-r--r-- | runtime/doc/usr_41.txt | 50 | ||||
-rw-r--r-- | runtime/doc/windows.txt | 4 | ||||
-rw-r--r-- | runtime/ftplugin/cobol.vim | 5 | ||||
-rw-r--r-- | runtime/ftplugin/css.vim | 7 | ||||
-rw-r--r-- | runtime/ftplugin/vim.vim | 5 | ||||
-rw-r--r-- | runtime/scripts.vim | 4 | ||||
-rw-r--r-- | runtime/syntax/c.vim | 9 | ||||
-rw-r--r-- | runtime/tools/check_colors.vim | 2 |
23 files changed, 309 insertions, 52 deletions
diff --git a/runtime/compiler/checkstyle.vim b/runtime/compiler/checkstyle.vim index ccab3c585d..4ebd9e15b5 100644 --- a/runtime/compiler/checkstyle.vim +++ b/runtime/compiler/checkstyle.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Checkstyle " Maintainer: Doug Kearns <dougkearns@gmail.com> -" Last Change: 2013 Jun 26 +" Last Change: 2020 Aug 2 if exists("current_compiler") finish @@ -12,8 +12,18 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif -CompilerSet makeprg=java\ com.puppycrawl.tools.checkstyle.Main\ -f\ plain +let s:cpo_save = &cpo +set cpo&vim -" sample error: WebTable.java:282: '+=' is not preceded with whitespace. -" WebTable.java:201:1: '{' should be on the previous line. -CompilerSet errorformat=%f:%l:%v:\ %m,%f:%l:\ %m,%-G%.%# +" CompilerSet makeprg=java\ com.puppycrawl.tools.checkstyle.Main\ -f\ plain\ -c\ /sun_checks.xml +" CompilerSet makeprg=java\ -jar\ checkstyle-X.XX-all.jar\ -f\ plain\ -c\ /sun_checks.xml + +CompilerSet makeprg=checkstyle\ -f\ plain +CompilerSet errorformat=[%tRROR]\ %f:%l:%v:\ %m, + \[%tARN]\ %f:%l:%v:\ %m, + \[%tRROR]\ %f:%l:\ %m, + \[%tARN]\ %f:%l:\ %m, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/gawk.vim b/runtime/compiler/gawk.vim new file mode 100644 index 0000000000..a109eb8642 --- /dev/null +++ b/runtime/compiler/gawk.vim @@ -0,0 +1,34 @@ +" Vim compiler file +" Compiler: GNU Awk +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2020 Feb 10 + +if exists("current_compiler") + finish +endif +let current_compiler = "gawk" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet makeprg=gawk +CompilerSet errorformat=%Z%.awk:\ %f:%l:\ %p^\ %m, + \%Eg%\\=awk:\ %f:%l:\ fatal:\ %m, + \%Egawk:\ %f:%l:\ error:\ %m, + \%Wgawk:\ %f:%l:\ warning:\ %m, + \%Egawk:\ %f:%l:\ %.%#, + \gawk:\ %f:%l:\ %tatal:\ %m, + \gawk:\ %f:%l:\ %trror:\ %m, + \gawk:\ %f:%l:\ %tarning:\ %m, + \gawk:\ %tatal:\ %m, + \gawk:\ %trror:\ %m, + \gawk:\ %tarning:\ %m, + \%+C%.%#, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/gjs.vim b/runtime/compiler/gjs.vim new file mode 100644 index 0000000000..e033764030 --- /dev/null +++ b/runtime/compiler/gjs.vim @@ -0,0 +1,25 @@ +" Vim compiler file +" Compiler: GJS (Gnome JavaScript Bindings) +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2019 Jul 10 + +if exists("current_compiler") + finish +endif +let current_compiler = "gjs" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet makeprg=gjs +CompilerSet errorformat=%.%#JS\ %tRROR:\ %m\ @\ %f:%c, + \%E%.%#JS\ ERROR:\ %m, + \%Z@%f:%l:%c, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/jest.vim b/runtime/compiler/jest.vim new file mode 100644 index 0000000000..fee70b7c55 --- /dev/null +++ b/runtime/compiler/jest.vim @@ -0,0 +1,30 @@ +" Vim compiler file +" Compiler: Jest +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2018 May 15 + +if exists("current_compiler") + finish +endif +let current_compiler = "jest" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo&vim + +" CompilerSet makeprg=npx\ jest\ --no-colors + +CompilerSet makeprg=jest\ --no-colors +CompilerSet errorformat=%E\ \ ●\ %m, + \%Z\ %\\{4}%.%#Error:\ %f:\ %m\ (%l:%c):%\\=, + \%Z\ %\\{6}at\ %\\S%#\ (%f:%l:%c), + \%+C\ %\\{4}%\\w%.%#, + \%+C\ %\\{4}%[-+]%.%#, + \%-C%.%#, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/jjs.vim b/runtime/compiler/jjs.vim new file mode 100644 index 0000000000..09a973683a --- /dev/null +++ b/runtime/compiler/jjs.vim @@ -0,0 +1,24 @@ +" Vim compiler file +" Compiler: Nashorn Shell +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2018 Jan 9 + +if exists("current_compiler") + finish +endif +let current_compiler = "jjs" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet makeprg=jjs +CompilerSet errorformat=%f:%l:%c\ %m, + \%f:%l\ %m, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/jshint.vim b/runtime/compiler/jshint.vim new file mode 100644 index 0000000000..865591cd2b --- /dev/null +++ b/runtime/compiler/jshint.vim @@ -0,0 +1,25 @@ +" Vim compiler file +" Compiler: JSHint +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2019 Jul 10 + +if exists("current_compiler") + finish +endif +let current_compiler = "jshint" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo&vim + +" CompilerSet makeprg=npx\ jshint\ --verbose + +CompilerSet makeprg=jshint\ --verbose +CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m\ (%t%n), + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/jsonlint.vim b/runtime/compiler/jsonlint.vim new file mode 100644 index 0000000000..5466dcc7f4 --- /dev/null +++ b/runtime/compiler/jsonlint.vim @@ -0,0 +1,25 @@ +" Vim compiler file +" Compiler: JSON Lint +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2019 Jul 10 + +if exists("current_compiler") + finish +endif +let current_compiler = "jsonlint" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo&vim + +" CompilerSet makeprg=npx\ jsonlint\ --compact\ --quiet + +CompilerSet makeprg=jsonlint\ --compact\ --quiet +CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ found:\ %m, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/rubocop.vim b/runtime/compiler/rubocop.vim new file mode 100644 index 0000000000..7764b4ad20 --- /dev/null +++ b/runtime/compiler/rubocop.vim @@ -0,0 +1,23 @@ +" Vim compiler file +" Compiler: RuboCop +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2019 Jul 10 + +if exists("current_compiler") + finish +endif +let current_compiler = "rubocop" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet makeprg=rubocop\ --format\ emacs +CompilerSet errorformat=%f:%l:%c:\ %t:\ %m, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/stylelint.vim b/runtime/compiler/stylelint.vim new file mode 100644 index 0000000000..784a61d46a --- /dev/null +++ b/runtime/compiler/stylelint.vim @@ -0,0 +1,26 @@ +" Vim compiler file +" Compiler: Stylelint +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2020 Jun 10 + +if exists("current_compiler") + finish +endif +let current_compiler = "stylelint" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo&vim + +" CompilerSet makeprg=npx\ stylelint\ --formatter\ compact + +CompilerSet makeprg=stylelint\ --formatter\ compact +CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ -\ %m, + \%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ -\ %m, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/typedoc.vim b/runtime/compiler/typedoc.vim new file mode 100644 index 0000000000..3be06f3d4e --- /dev/null +++ b/runtime/compiler/typedoc.vim @@ -0,0 +1,28 @@ +" Vim compiler file +" Compiler: TypeDoc +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2020 Feb 10 + +if exists("current_compiler") + finish +endif +let current_compiler = "typedoc" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo&vim + +" CompilerSet makeprg=npx\ typedoc + +CompilerSet makeprg=typedoc +CompilerSet errorformat=%EError:\ %f(%l), + \%WWarning:\ %f(%l), + \%+IDocumentation\ generated\ at\ %f, + \%Z\ %m, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 10fcd69c28..52b7711e20 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -1080,7 +1080,8 @@ CTRL-C Continue in Command-line mode. The command-line under the in Normal mode. There is no redraw, thus the window will remain visible. :quit Discard the command line and go back to Normal mode. - ":close", ":exit", ":xit" and CTRL-\ CTRL-N also work. + ":close", CTRL-W c, ":exit", ":xit" and CTRL-\ CTRL-N also + work. :qall Quit Vim, unless there are changes in some buffer. :qall! Quit Vim, discarding changes to any buffer. diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 1a08d6d51f..469adb6a12 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1657,7 +1657,7 @@ special problem here is that it doesn't print information on leaving the directory and that it doesn't print the absolute path. To solve the problem with relative paths and missing "leave directory" -messages Vim uses following algorithm: +messages Vim uses the following algorithm: 1) Check if the given directory is a subdirectory of the current directory. If this is true, store it as the current directory. diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt index 9a8caefb42..9ef5a37452 100644 --- a/runtime/doc/recover.txt +++ b/runtime/doc/recover.txt @@ -56,8 +56,8 @@ Disadvantages: directories (although Vim tries to avoid that by comparing the path name). This will result in bogus ATTENTION warning messages. - When you use your home directory, and somebody else tries to edit the same - file, he will not see your swap file and will not get the ATTENTION warning - message. + file, that user will not see your swap file and will not get the ATTENTION + warning message. If you want to put swap files in a fixed place, put a command resembling the following ones in your vimrc: diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index fb41c459f1..0c45488578 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -597,7 +597,7 @@ This assumes you write one or more plugins that you distribute as a package. If you have two unrelated plugins you would use two packages, so that Vim users can choose what they include or not. Or you can decide to use one -package with optional plugins, and tell the user to add the ones he wants with +package with optional plugins, and tell the user to add the preferred ones with `:packadd`. Decide how you want to distribute the package. You can create an archive or @@ -633,7 +633,7 @@ You could add this packadd command in one of your plugins, to be executed when the optional plugin is needed. Run the `:helptags` command to generate the doc/tags file. Including this -generated file in the package means that the user can drop the package in his +generated file in the package means that the user can drop the package in the pack directory and the help command works right away. Don't forget to re-run the command after changing the plugin help: > :helptags path/start/foobar/doc diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index 0eef976819..8fa59c8dc3 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1411,7 +1411,7 @@ are spelling mistakes this may not be quite right. Common words can be specified with the COMMON item. This will give better suggestions when editing a short file. Example: - COMMON the of to and a in is it you that he was for on are ~ + COMMON the of to and a in is it you that he she was for on are ~ The words must be separated by white space, up to 25 per line. When multiple regions are specified in a ":mkspell" command the common words diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 94d0422818..01ef1645f0 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1896,9 +1896,9 @@ for this mapping, but the user might already use it for something else. To allow the user to define which keys a mapping in a plugin uses, the <Leader> item can be used: > - 22 map <unique> <Leader>a <Plug>TypecorrAdd + 22 map <unique> <Leader>a <Plug>TypecorrAdd; -The "<Plug>TypecorrAdd" thing will do the work, more about that further on. +The "<Plug>TypecorrAdd;" thing will do the work, more about that further on. The user can set the "mapleader" variable to the key sequence that he wants this mapping to start with. Thus if the user has done: > @@ -1914,15 +1914,15 @@ already happened to exist. |:map-<unique>| But what if the user wants to define his own key sequence? We can allow that with this mechanism: > - 21 if !hasmapto('<Plug>TypecorrAdd') - 22 map <unique> <Leader>a <Plug>TypecorrAdd + 21 if !hasmapto('<Plug>TypecorrAdd;') + 22 map <unique> <Leader>a <Plug>TypecorrAdd; 23 endif -This checks if a mapping to "<Plug>TypecorrAdd" already exists, and only +This checks if a mapping to "<Plug>TypecorrAdd/" already exists, and only defines the mapping from "<Leader>a" if it doesn't. The user then has a chance of putting this in his vimrc file: > - map ,c <Plug>TypecorrAdd + map ,c <Plug>TypecorrAdd; Then the mapped key sequence will be ",c" instead of "_a" or "\a". @@ -1952,15 +1952,15 @@ function (without the "s:"), which is again another function. <SID> can be used with mappings. It generates a script ID, which identifies the current script. In our typing correction plugin we use it like this: > - 24 noremap <unique> <script> <Plug>TypecorrAdd <SID>Add + 24 noremap <unique> <script> <Plug>TypecorrAdd; <SID>Add .. 28 noremap <SID>Add :call <SID>Add(expand("<cword>"), 1)<CR> Thus when a user types "\a", this sequence is invoked: > - \a -> <Plug>TypecorrAdd -> <SID>Add -> :call <SID>Add() + \a -> <Plug>TypecorrAdd; -> <SID>Add -> :call <SID>Add() -If another script was also map <SID>Add, it would get another script ID and +If another script also maps <SID>Add, it will get another script ID and thus define another mapping. Note that instead of s:Add() we use <SID>Add() here. That is because the @@ -2001,9 +2001,9 @@ difference between using <SID> and <Plug>: To make it very unlikely that other plugins use the same sequence of characters, use this structure: <Plug> scriptname mapname In our example the scriptname is "Typecorr" and the mapname is "Add". - This results in "<Plug>TypecorrAdd". Only the first character of - scriptname and mapname is uppercase, so that we can see where mapname - starts. + We add a semicolon as the terminator. This results in + "<Plug>TypecorrAdd;". Only the first character of scriptname and + mapname is uppercase, so that we can see where mapname starts. <SID> is the script ID, a unique identifier for a script. Internally Vim translates <SID> to "<SNR>123_", where "123" can be any @@ -2078,10 +2078,10 @@ Here is the resulting complete example: > 18 \ synchronization 19 let s:count = 4 20 - 21 if !hasmapto('<Plug>TypecorrAdd') - 22 map <unique> <Leader>a <Plug>TypecorrAdd + 21 if !hasmapto('<Plug>TypecorrAdd;') + 22 map <unique> <Leader>a <Plug>TypecorrAdd; 23 endif - 24 noremap <unique> <script> <Plug>TypecorrAdd <SID>Add + 24 noremap <unique> <script> <Plug>TypecorrAdd; <SID>Add 25 26 noremenu <script> Plugin.Add\ Correction <SID>Add 27 @@ -2131,7 +2131,7 @@ Here is a simple example for a plugin help file, called "typecorr.txt": > 6 There are currently only a few corrections. Add your own if you like. 7 8 Mappings: - 9 <Leader>a or <Plug>TypecorrAdd + 9 <Leader>a or <Plug>TypecorrAdd; 10 Add a correction for the word under the cursor. 11 12 Commands: @@ -2269,13 +2269,13 @@ To make sure mappings will only work in the current buffer use the > command. This needs to be combined with the two-step mapping explained above. An example of how to define functionality in a filetype plugin: > - if !hasmapto('<Plug>JavaImport') - map <buffer> <unique> <LocalLeader>i <Plug>JavaImport + if !hasmapto('<Plug>JavaImport;') + map <buffer> <unique> <LocalLeader>i <Plug>JavaImport; endif - noremap <buffer> <unique> <Plug>JavaImport oimport ""<Left><Esc> + noremap <buffer> <unique> <Plug>JavaImport; oimport ""<Left><Esc> |hasmapto()| is used to check if the user has already defined a map to -<Plug>JavaImport. If not, then the filetype plugin defines the default +<Plug>JavaImport;. If not, then the filetype plugin defines the default mapping. This starts with |<LocalLeader>|, which allows the user to select the key(s) he wants filetype plugin mappings to start with. The default is a backslash. @@ -2292,12 +2292,12 @@ plugin for the mail filetype: > " Add mappings, unless the user didn't want this. if !exists("no_plugin_maps") && !exists("no_mail_maps") " Quote text by inserting "> " - if !hasmapto('<Plug>MailQuote') - vmap <buffer> <LocalLeader>q <Plug>MailQuote - nmap <buffer> <LocalLeader>q <Plug>MailQuote + if !hasmapto('<Plug>MailQuote;') + vmap <buffer> <LocalLeader>q <Plug>MailQuote; + nmap <buffer> <LocalLeader>q <Plug>MailQuote; endif - vnoremap <buffer> <Plug>MailQuote :s/^/> /<CR> - nnoremap <buffer> <Plug>MailQuote :.,$s/^/> /<CR> + vnoremap <buffer> <Plug>MailQuote; :s/^/> /<CR> + nnoremap <buffer> <Plug>MailQuote; :.,$s/^/> /<CR> endif Two global variables are used: diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index bb8e2655f6..efbcd2448d 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1049,7 +1049,9 @@ list of buffers. |unlisted-buffer| < *:bad* *:badd* :bad[d] [+lnum] {fname} - Add file name {fname} to the buffer list, without loading it. + Add file name {fname} to the buffer list, without loading it, + if it wasn't listed yet. If the buffer was previously + deleted, not wiped, it will be made listed again. If "lnum" is specified, the cursor will be positioned at that line when the buffer is first entered. Note that other commands after the + will be ignored. diff --git a/runtime/ftplugin/cobol.vim b/runtime/ftplugin/cobol.vim index d96a1bf281..ec1e95456d 100644 --- a/runtime/ftplugin/cobol.vim +++ b/runtime/ftplugin/cobol.vim @@ -2,7 +2,7 @@ " Language: cobol " Maintainer: Ankit Jain <ajatkj@yahoo.co.in> " (formerly Tim Pope <vimNOSPAM@tpope.info>) -" Last Update: By Ankit Jain (changed maintainer) on 22.03.2019 +" Last Update: By Ankit Jain (add gtk support) on 15.08.2020 " Insert mode mappings: <C-T> <C-D> <Tab> " Normal mode mappings: < > << >> [[ ]] [] ][ @@ -37,7 +37,8 @@ if exists("loaded_matchit") \ '-\@<!\<\%(delete\|rewrite\|start\|write\|read\)\>\%(.*\(\%$\|\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*\%(invalid\s\+key\|at\s\+end\|no\s\+data\|at\s\+end-of-page\)\>\)\)\@=:\%(\<not\s\+\)\@<!\<\%(not\s\+\)\=\%(invalid\s\+key\|at\s\+end\|no\s\+data\|at\s\+end-of-page\)\>:\<end-\%(delete\|rewrite\|start\|write\|read\)\>' .s:ordot endif -if has("gui_win32") && !exists("b:browsefilter") +" add gtk support +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "COBOL Source Files (*.cbl, *.cob)\t*.cbl;*.cob;*.lib\n". \ "All Files (*.*)\t*.*\n" endif diff --git a/runtime/ftplugin/css.vim b/runtime/ftplugin/css.vim index ea4424418c..33fcee31c0 100644 --- a/runtime/ftplugin/css.vim +++ b/runtime/ftplugin/css.vim @@ -1,7 +1,8 @@ " Vim filetype plugin file -" Language: CSS -" Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2008-07-09 +" Language: CSS +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 9369f7c63c..4df0d4b59b 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Vim " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2020 Jul 26 +" Last Change: 2020 Aug 14 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -49,7 +49,8 @@ setlocal isk+=# setlocal keywordprg=:help " Set 'comments' to format dashed lists in comments -setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",:# +" Avoid that #{} starts a comment. +setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",b:# " Format comments to be up to 78 characters long if &tw == 0 diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 3b3409bf4b..6448c542cb 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types in scripts " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last change: 2020 Jun 07 +" Last change: 2020 Aug 15 " This file is called by an autocommand for every file that has just been " loaded into a buffer. It checks if the type of file can be recognized by @@ -150,7 +150,7 @@ if s:line1 =~# "^#!" elseif s:name =~# 'ocaml' set ft=ocaml - " Awk scripts + " Awk scripts; also finds "gawk" elseif s:name =~# 'awk\>' set ft=awk diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index 79c12ab713..364886036a 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2019 Nov 29 +" Last Change: 2020 Aug 11 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -272,7 +272,8 @@ if exists("c_gnu") syn keyword cType __label__ __complex__ __volatile__ endif -syn keyword cStructure struct union enum typedef +syn keyword cTypedef typedef +syn keyword cStructure struct union enum syn keyword cStorageClass static register auto volatile extern const if exists("c_gnu") syn keyword cStorageClass inline __attribute__ @@ -311,8 +312,7 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") if exists("c_gnu") syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__ __func__ endif - syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__ - syn keyword cConstant __STDC_VERSION__ + syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__ __STDC_VERSION__ __STDC_HOSTED__ syn keyword cConstant CHAR_BIT MB_LEN_MAX MB_CUR_MAX syn keyword cConstant UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX syn keyword cConstant CHAR_MIN INT_MIN LONG_MIN SHRT_MIN @@ -475,6 +475,7 @@ hi def link cSpecialError cError hi def link cCurlyError cError hi def link cOperator Operator hi def link cStructure Structure +hi def link cTypedef Structure hi def link cStorageClass StorageClass hi def link cInclude Include hi def link cPreProc PreProc diff --git a/runtime/tools/check_colors.vim b/runtime/tools/check_colors.vim index e4acbc33ec..966072c706 100644 --- a/runtime/tools/check_colors.vim +++ b/runtime/tools/check_colors.vim @@ -185,7 +185,7 @@ func! Test_check_colors() " 9) Normal should be defined first, not use reverse, fg or bg call cursor(1,1) - let pat = 'hi\%[light] \+\%(link\|clear\)\@!\w\+\>' + let pat = 'hi\%[ghlight] \+\%(link\|clear\)\@!\w\+\>' call search(pat, 'cW') " Look for the first hi def, skipping `hi link` and `hi clear` if getline('.') !~# '\m\<Normal\>' let err['highlight']['Normal'] = 'Should be defined first' |