diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-18 16:26:24 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-18 16:26:24 +0000 |
commit | fd218c8a36e7ed33f7a205163690c5b7d2f31f8a (patch) | |
tree | dafd764852a4620a875df01494dc9d3199b6da3f /runtime | |
parent | 6079da7cfb10c798535224c92db7fedd3914cb71 (diff) | |
download | vim-git-fd218c8a36e7ed33f7a205163690c5b7d2f31f8a.tar.gz |
patch 8.2.4136: Vim9: the "autoload" argument of ":vim9script" is not usefulv8.2.4136
Problem: Vim9: the "autoload" argument of ":vim9script" is not useful.
Solution: Remove the argument. (closes #9555)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/repeat.txt | 7 | ||||
-rw-r--r-- | runtime/doc/vim9.txt | 15 |
2 files changed, 11 insertions, 11 deletions
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 067234a01..9a82ba463 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -365,12 +365,11 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. Vim version, or update Vim to a newer version. See |vimscript-version| for what changed between versions. -:vim9s[cript] [noclear] [autoload] *:vim9s* *:vim9script* +:vim9s[cript] [noclear] *:vim9s* *:vim9script* Marks a script file as containing |Vim9-script| commands. Also see |vim9-namespace|. Must be the first command in the file. For [noclear] see |vim9-reload|. - For [autoload] see |vim9-autoload|. Without the |+eval| feature this changes the syntax for some commands. See |:vim9cmd| for executing one command with Vim9 @@ -378,8 +377,8 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. *:scr* *:scriptnames* :scr[iptnames] List all sourced script names, in the order they were - first sourced. The number is used for the script ID - |<SID>|. + first encountered. The number is used for the script + ID |<SID>|. For a script that was used with `import autoload` but was not actually sourced yet an "A" is shown after the script ID. diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt index 94a505773..bbdc2bdf4 100644 --- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -1,4 +1,4 @@ -*vim9.txt* For Vim version 8.2. Last change: 2022 Jan 15 +*vim9.txt* For Vim version 8.2. Last change: 2022 Jan 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1523,17 +1523,18 @@ actually needed. Using the autoload mechanism is recommended: directory. 2. In the autoload script put the bulk of the code. > - vim9script autoload + vim9script export def Stuff(arg: string) ... < This goes in .../autoload/for/search.vim. - Adding "autoload" to `:vim9script` has the effect that "for#search#" will - be prefixed to every exported item. The prefix is obtained from the file - name, as you would to manually in a legacy autoload script. Thus the - exported function can be found with "for#search#Stuff", but you would - normally use `import autoload` and not need to specify the prefix. + Putting the "search.vim" script under the "/autoload/for/" directory has + the effect that "for#search#" will be prefixed to every exported item. The + prefix is obtained from the file name, as you would to manually in a + legacy autoload script. Thus the exported function can be found with + "for#search#Stuff", but you would normally use `import autoload` and not + use the prefix. You can split up the functionality and import other scripts from the autoload script as you like. This way you can share code between plugins. |