作用域
:h :internal-variables
3. Internal variable internal-variables E461An internal variable name can be made up of letters, digits and '_'. But itcannot start with a digit. It's also possible to use curly braces, seecurly-braces-names.An internal variable is created with the ":let" command :let.An internal variable is explicitly destroyed with the ":unlet" command:unlet.Using a name that is not an internal variable or refers to a variable that hasbeen destroyed results in an error.There are several name spaces for variables. Which one is to be used isspecified by what is prepended:(nothing) In a function: local to a function; otherwise: globalbuffer-variable b: Local to the current buffer.window-variable w: Local to the current window.tabpage-variable t: Local to the current tab page.global-variable g: Global.local-variable l: Local to a function.script-variable s: Local to a :source'ed Vim script.function-argument a: Function argument (only inside a function).vim-variable v: Global, predefined by Vim.
编写帮助文档
:help help-writing
https://learnvimscriptthehardway.stevelosh.com/chapters/54.html
