Skip to content

Commit

Permalink
Update runtime files
Browse files Browse the repository at this point in the history
  • Loading branch information
brammool committed Nov 21, 2021
1 parent eea32af commit 88a4205
Show file tree
Hide file tree
Showing 19 changed files with 1,634 additions and 949 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ runtime/ftplugin/gitsendemail.vim @tpope
runtime/ftplugin/gprof.vim @dpelle
runtime/ftplugin/haml.vim @tpope
runtime/ftplugin/hgcommit.vim @k-takata
runtime/ftplugin/indent.vim @dkearns
runtime/ftplugin/javascript.vim @dkearns
runtime/ftplugin/javascriptreact.vim @dkearns
runtime/ftplugin/kconfig.vim @chrisbra
Expand Down Expand Up @@ -207,6 +208,7 @@ runtime/syntax/groff.vim @jmarshall
runtime/syntax/haml.vim @tpope
runtime/syntax/haskell.vim @coot
runtime/syntax/hgcommit.vim @k-takata
runtime/syntax/indent.vim @dkearns
runtime/syntax/kconfig.vim @chrisbra
runtime/syntax/less.vim @genoma
runtime/syntax/lex.vim @cecamp
Expand Down
9 changes: 5 additions & 4 deletions runtime/defaults.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" The default vimrc file.
"
" Maintainer: Bram Moolenaar <[email protected]>
" Last change: 2020 Sep 30
" Last change: 2021 Nov 17
"
" This is loaded if no vimrc file was found.
" Except when Vim is run with "-u NONE" or "-C".
Expand Down Expand Up @@ -96,7 +96,7 @@ if 1
filetype plugin indent on

" Put these in an autocmd group, so that you can revert them with:
" ":augroup vimStartup | au! | augroup END"
" ":augroup vimStartup | exe 'au!' | augroup END"
augroup vimStartup
au!

Expand All @@ -114,9 +114,10 @@ if 1
" Quite a few people accidentally type "q:" instead of ":q" and get confused
" by the command line window. Give a hint about how to get out.
" If you don't like this you can put this in your vimrc:
" ":augroup vimHints | au! | augroup END"
" ":augroup vimHints | exe 'au!' | augroup END"
augroup vimHints
autocmd! CmdwinEnter *
au!
autocmd CmdwinEnter *
\ echohl Todo |
\ echo 'You discovered the command-line window! You can close it with ":q".' |
\ echohl None
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/autocmd.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.2. Last change: 2021 Oct 04
*autocmd.txt* For Vim version 8.2. Last change: 2021 Nov 20


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -83,7 +83,7 @@ triggered.
}
Note: The ":autocmd" command can only be followed by another command when the
'|' appears before {cmd}. This works: >
'|' appears where the pattern is expected. This works: >
:augroup mine | au! BufRead | augroup END
But this sees "augroup" as part of the defined command: >
:augroup mine | au! BufRead * | augroup END
Expand Down
15 changes: 9 additions & 6 deletions runtime/doc/eval.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.2. Last change: 2021 Nov 14
*eval.txt* For Vim version 8.2. Last change: 2021 Nov 20


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -5919,8 +5919,8 @@ getline({lnum} [, {end}])
digit, |line()| is called to translate the String into a Number.
To get the line under the cursor: >
getline(".")
< When {lnum} is smaller than 1 or bigger than the number of
lines in the buffer, an empty string is returned.
< When {lnum} is a number smaller than 1 or bigger than the
number of lines in the buffer, an empty string is returned.

When {end} is given the result is a |List| where each item is
a line from the current buffer in the range {lnum} to {end},
Expand Down Expand Up @@ -8489,15 +8489,18 @@ printf({fmt}, {expr1} ...) *printf()*
field width. If the converted value has fewer bytes
than the field width, it will be padded with spaces on
the left (or right, if the left-adjustment flag has
been given) to fill out the field width.
been given) to fill out the field width. For the S
conversion the count is in cells.

.precision
An optional precision, in the form of a period '.'
followed by an optional digit string. If the digit
string is omitted, the precision is taken as zero.
This gives the minimum number of digits to appear for
d, o, x, and X conversions, or the maximum number of
bytes to be printed from a string for s conversions.
d, o, x, and X conversions, the maximum number of
bytes to be printed from a string for s conversions,
or the maximum number of cells to be printed from a
string for S conversions.
For floating point it is the number of digits after
the decimal point.

Expand Down
6 changes: 3 additions & 3 deletions runtime/doc/helphelp.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*helphelp.txt* For Vim version 8.2. Last change: 2021 Nov 13
*helphelp.txt* For Vim version 8.2. Last change: 2021 Nov 18


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -323,7 +323,7 @@ Hints for translators:
3. Writing help files *help-writing*

For ease of use, a Vim help file for a plugin should follow the format of the
standard Vim help files, except fot the fist line. If you are writing a new
standard Vim help files, except for the first line. If you are writing a new
help file it's best to copy one of the existing files and use it as a
template.

Expand All @@ -336,7 +336,7 @@ remainder of the line, after a Tab, describes the plugin purpose in a short
way. This will show up in the "LOCAL ADDITIONS" section of the main help
file. Check there that it shows up properly: |local-additions|.

If you want to add a version number of last modification date, put it in the
If you want to add a version number or last modification date, put it in the
second line, right aligned.

At the bottom of the help file, place a Vim modeline to set the 'textwidth'
Expand Down
7 changes: 6 additions & 1 deletion runtime/doc/map.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*map.txt* For Vim version 8.2. Last change: 2021 Nov 15
*map.txt* For Vim version 8.2. Last change: 2021 Nov 20


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -96,6 +96,9 @@ modes.
Remove the mapping of {lhs} for the modes where the
map command applies. The mapping may remain defined
for other modes where it applies.
It also works when {lhs} matches the {rhs} of a
mapping. This is for when when an abbreviation
applied.
Note: Trailing spaces are included in the {lhs}. This
unmap does NOT work: >
:map @@ foo
Expand Down Expand Up @@ -346,6 +349,8 @@ Note:
- For the same reason, |keycodes| like <C-R><C-W> are interpreted as plain,
unmapped keys.
- The command is not echo'ed, no need for <silent>.
- The {rhs} is not subject to abbreviations nor to other mappings, even if the
mapping is recursive.
- In Visual mode you can use `line('v')` and `col('v')` to get one end of the
Visual area, the cursor is at the other end.
- In Select mode, |:map| and |:vmap| command mappings are executed in
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/options.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2021 Nov 15
*options.txt* For Vim version 8.2. Last change: 2021 Nov 18


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down
12 changes: 6 additions & 6 deletions runtime/doc/syntax.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 8.2. Last change: 2021 Nov 07
*syntax.txt* For Vim version 8.2. Last change: 2021 Nov 20


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -5477,7 +5477,7 @@ For Unix you can use the file ~/.vim/after/syntax/syncolor.vim. Example: >
else
highlight comment ctermfg=green guifg=green
endif
<
*E679*
Do make sure this syncolor.vim script does not use a "syntax on", set the
'background' option or uses a "colorscheme" command, because it results in an
Expand All @@ -5490,11 +5490,11 @@ depends on the color scheme file. See |:colorscheme|.
*syntax_cmd*
The "syntax_cmd" variable is set to one of these values when the
syntax/syncolor.vim files are loaded:
"on" ":syntax on" command. Highlight colors are overruled but
"on" `:syntax on` command. Highlight colors are overruled but
links are kept
"enable" ":syntax enable" command. Only define colors for groups that
don't have highlighting yet. Use ":syntax default".
"reset" ":syntax reset" command or loading a color scheme. Define all
"enable" `:syntax enable` command. Only define colors for groups that
don't have highlighting yet. Use `:highlight default` .
"reset" `:syntax reset` command or loading a color scheme. Define all
the colors.
"skip" Don't define colors. Used to skip the default settings when a
syncolor.vim file earlier in 'runtimepath' has already set
Expand Down
1 change: 1 addition & 0 deletions runtime/doc/tags
Original file line number Diff line number Diff line change
Expand Up @@ -8421,6 +8421,7 @@ operator-variable eval.txt /*operator-variable*
option-backslash options.txt /*option-backslash*
option-list quickref.txt /*option-list*
option-summary options.txt /*option-summary*
option-value-function options.txt /*option-value-function*
option-window options.txt /*option-window*
option_restore() todo.txt /*option_restore()*
option_save() todo.txt /*option_save()*
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/usr_20.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*usr_20.txt* For Vim version 8.2. Last change: 2021 Nov 13
*usr_20.txt* For Vim version 8.2. Last change: 2021 Nov 18

VIM USER MANUAL - by Bram Moolenaar

Expand Down Expand Up @@ -292,7 +292,7 @@ to newer commands.
There are actually five histories. The ones we will mention here are for ":"
commands and for "/" and "?" search commands. The "/" and "?" commands share
the same history, because they are both search commands. The three other
histories are for expressions, debug more commands and input lines for the
histories are for expressions, debug mode commands and input lines for the
input() function. |cmdline-history|

Suppose you have done a ":set" command, typed ten more colon commands and then
Expand Down
5 changes: 3 additions & 2 deletions runtime/doc/visual.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*visual.txt* For Vim version 8.2. Last change: 2021 May 30
*visual.txt* For Vim version 8.2. Last change: 2021 Nov 21


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -370,7 +370,8 @@ same amount of text as the last time:
last line the same number of characters as in the last line the last time.
The start of the text is the Cursor position. If the "$" command was used as
one of the last commands to extend the highlighted text, the repeating will
be applied up to the rightmost column of the longest line.
be applied up to the rightmost column of the longest line. Any count passed
to the `.` command is not used.


==============================================================================
Expand Down
7 changes: 4 additions & 3 deletions runtime/ftplugin/indent.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: indent(1) configuration file
" Previous Maintainer: Nikolai Weibull <[email protected]>
" Latest Revision: 2008-07-09
" Language: indent(1) configuration file
" Maintainer: Doug Kearns <[email protected]>
" Previous Maintainer: Nikolai Weibull <[email protected]>
" Latest Revision: 2008-07-09

if exists("b:did_ftplugin")
finish
Expand Down
82 changes: 54 additions & 28 deletions runtime/ftplugin/vb.vim
Original file line number Diff line number Diff line change
@@ -1,44 +1,70 @@
" Vim filetype plugin file
" Language: VisualBasic (ft=vb)
" Maintainer: Johannes Zellner <[email protected]>
" Last Change: Thu, 22 Nov 2001 12:56:14 W. Europe Standard Time
" Language: Visual Basic (ft=vb)
" Maintainer: Doug Kearns <[email protected]>
" Previous Maintainer: Johannes Zellner <[email protected]>
" Last Change: 2021 Nov 17

if exists("b:did_ftplugin") | finish | endif
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1

setlocal com=sr:'\ -,mb:'\ \ ,el:'\ \ ,:'
let s:cpo_save = &cpo
set cpo&vim

setlocal comments=sr:'\ -,mb:'\ \ ,el:'\ \ ,:'
setlocal commentstring='\ %s
setlocal formatoptions-=t formatoptions+=croql

let b:undo_ftplugin = "setlocal com< cms< fo<"

" we need this wrapper, as call doesn't allow a count
fun! <SID>VbSearch(pattern, flags)
function! s:VbSearch(pattern, flags)
let cnt = v:count1
while cnt > 0
call search(a:pattern, a:flags)
let cnt = cnt - 1
endwhile
endfun
endfunction

let s:cpo_save = &cpo
set cpo&vim
if !exists("no_plugin_maps") && !exists("no_vb_maps")
nnoremap <buffer> <silent> [[ <Cmd>call <SID>VbSearch('^\s*\%(\%(private\<Bar>public\)\s\+\)\=\%(function\<Bar>sub\)', 'sbW')<CR>
vnoremap <buffer> <silent> [[ <Cmd>call <SID>VbSearch('^\s*\%(\%(private\<Bar>public\)\s\+\)\=\%(function\<Bar>sub\)', 'sbW')<CR>
nnoremap <buffer> <silent> ]] <Cmd>call <SID>VbSearch('^\s*\%(\%(private\<Bar>public\)\s\+\)\=\%(function\<Bar>sub\)', 'sW')<CR>
vnoremap <buffer> <silent> ]] <Cmd>call <SID>VbSearch('^\s*\%(\%(private\<Bar>public\)\s\+\)\=\%(function\<Bar>sub\)', 'sW')<CR>
nnoremap <buffer> <silent> [] <Cmd>call <SID>VbSearch('^\s*end\s\+\%(function\<Bar>sub\)', 'sbW')<CR>
vnoremap <buffer> <silent> [] <Cmd>call <SID>VbSearch('^\s*end\s\+\%(function\<Bar>sub\)', 'sbW')<CR>
nnoremap <buffer> <silent> ][ <Cmd>call <SID>VbSearch('^\s*end\s\+\%(function\<Bar>sub\)', 'sW')<CR>
vnoremap <buffer> <silent> ][ <Cmd>call <SID>VbSearch('^\s*end\s\+\%(function\<Bar>sub\)', 'sW')<CR>
let b:undo_ftplugin .= " | sil! exe 'nunmap <buffer> [[' | sil! exe 'vunmap <buffer> [['" .
\ " | sil! exe 'nunmap <buffer> ]]' | sil! exe 'vunmap <buffer> ]]'" .
\ " | sil! exe 'nunmap <buffer> []' | sil! exe 'vunmap <buffer> []'" .
\ " | sil! exe 'nunmap <buffer> ][' | sil! exe 'vunmap <buffer> ]['"
endif

" TODO: line start anchors are almost certainly overly restrictive - allow
" after statement separators. Even in QuickBasic only block IF statements
" were required to be at the start of a line.
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_ignorecase = 1
let b:match_words =
\ '\%(^\s*\)\@<=\<if\>.*\<then\>\s*\%($\|''\):\%(^\s*\)\@<=\<else\>:\%(^\s*\)\@<=\<elseif\>:\%(^\s*\)\@<=\<end\>\s\+\<if\>,' .
\ '\%(^\s*\)\@<=\<for\>:\%(^\s*\)\@<=\<next\>,' .
\ '\%(^\s*\)\@<=\<while\>:\%(^\s*\)\@<=\<wend\>,' .
\ '\%(^\s*\)\@<=\<do\>:\%(^\s*\)\@<=\<loop\>\s\+\<while\>,' .
\ '\%(^\s*\)\@<=\<select\>\s\+\<case\>:\%(^\s*\)\@<=\<case\>:\%(^\s*\)\@<=\<end\>\s\+\<select\>,' .
\ '\%(^\s*\)\@<=\<enum\>:\%(^\s*\)\@<=\<end\>\s\<enum\>,' .
\ '\%(^\s*\)\@<=\<with\>:\%(^\s*\)\@<=\<end\>\s\<with\>,' .
\ '\%(^\s*\)\@<=\%(\<\%(private\|public\)\>\s\+\)\=\<function\>\s\+\([^ \t(]\+\):\%(^\s*\)\@<=\<\1\>\s*=:\%(^\s*\)\@<=\<end\>\s\+\<function\>,' .
\ '\%(^\s*\)\@<=\%(\<\%(private\|public\)\>\s\+\)\=\<sub\>\s\+:\%(^\s*\)\@<=\<end\>\s\+\<sub\>'
let b:undo_ftplugin .= " | unlet! b:match_words b:match_ignorecase"
endif

" NOTE the double escaping \\|
nnoremap <buffer> <silent> [[ :call <SID>VbSearch('^\s*\(\(private\|public\)\s\+\)\=\(function\\|sub\)', 'bW')<cr>
nnoremap <buffer> <silent> ]] :call <SID>VbSearch('^\s*\(\(private\|public\)\s\+\)\=\(function\\|sub\)', 'W')<cr>
nnoremap <buffer> <silent> [] :call <SID>VbSearch('^\s*\<end\>\s\+\(function\\|sub\)', 'bW')<cr>
nnoremap <buffer> <silent> ][ :call <SID>VbSearch('^\s*\<end\>\s\+\(function\\|sub\)', 'W')<cr>
" matchit support
if exists("loaded_matchit")
let b:match_ignorecase=1
let b:match_words=
\ '\%(^\s*\)\@<=\<if\>.*\<then\>\s*$:\%(^\s*\)\@<=\<else\>:\%(^\s*\)\@<=\<elseif\>:\%(^\s*\)\@<=\<end\>\s\+\<if\>,' .
\ '\%(^\s*\)\@<=\<for\>:\%(^\s*\)\@<=\<next\>,' .
\ '\%(^\s*\)\@<=\<while\>:\%(^\s*\)\@<=\<wend\>,' .
\ '\%(^\s*\)\@<=\<do\>:\%(^\s*\)\@<=\<loop\>\s\+\<while\>,' .
\ '\%(^\s*\)\@<=\<select\>\s\+\<case\>:\%(^\s*\)\@<=\<case\>:\%(^\s*\)\@<=\<end\>\s\+\<select\>,' .
\ '\%(^\s*\)\@<=\<enum\>:\%(^\s*\)\@<=\<end\>\s\<enum\>,' .
\ '\%(^\s*\)\@<=\<with\>:\%(^\s*\)\@<=\<end\>\s\<with\>,' .
\ '\%(^\s*\)\@<=\%(\<\%(private\|public\)\>\s\+\)\=\<function\>\s\+\([^ \t(]\+\):\%(^\s*\)\@<=\<\1\>\s*=:\%(^\s*\)\@<=\<end\>\s\+\<function\>,' .
\ '\%(^\s*\)\@<=\%(\<\%(private\|public\)\>\s\+\)\=\<sub\>\s\+:\%(^\s*\)\@<=\<end\>\s\+\<sub\>'
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Visual Basic Source Files (*.bas)\t*.bas\n" .
\ "Visual Basic Form Files (*.frm)\t*.frm\n" .
\ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif

let &cpo = s:cpo_save
Expand Down
Loading

0 comments on commit 88a4205

Please sign in to comment.