From 6a8436065ca7282569fd4d96b1c02a8ba8eaacf1 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 2 May 2021 10:19:25 -0400 Subject: [PATCH] vim-patch:9faec4e3d439 Update runtime files. https://github.com/vim/vim/commit/9faec4e3d439968e21ad74e917aebb289df8f849 Omit vim9. --- runtime/autoload/syntaxcomplete.vim | 11 ++- runtime/compiler/sml.vim | 28 +++++++ runtime/doc/pattern.txt | 2 +- runtime/doc/repeat.txt | 2 +- runtime/doc/usr_04.txt | 6 +- runtime/ftplugin/lisp.vim | 4 +- runtime/ftplugin/vim.vim | 4 +- runtime/indent/vim.vim | 6 +- runtime/syntax/html.vim | 25 +++++-- runtime/syntax/lhaskell.vim | 23 ++++-- runtime/syntax/python.vim | 112 ++++++++++++---------------- src/nvim/po/sr.po | 42 +++++------ 12 files changed, 150 insertions(+), 115 deletions(-) create mode 100644 runtime/compiler/sml.vim diff --git a/runtime/autoload/syntaxcomplete.vim b/runtime/autoload/syntaxcomplete.vim index ea72204cbb..6ba262b9aa 100644 --- a/runtime/autoload/syntaxcomplete.vim +++ b/runtime/autoload/syntaxcomplete.vim @@ -1,12 +1,16 @@ " Vim completion script " Language: All languages, uses existing syntax highlighting rules " Maintainer: David Fishburn -" Version: 13.0 -" Last Change: 2019 Aug 08 +" Version: 14.0 +" Last Change: 2020 Dec 30 " Usage: For detailed help, ":help ft-syntax-omni" " History " +" Version 14.0 +" - Fixed issue with single quotes and is_keyword +" https://github.com/vim/vim/issues/7463 +" " Version 13.0 " - Extended the option omni_syntax_group_include_{filetype} " to accept a comma separated list of regex's rather than @@ -179,7 +183,8 @@ function! syntaxcomplete#Complete(findstart, base) endif " let base = s:prepended . a:base - let base = s:prepended + " let base = s:prepended + let base = substitute(s:prepended, "'", "''", 'g') let filetype = substitute(&filetype, '\.', '_', 'g') let list_idx = index(s:cache_name, filetype, 0, &ignorecase) diff --git a/runtime/compiler/sml.vim b/runtime/compiler/sml.vim new file mode 100644 index 0000000000..c7e1b1bf16 --- /dev/null +++ b/runtime/compiler/sml.vim @@ -0,0 +1,28 @@ +" Vim compiler file +" Compiler: SML/NJ Compiler +" Maintainer: Doug Kearns +" Last Change: 2020 Feb 10 + +if exists("current_compiler") + finish +endif +let current_compiler = "sml" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet makeprg=sml +CompilerSet errorformat=%f:%l.%c-%\\d%\\+.%\\d%\\+\ %trror:\ %m, + \%f:%l.%c\ %trror:\ %m, + \%trror:\ %m + \%f:%l.%c-%\\d%\\+.%\\d%\\+\ %tarning:\ %m, + \%f:%l.%c\ %tarning:\ %m, + \%tarning:\ %m, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 8666a2310c..e74f3b72bf 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -219,7 +219,7 @@ This is like executing two search commands after each other, except that: *last-pattern* The last used pattern and offset are remembered. They can be used to repeat the search, possibly in another direction or with another count. Note that -two patterns are remembered: One for 'normal' search commands and one for the +two patterns are remembered: One for "normal" search commands and one for the substitute command ":s". Each time an empty pattern is given, the previously used pattern is used. However, if there is no previous search command, a previous substitute pattern is used, if possible. diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index f310dba1d7..1c9bc2146e 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -823,7 +823,7 @@ DEFINING BREAKPOINTS valid in the script where it has been defined and if that script is called from several other scripts, this will stop whenever that particular variable will become visible or - unaccessible again. + inaccessible again. The [lnum] is the line number of the breakpoint. Vim will stop at or after this line. When omitted line 1 is used. diff --git a/runtime/doc/usr_04.txt b/runtime/doc/usr_04.txt index f59597eb42..b2dd617542 100644 --- a/runtime/doc/usr_04.txt +++ b/runtime/doc/usr_04.txt @@ -463,9 +463,9 @@ of characters to replace. It will not continue on the next line. You can switch between Insert mode and Replace mode with the key. -When you use (backspace) to make correction, you will notice that the -old text is put back. Thus it works like an undo command for the last typed -character. +When you use (backspace) to make a correction, you will notice that the +old text is put back. Thus it works like an undo command for the previously +typed character. ============================================================================== *04.10* Conclusion diff --git a/runtime/ftplugin/lisp.vim b/runtime/ftplugin/lisp.vim index 130f30b146..9825d2484a 100644 --- a/runtime/ftplugin/lisp.vim +++ b/runtime/ftplugin/lisp.vim @@ -14,13 +14,11 @@ endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 -setl comments=:; +setl comments=:;;;;,:;;;,:;;,:;,sr:#\|,mb:\|,ex:\|# setl define=^\\s*(def\\k* setl formatoptions-=t setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94 setl lisp setl commentstring=;%s -setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|# - let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp< commentstring<" diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index a842114433..61fabcbb32 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Vim " Maintainer: Bram Moolenaar -" Last Change: 2021 Feb 07 +" Last Change: 2021 Feb 20 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -55,7 +55,7 @@ if "\n" .. join(getline(1, 10), "\n") =~# '\n\s*vim9\%[script]\>' " Comments starts with # in Vim9 script setlocal commentstring=#%s else - setlocal com=sO:\"\ -,mO:\"\ \ ,:\" + setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\" " Comments starts with a double quote in legacy script setlocal commentstring=\"%s endif diff --git a/runtime/indent/vim.vim b/runtime/indent/vim.vim index 3b5d7828c1..3cebf299f1 100644 --- a/runtime/indent/vim.vim +++ b/runtime/indent/vim.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Vim script " Maintainer: Bram Moolenaar -" Last Change: 2021 Feb 13 +" Last Change: 2021 Feb 18 " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -160,9 +160,9 @@ function GetVimIndentIntern() endif let ends_in_comment = has('syntax_items') - \ && synIDattr(synID(lnum, col('$'), 1), "name") =~ '\(Comment\|String\)$' + \ && synIDattr(synID(lnum, len(getline(lnum)), 1), "name") =~ '\(Comment\|String\)$' - " A line ending in "{"/"[} is most likely the start of a dict/list literal, + " A line ending in "{" or "[" is most likely the start of a dict/list literal, " indent the next line more. Not for a continuation line or {{{. if !ends_in_comment && prev_text_end =~ '\s[{[]\s*$' && !found_cont let ind = ind + shiftwidth() diff --git a/runtime/syntax/html.vim b/runtime/syntax/html.vim index aa9cb1205a..36d3c25f3a 100644 --- a/runtime/syntax/html.vim +++ b/runtime/syntax/html.vim @@ -1,10 +1,10 @@ " Vim syntax file " Language: HTML -" Maintainer: Jorge Maldonado Ventura +" Previous Maintainer: Jorge Maldonado Ventura " Previous Maintainer: Claudio Fleiner " Repository: https://notabug.org/jorgesumle/vim-html-syntax -" Last Change: 2020 Mar 17 -" Included patch from Florian Breisch to add the summary element +" Last Change: 2021 Feb 25 +" Included patch #7900 to fix comments " " Please check :help html.vim for some comments and a description of the options @@ -141,9 +141,21 @@ syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};" if exists("html_wrong_comments") syn region htmlComment start=+ and are parser errors; browser treats as comments + syn match htmlComment " closes comment + " Idem 8.2.4.52: closing comment by dash-dash-bang (--!>) is error ignored by parser(!); closes comment + syn region htmlCommentPart contained start=+--+ end=+--!\?>+me=e-1 contains=htmlCommentNested,@htmlPreProc,@Spell + " Idem 8.2.4.49: opening nested comment is all right + syn match htmlCommentNested contained ""me=e-3 + syn match htmlCommentNested contained "