vim-patch:partial:6ebe4f970b8b (#20860)

Update runtime files

6ebe4f970b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Christian Clason
2022-10-29 17:41:22 +02:00
committed by GitHub
parent 356244d50b
commit 6884f017b5
15 changed files with 401 additions and 270 deletions

View File

@ -712,6 +712,9 @@ func! tohtml#GetUserSettings() "{{{
call tohtml#GetOption(user_settings, 'no_foldcolumn', user_settings.ignore_folding)
call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
call tohtml#GetOption(user_settings, 'no_pre', 0 )
call tohtml#GetOption(user_settings, 'no_doc', 0 )
call tohtml#GetOption(user_settings, 'no_links', 0 )
call tohtml#GetOption(user_settings, 'no_modeline', 0 )
call tohtml#GetOption(user_settings, 'no_invalid', 0 )
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )

View File

@ -1198,11 +1198,9 @@ col({expr}) The result is a Number, which is the byte index of the column
buffer.
For the cursor position, when 'virtualedit' is active, the
column is one higher if the cursor is after the end of the
line. This can be used to obtain the column in Insert mode: >
:imap <F2> <C-O>:let save_ve = &ve<CR>
\<C-O>:set ve=all<CR>
\<C-O>:echo col(".") .. "\n" <Bar>
\let &ve = save_ve<CR>
line. Also, when using a <Cmd> mapping the cursor isn't
moved, this can be used to obtain the column in Insert mode: >
:imap <F2> <Cmd>echo col(".")<CR>
< Can also be used as a |method|: >
GetPos()->col()

View File

@ -1,4 +1,4 @@
*ft_rust.txt* For Vim version 8.1. Last change: 2017 Nov 02
*ft_rust.txt* Nvim
This is documentation for the Rust filetype plugin.

View File

@ -601,6 +601,7 @@ probably means that some other program changed the file. You will have to
find out what happened, and decide which version of the file you want to keep.
Set the 'autoread' option if you want to do this automatically.
This message is not given when 'buftype' is not empty.
Also see the |FileChangedShell| autocommand.
There is one situation where you get this message even though there is nothing
wrong: If you save a file in Windows on the day the daylight saving time

View File

@ -656,6 +656,22 @@ the rendered page generated by 2html.vim.
>
:let g:html_no_pre = 1
<
*g:html_no_doc*
Default: 0.
When 1 it doesn't generate a full HTML document with a DOCTYPE, <head>,
<body>, etc. If |g:html_use_css| is enabled (the default) you'll have to
define the CSS manually. The |g:html_dynamic_folds| and |g:html_line_ids|
settings (off by default) also insert some JavaScript.
*g:html_no_links*
Default: 0.
Don't generate <a> tags for text that looks like an URL.
*g:html_no_modeline*
Default: 0.
Don't generate a modeline disabling folding.
*g:html_expand_tabs*
Default: 0 if 'tabstop' is 8, 'expandtab' is 0, 'vartabstop' is not in use,
and no fold column or line numbers occur in the generated HTML;

View File

@ -380,6 +380,8 @@ and then drag) will result in whole words to be selected. This continues
until the button is released, at which point the selection is per character
again.
For scrolling with the mouse see |scroll-mouse-wheel|.
In Insert mode, when a selection is started, Vim goes into Normal mode
temporarily. When Visual or Select mode ends, it returns to Insert mode.
This is like using CTRL-O in Insert mode. Select mode is used when the

View File

@ -0,0 +1,16 @@
" Vim filetype plugin
" Language: apache configuration file
" Maintainer: Per Juchtmans <dubgeiser+vimNOSPAM@gmail.com>
" Last Change: 2022 Oct 22
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
setlocal comments=:#
setlocal commentstring=#\ %s
let b:undo_ftplugin = "setlocal comments< commentstring<"
" vim: nowrap sw=2 sts=2 ts=8 noet:

View File

@ -0,0 +1,14 @@
" Vim filetype plugin
" Language: OpenVPN
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
" Last Change: 2022 Oct 16
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal iskeyword+=-,.,/
setlocal comments=:#,:; commentstring=#%s
let b:undo_ftplugin = 'setl isk< com< cms<'

View File

@ -815,6 +815,7 @@ endif
" HTML header, with the title and generator ;-). Left free space for the CSS,
" to be filled at the end.
if !s:settings.no_doc
call extend(s:lines, [
\ "<html>",
\ "<head>"])
@ -1003,14 +1004,15 @@ endif
call extend(s:lines, ["</head>",
\ "<body".(s:settings.line_ids ? " onload='JumpToLine();'" : "").">"])
endif
if s:settings.no_pre
" if we're not using CSS we use a font tag which can't have a div inside
if s:settings.use_css
call extend(s:lines, ["<div id='vimCodeElement".s:settings.id_suffix."'>"])
call extend(s:lines, ["<div id='vimCodeElement" .. s:settings.id_suffix .. "'>"])
endif
else
call extend(s:lines, ["<pre id='vimCodeElement".s:settings.id_suffix."'>"])
call extend(s:lines, ["<pre id='vimCodeElement" .. s:settings.id_suffix .. "'>"])
endif
exe s:orgwin . "wincmd w"
@ -1721,12 +1723,15 @@ endif
if s:settings.no_pre
if !s:settings.use_css
" Close off the font tag that encapsulates the whole <body>
call extend(s:lines, ["</font>", "</body>", "</html>"])
call extend(s:lines, ["</font>"])
else
call extend(s:lines, ["</div>", "</body>", "</html>"])
call extend(s:lines, ["</div>"])
endif
else
call extend(s:lines, ["</pre>", "</body>", "</html>"])
call extend(s:lines, ["</pre>"])
endif
if !s:settings.no_doc
call extend(s:lines, ["</body>", "</html>"])
endif
exe s:newwin . "wincmd w"
@ -1742,15 +1747,15 @@ unlet s:lines
" The generated HTML is admittedly ugly and takes a LONG time to fold.
" Make sure the user doesn't do syntax folding when loading a generated file,
" using a modeline.
if !s:settings.no_modeline
call append(line('$'), "<!-- vim: set foldmethod=manual : -->")
" Now, when we finally know which, we define the colors and styles
if s:settings.use_css
1;/<style\>/+1
endif
" Now, when we finally know which, we define the colors and styles
if s:settings.use_css && !s:settings.no_doc
1;/<style\>/+1
" Normal/global attributes
if s:settings.use_css
if s:settings.no_pre
call append('.', "body { color: " . s:fgc . "; background-color: " . s:bgc . "; font-family: ". s:htmlfont ."; }")
+
@ -1874,7 +1879,9 @@ if s:settings.use_css
endif
endif
endif
else
endif
if !s:settings.use_css && !s:settings_no_doc
" For Netscape 4, set <body> attributes too, though, strictly speaking, it's
" incorrect.
execute '%s:<body\([^>]*\):<body bgcolor="' . s:bgc . '" text="' . s:fgc . '"\1>\r<font face="'. s:htmlfont .'"'
@ -1882,7 +1889,7 @@ endif
" Gather attributes for all other classes. Do diff first so that normal
" highlight groups are inserted before it.
if s:settings.use_css
if s:settings.use_css && !s:settings.no_doc
if s:diff_mode
call append('.', filter(map(keys(s:diffstylelist), "s:diffstylelist[v:val]"), 'v:val != ""'))
endif
@ -1892,11 +1899,12 @@ if s:settings.use_css
endif
" Add hyperlinks
" TODO: add option to not do this? Maybe just make the color the same as the
" text highlight group normally is?
if !s:settings.no_links
%s+\(https\=://\S\{-}\)\(\([.,;:}]\=\(\s\|$\)\)\|[\\"'<>]\|&gt;\|&lt;\|&quot;\)+<a href="\1">\1</a>\2+ge
endif
" The DTD
if !s:settings.no_doc
if s:settings.use_xhtml
exe "normal! gg$a\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"
elseif s:html5
@ -1904,8 +1912,9 @@ elseif s:html5
else
exe "normal! gg0i<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n"
endif
endif
if s:settings.use_xhtml
if s:settings.use_xhtml && !s:settings.no_doc
exe "normal! gg/<html/e\na xmlns=\"http://www.w3.org/1999/xhtml\"\e"
endif

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Bram Moolenaar (Bram@vim.org)
" Last Change: 2022 Sep 26
" Last Change: 2022 Oct 17
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@ -11,7 +11,7 @@ endif
let s:cpo_save = &cpo
set cpo&vim
syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*\ze\(\s\+\*\|$\)"
syn match helpHeadline "^ *[-A-Z.][-A-Z0-9 .()_]*?\=\ze\(\s\+\*\|$\)"
syn match helpSectionDelim "^===.*===$"
syn match helpSectionDelim "^---.*--$"
if has("conceal")

View File

@ -0,0 +1,72 @@
" Vim syntax file
" Language: OpenVPN
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
" Filenames: *.ovpn
" Last Change: 2022 Oct 16
if exists('b:current_syntax')
finish
endif
let s:cpo_save = &cpoptions
set cpoptions&vim
" Options
syntax match openvpnOption /^[a-z-]\+/
\ skipwhite nextgroup=openvpnArgList
syntax match openvpnArgList /.*$/ transparent contained
\ contains=openvpnArgument,openvpnNumber,
\ openvpnIPv4Address,openvpnIPv6Address,
\ openvpnSignal,openvpnComment
" Arguments
syntax match openvpnArgument /[^\\"' \t]\+/
\ contained contains=openvpnEscape
syntax region openvpnArgument matchgroup=openvpnQuote
\ start=/"/ skip=/\\"/ end=/"/
\ oneline contained contains=openvpnEscape
syntax region openvpnArgument matchgroup=openvpnQuote
\ start=/'/ skip=/\\'/ end=/'/
\ oneline contained
syntax match openvpnEscape /\\[\\" \t]/ contained
" Numbers
syntax match openvpnNumber /\<[1-9][0-9]*\(\.[0-9]\+\)\?\>/ contained
" Signals
syntax match openvpnSignal /SIG\(HUP\|INT\|TERM\|USER[12]\)/ contained
" IP addresses
syntax match openvpnIPv4Address /\(\d\{1,3}\.\)\{3}\d\{1,3}/
\ contained nextgroup=openvpnSlash
syntax match openvpnIPv6Address /\([A-F0-9]\{1,4}:\)\{7}\[A-F0-9]\{1,4}/
\ contained nextgroup=openvpnSlash
syntax match openvpnSlash "/" contained
\ nextgroup=openvpnIPv4Address,openvpnIPv6Address,openvpnNumber
" Inline files
syntax region openvpnInline matchgroup=openvpnTag
\ start=+^<\z([a-z-]\+\)>+ end=+^</\z1>+
" Comments
syntax keyword openvpnTodo contained TODO FIXME NOTE XXX
syntax match openvpnComment /^[;#].*$/ contains=openvpnTodo
syntax match openvpnComment /\s\+\zs[;#].*$/ contains=openvpnTodo
hi def link openvpnArgument String
hi def link openvpnComment Comment
hi def link openvpnEscape SpecialChar
hi def link openvpnIPv4Address Constant
hi def link openvpnIPv6Address Constant
hi def link openvpnNumber Number
hi def link openvpnOption Keyword
hi def link openvpnQuote Quote
hi def link openvpnSignal Special
hi def link openvpnSlash Delimiter
hi def link openvpnTag Tag
hi def link openvpnTodo Todo
let b:current_syntax = 'openvpn'
let &cpoptions = s:cpo_save
unlet s:cpo_save

View File

@ -619,7 +619,7 @@ syn match vimCtrlChar "[- -]"
" Beginners - Patterns that involve ^ {{{2
" =========
syn match vimLineComment +^[ \t:]*"\("[^"]*"\|[^"]\)*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
syn match vim9LineComment +^[ \t:]\+#.*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
syn match vimContinue "^\s*\\"

View File

@ -2099,7 +2099,7 @@ static void augment_terminfo(TUIData *data, const char *term, long vte_version,
// Dickey ncurses terminfo does not include the setrgbf and setrgbb
// capabilities, proposed by Rüdiger Sonderfeld on 2013-10-15. Adding
// them here when terminfo lacks them is an augmentation, not a fixup.
// https://gist.github.com/XVilka/8346728
// https://github.com/termstandard/colors
// At this time (2017-07-12) it seems like all terminals that support rgb
// color codes can use semicolons in the terminal code and be fine.