From e77b44673d8e7a38662328b4db4bbc9ed11666bd Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 28 Sep 2026 00:02:06 -0400 Subject: [PATCH] vim: refresh from latest internal --- vimscriptfull.md | 14 +++----------- vimscriptguide.md | 4 ++-- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/vimscriptfull.md b/vimscriptfull.md index 9178388..394b349 100644 --- a/vimscriptfull.md +++ b/vimscriptfull.md @@ -211,7 +211,7 @@ All other language features are fair game. name with the plugin (with a "vim-" prefix or ".vim" suffix if desired). * Plugin metadata should be declared in the addon-info.json format (see the - [VAM documentation](http://goo.gl/CUXJZC) for details). + [VAM documentation](https://goo.gl/CUXJZC) for details). * Functions should go in the `autoload/` subdirectory of your plugin. @@ -300,7 +300,7 @@ Use [vimdoc](https://github.com/google/vimdoc). Provide help files generated by [vimdoc](https://github.com/google/vimdoc). Write documentation in .vim files in conformance with the vimdoc standards and include fields like "description" and "author" in the addon-info.json file (see -the [VAM documentation](http://goo.gl/CUXJZC)). +the [VAM documentation](https://goo.gl/CUXJZC)). ### Whitespace @@ -525,14 +525,12 @@ Vim plugins should provide any or all of the following: **Commands**, ### Commands - * Define in `plugin/commands.vim`. * CommandNamesLikeThis. * Prefer semantic names to a unified prefix. * Do not use `[!]` * Extract logic into functions. - * `CommandNamesLikeThis` * Commands should be defined in one block with no whitespace between them. @@ -582,14 +580,12 @@ Vim plugins should provide any or all of the following: **Commands**, ### Autocommands - * Define in `plugin/autocmds.vim`. * Use augroups. * `augroup_names_like_this`. * Clear the augroup first. * Extract logic into functions. - * All autocommands should be defined in the `plugin/autocmds.vim` file. * This allows users to disable your autocommands with `Glaive myplugin @@ -618,14 +614,12 @@ Vim plugins should provide any or all of the following: **Commands**, ### Functions - * FunctionNamesLikeThis. * Autoload all functions. * Prefix script-local functions with `s:` * Use `[!]`. * Use `[abort]`. - * `FunctionNamesLikeThis` * Prefix all script-local functions with `s:` @@ -670,12 +664,10 @@ Vim plugins should provide any or all of the following: **Commands**, ### Mappings - * Provide opt-in key mappings in `plugin/mappings.vim`. * `` mappings can be defined in `plugin/plugs.vim` (unlike mappings.vim, plugs.vim is opt-out). - * Define key mappings in `plugin/mappings.vim`, using `maktaba#plugin#MapPrefix` to get a prefix. @@ -729,7 +721,7 @@ Declare dependencies in addon-info.json and use `maktaba`. Declaring dependencies in addon-info.json allows conformant plugin managers (like VAM) to ensure dependencies are installed. See the -[VAM documentation](http://goo.gl/CUXJZC) for details. +[VAM documentation](https://goo.gl/CUXJZC) for details. Calling `maktaba#library#Require` from dependent code at runtime ensures that dependencies have been installed and that they don't include unsafe non-library diff --git a/vimscriptguide.md b/vimscriptguide.md index be32431..3209a5e 100644 --- a/vimscriptguide.md +++ b/vimscriptguide.md @@ -164,7 +164,7 @@ Group your functionality as a plugin, unified in one directory (or code repository) which shares your plugin's name (with a "vim-" prefix or ".vim" suffix if desired). It should be split into plugin/, autoload/, etc. subdirectories as necessary, and it should declare metadata in the -addon-info.json format (see the [VAM documentation](http://goo.gl/CUXJZC) for +addon-info.json format (see the [VAM documentation](https://goo.gl/CUXJZC) for details). @@ -259,7 +259,7 @@ Similar to python. You need not go out of your way to remove it. Trailing whitespace is allowed in mappings which prep commands for user - input, such as `noremap gf :grep -f`. + input, such as `noremap gf :grep -f `. * Restrict lines to 80 columns wide