Skip to content

Commit

Permalink
Update runtime files
Browse files Browse the repository at this point in the history
  • Loading branch information
brammool committed Sep 10, 2022
1 parent 2da11a4 commit 71b6d33
Show file tree
Hide file tree
Showing 26 changed files with 499 additions and 141 deletions.
19 changes: 18 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -69,6 +69,10 @@ runtime/compiler/perlcritic.vim @petdance @dkearns
runtime/compiler/php.vim @dkearns
runtime/compiler/podchecker.vim @petdance @dkearns
runtime/compiler/powershell.vim @heaths
runtime/compiler/raco.vim @benknoble
runtime/compiler/racomake.vim @benknoble
runtime/compiler/racosetup.vim @benknoble
runtime/compiler/racotest.vim @benknoble
runtime/compiler/rake.vim @tpope @dkearns
runtime/compiler/rhino.vim @dkearns
runtime/compiler/rspec.vim @tpope @dkearns
Expand Down Expand Up @@ -111,6 +115,7 @@ runtime/ftplugin/cucumber.vim @tpope
runtime/ftplugin/desktop.vim @e-kwsm
runtime/ftplugin/dosbatch.vim @mrdubya
runtime/ftplugin/eiffel.vim @dkearns
runtime/ftplugin/elixir.vim @mhanberg
runtime/ftplugin/expect.vim @dkearns
runtime/ftplugin/erlang.vim @hcs42
runtime/ftplugin/eruby.vim @tpope @dkearns
Expand All @@ -123,8 +128,10 @@ runtime/ftplugin/gdb.vim @xeyownt
runtime/ftplugin/gdscript.vim @habamax
runtime/ftplugin/gdshader.vim @habamax
runtime/ftplugin/git.vim @tpope
runtime/ftplugin/gitattributes.vim @ObserverOfTime
runtime/ftplugin/gitcommit.vim @tpope
runtime/ftplugin/gitconfig.vim @tpope
runtime/ftplugin/gitignore.vim @ObserverOfTime
runtime/ftplugin/gitrebase.vim @tpope
runtime/ftplugin/gitsendemail.vim @tpope
runtime/ftplugin/go.vim @dbarnett
Expand All @@ -135,6 +142,7 @@ runtime/ftplugin/html.vim @dkearns
runtime/ftplugin/i3config.vim @hiqua
runtime/ftplugin/icon.vim @dkearns
runtime/ftplugin/indent.vim @dkearns
runtime/ftplugin/j.vim @glts
runtime/ftplugin/javascript.vim @dkearns
runtime/ftplugin/javascriptreact.vim @dkearns
runtime/ftplugin/jsonc.vim @izhakjakov
Expand All @@ -143,6 +151,7 @@ runtime/ftplugin/kconfig.vim @chrisbra
runtime/ftplugin/less.vim @genoma
runtime/ftplugin/liquid.vim @tpope
runtime/ftplugin/lua.vim @dkearns
runtime/ftplugin/lynx.vim @dkearns
runtime/ftplugin/m3build.vim @dkearns
runtime/ftplugin/m3quake.vim @dkearns
runtime/ftplugin/markdown.vim @tpope
Expand All @@ -164,6 +173,7 @@ runtime/ftplugin/ps1xml.vim @heaths
runtime/ftplugin/python.vim @tpict
runtime/ftplugin/qb64.vim @dkearns
runtime/ftplugin/r.vim @jalvesaq
runtime/ftplugin/racket.vim @benknoble
runtime/ftplugin/rhelp.vim @jalvesaq
runtime/ftplugin/rmd.vim @jalvesaq
runtime/ftplugin/rnoweb.vim @jalvesaq
Expand All @@ -175,6 +185,7 @@ runtime/ftplugin/sass.vim @tpope
runtime/ftplugin/scala.vim @derekwyatt
runtime/ftplugin/scss.vim @tpope
runtime/ftplugin/sdoc.vim @gpanders
runtime/ftplugin/sh.vim @dkearns
runtime/ftplugin/solution.vim @dkearns
runtime/ftplugin/spec.vim @ignatenkobrain
runtime/ftplugin/swayconfig.vim @jamespeapen
Expand Down Expand Up @@ -219,6 +230,7 @@ runtime/indent/gitolite.vim @sitaramc
runtime/indent/go.vim @dbarnett
runtime/indent/haml.vim @tpope
runtime/indent/idlang.vim @dkearns
runtime/indent/j.vim @glts
runtime/indent/java.vim @xuhdev
runtime/indent/javascript.vim @bounceme
runtime/indent/json.vim @elzr
Expand All @@ -240,6 +252,7 @@ runtime/indent/prolog.vim @dkearns
runtime/indent/ps1.vim @heaths
runtime/indent/qb64.vim @dkearns
runtime/indent/r.vim @jalvesaq
runtime/indent/racket.vim @benknoble
runtime/indent/readline.vim @dkearns
runtime/indent/rhelp.vim @jalvesaq
runtime/indent/rmd.vim @jalvesaq
Expand Down Expand Up @@ -321,8 +334,10 @@ runtime/syntax/gdresource.vim @habamax
runtime/syntax/gdscript.vim @habamax
runtime/syntax/gdshader.vim @habamax
runtime/syntax/git.vim @tpope
runtime/syntax/gitattributes.vim @ObserverOfTime
runtime/syntax/gitcommit.vim @tpope
runtime/syntax/gitconfig.vim @tpope
runtime/syntax/gitignore.vim @ObserverOfTime
runtime/syntax/gitolite.vim @sitaramc
runtime/syntax/gitrebase.vim @tpope
runtime/syntax/go.vim @bhcleek
Expand All @@ -336,6 +351,7 @@ runtime/syntax/html.vim @dkearns
runtime/syntax/i3config.vim @hiqua
runtime/syntax/icon.vim @dkearns
runtime/syntax/indent.vim @dkearns
runtime/syntax/j.vim @glts
runtime/syntax/jargon.vim @h3xx
runtime/syntax/java.vim @fleiner
runtime/syntax/jsonc.vim @izhakjakov
Expand Down Expand Up @@ -377,6 +393,7 @@ runtime/syntax/ps1xml.vim @heaths
runtime/syntax/psl.vim @danielkho
runtime/syntax/qb64.vim @dkearns
runtime/syntax/r.vim @jalvesaq
runtime/syntax/racket.vim @benknoble
runtime/syntax/raml.vim @in3d
runtime/syntax/ratpoison.vim @trapd00r
runtime/syntax/rc.vim @chrisbra
Expand Down Expand Up @@ -404,7 +421,7 @@ runtime/syntax/sshconfig.vim @Jakuje
runtime/syntax/sshdconfig.vim @Jakuje
runtime/syntax/sudoers.vim @e-kwsm
runtime/syntax/svn.vim @hdima
runtime/syntax/swayconfig.vim @jamespeapen
runtime/syntax/swayconfig.vim @jamespeapen
runtime/syntax/systemverilog.vim @Kocha
runtime/syntax/tags.vim @cecamp
runtime/syntax/tap.vim @petdance
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/builtin.txt
@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.0. Last change: 2022 Jun 27
*builtin.txt* For Vim version 9.0. Last change: 2022 Sep 10


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down
8 changes: 6 additions & 2 deletions runtime/doc/eval.txt
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 9.0. Last change: 2022 Jun 17
*eval.txt* For Vim version 9.0. Last change: 2022 Sep 09


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -1718,6 +1718,9 @@ Recommendation: don't do this.
Notice how execute() is used to execute an Ex command. That's ugly though.
In Vim9 script you can use a command block, see |inline-function|.

Although you can use the loop variable of a `for` command, it must still exist
when the closure is called, otherwise you get an error. *E1302*

Lambda expressions have internal names like '<lambda>42'. If you get an error
for a lambda expression, you can find what it is with the following command: >
:function <lambda>42
Expand Down Expand Up @@ -3397,7 +3400,8 @@ text...
it will show for three seconds and avoid a
|hit-enter| prompt. If you want to hide it before
that, press Esc in Normal mode (when it would
otherwise beep).
otherwise beep). If it disappears too soon you can
use `:messages` to see the text.
The message window is available when Vim was compiled
with the +timer and the +popupwin features.

Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/options.txt
@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.0. Last change: 2022 Jun 27
*options.txt* For Vim version 9.0. Last change: 2022 Sep 09


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down
3 changes: 3 additions & 0 deletions runtime/doc/tags
Expand Up @@ -4332,7 +4332,10 @@ E1295 textprop.txt /*E1295*
E1296 textprop.txt /*E1296*
E1297 vim9.txt /*E1297*
E1298 vim9.txt /*E1298*
E1299 tagsrch.txt /*E1299*
E13 message.txt /*E13*
E1300 userfunc.txt /*E1300*
E1302 eval.txt /*E1302*
E131 userfunc.txt /*E131*
E132 userfunc.txt /*E132*
E133 userfunc.txt /*E133*
Expand Down
11 changes: 8 additions & 3 deletions runtime/doc/tagsrch.txt
Expand Up @@ -889,13 +889,16 @@ like |CTRL-]|.

The function used for generating the taglist is specified by setting the
'tagfunc' option. The function will be called with three arguments:
a:pattern The tag identifier or pattern used during the tag search.
a:flags String containing flags to control the function behavior.
a:info Dict containing the following entries:
pattern The tag identifier or pattern used during the tag search.
flags String containing flags to control the function behavior.
info Dict containing the following entries:
buf_ffname Full filename which can be used for priority.
user_data Custom data String, if stored in the tag
stack previously by tagfunc.

Note that in a legacy function "a:" needs to be prepended to the argument name
when using it.

Currently up to three flags may be passed to the tag function:
'c' The function was invoked by a normal command being processed
(mnemonic: the tag function may use the context around the
Expand Down Expand Up @@ -931,6 +934,8 @@ If the function returns |v:null| instead of a List, a standard tag lookup will
be performed instead.

It is not allowed to change the tagstack from inside 'tagfunc'. *E986*
It is not allowed to close a window or change window from inside 'tagfunc'.
*E1299*

The following is a hypothetical example of a function used for 'tagfunc'. It
uses the output of |taglist()| to generate the result: a list of tags in the
Expand Down
23 changes: 13 additions & 10 deletions runtime/doc/todo.txt
@@ -1,4 +1,4 @@
*todo.txt* For Vim version 9.0. Last change: 2022 Jun 27
*todo.txt* For Vim version 9.0. Last change: 2022 Sep 10


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -38,17 +38,14 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------

When using :echomessage do use msg_row and msg_col, but save and restore.
How to test any failure?
Use :defer command:
- Use "D" flag of writefile() and mkdir() in tests.
(testdir/test_c*.vim done)

Improve :defer command:
- Use "D" flag of writefile() in tests.
- test "defer func()->funcouter()" fails (or use "funcouter")
- test "defer func().arg" fails
- test partial fails
- check arguments at :defer command
- Also when function does "qa!" or "cq"?
When using :echomessage do use msg_row and msg_col, but save and restore.
How to test any failure? If nothing fails perhaps it's OK alrady.

Drop Windows XP? #11089

Further Vim9 improvements, possibly after launch:
- Use Vim9 for more runtime files.
Expand Down Expand Up @@ -277,6 +274,7 @@ Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
Also, z= in German on a long word can take a very long time, but CTRL-C to
interrupt does not work. Where to add ui_breakcheck()?
New English spell files also have very slow suggestions.
French spell files don't work correctly. #4916

Make "g>" and "g<" in Visual mode move the text right or left.
Also for a block selection. #8558
Expand Down Expand Up @@ -2648,6 +2646,11 @@ Better 'rightleft' or BIDI support:


Spell checking:
- List of common misspellings in English:
https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
German:
https://de.wikipedia.org/wiki/Wikipedia:Liste_von_Tippfehlern/F%C3%BCr_Maschinen
There are other languages.
- [s does not find missing capital at start of the line. #10838
Probably because the dot at the end of the previous line isn't seen.
- When 'cursorline' is set and the first word should have SpellCap
Expand Down
7 changes: 4 additions & 3 deletions runtime/doc/userfunc.txt
@@ -1,4 +1,4 @@
*userfunc.txt* For Vim version 9.0. Last change: 2022 Jun 17
*userfunc.txt* For Vim version 9.0. Last change: 2022 Sep 09


VIM REFERENCE MANUAL by Bram Moolenaar
Expand All @@ -23,7 +23,7 @@ commands can be executed with the |:normal| command.

The function name must start with an uppercase letter, to avoid confusion with
builtin functions. To prevent from using the same name in different scripts
make them script-local. If you do use a global function the avoid obvious,
make them script-local. If you do use a global function then avoid obvious,
short names. A good habit is to start the function name with the name of the
script, e.g., "HTMLcolor()".

Expand Down Expand Up @@ -427,7 +427,8 @@ GetArg()->TheFunc()` does not work, it may work in a later version.

Errors are reported but do not cause aborting execution of deferred functions.

No range is accepted.
No range is accepted. The function can be a partial with extra arguments, but
not with a dictionary. *E1300*

==============================================================================

Expand Down
6 changes: 3 additions & 3 deletions runtime/doc/version9.txt
Expand Up @@ -72,7 +72,7 @@ Command line completion in a popup menu ~
Before there was the 'wildmenu' option, which uses the space of one line above
the statusline to show matches. Only a few matches fit there.

Now a popup menu can be used by setting "wildoptions' to "pum". This allows
Now a popup menu can be used by setting 'wildoptions' to "pum". This allows
for showing many more matches. This requires redrawing more of the display,
but since computers are fast enough that is not a problem.

Expand Down Expand Up @@ -336,7 +336,7 @@ Hide cursor when sleeping using |:sleep!|.
Add "multispace" to 'listchars' to show two or more spaces no matter where
they appear. Add "leadmultispace" to 'listchars' to show two or more leading
spaces. Add "lead" to 'listchars' to set the character used to show leading
spaces. Support specifying a character using the hexdecimal notation in
spaces. Support specifying a character using the hexadecimal notation in
'listchars' (\x, \u and \U).

Make 'listchars', 'virtualedit' and 'thesaurusfunc' global-local options.
Expand Down Expand Up @@ -28248,7 +28248,7 @@ Files: runtime/doc/repeat.txt, src/scriptfile.c, src/vim9script.c,
src/proto/vim9script.pro, src/testdir/test_source.vim

Patch 8.2.4608
Problem: getcompletion() does not work properly when 'wildoptions
Problem: getcompletion() does not work properly when 'wildoptions'
contains "fuzzy".
Solution: Do not use addstar(). (Yegappan Lakshmanan, closes #9992,
closes #9986)
Expand Down
30 changes: 27 additions & 3 deletions runtime/doc/vim9.txt
@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 9.0. Last change: 2022 Jun 25
*vim9.txt* For Vim version 9.0. Last change: 2022 Sep 10


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -1311,7 +1311,7 @@ Make sure to define the breakpoint before compiling the outer function.
The "inloop" variable will exist only once, all closures put in the list refer
to the same instance, which in the end will have the value 4. This is
efficient, also when looping many times. If you do want a separate context
for each closure call a function to define it: >
for each closure, call a function to define it: >
def GetClosure(i: number): func
var infunc = i
return () => infunc
Expand All @@ -1327,6 +1327,30 @@ for each closure call a function to define it: >
In some situations, especially when calling a Vim9 closure from legacy
context, the evaluation will fail. *E1248*

Note that at the script level the loop variable will be invalid after the
loop, also when used in a closure that is called later, e.g. with a timer.
This will generate error |E1302|: >
for n in range(4)
timer_start(500 * n, (_) => {
echowin n
})
endfor
You need to create a closure to store the current value of "n", so that it is
evaluated at the time the closure is created: >
def GetClosure(nr: number): func
return (_) => {
echowindow nr
}
enddef
for n in range(4)
timer_start(500 * n, GetClosure(n))
endfor
Using `echowindow` is useful in a timer, the messages go into a popup and will
not interfere with what the user is doing when it triggers.


Converting a function from legacy to Vim9 ~
*convert_legacy_function_to_vim9*
Expand Down Expand Up @@ -1618,7 +1642,7 @@ type, it can not be used in Vim9 script.
*E1211* *E1217* *E1218* *E1219* *E1220* *E1221*
*E1222* *E1223* *E1224* *E1225* *E1226* *E1227*
*E1228* *E1238* *E1250* *E1251* *E1252* *E1253*
*E1256* *E1297* *E1298*
*E1256* *E1297* *E1298* *E1301*
Types are checked for most builtin functions to make it easier to spot
mistakes.

Expand Down
2 changes: 1 addition & 1 deletion runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Jul 5
" Last Change: 2022 Sep 09

" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
Expand Down
13 changes: 13 additions & 0 deletions runtime/ftplugin/gitattributes.vim
@@ -0,0 +1,13 @@
" Vim filetype plugin
" Language: git attributes
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
" Last Change: 2022 Sep 08

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

setl comments=:# commentstring=#\ %s

let b:undo_ftplugin = 'setl com< cms<'
13 changes: 13 additions & 0 deletions runtime/ftplugin/gitignore.vim
@@ -0,0 +1,13 @@
" Vim filetype plugin
" Language: git ignore
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
" Last Change: 2022 Sep 10

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

setl comments=:# commentstring=#\ %s

let b:undo_ftplugin = 'setl com< cms<'

0 comments on commit 71b6d33

Please sign in to comment.