There are Vim and Vimscript documents scattered around the web that I refer to. With the exception of the brilliant http://learnvimscriptthehardway.stevelosh.com/ , the one I've visited the most is http://www.ibm.com/developerworks/library/l-vim-script-1/ - specifically for the table below (just about the only failing of Learn Vimscript the Hard Way is not having an equivalent):
Vimscript Variable Scoping:
Prefix | Meaning |
---|---|
g:varname | The variable is global |
s:varname | The variable is local to the current script file |
w:varname | The variable is local to the current editor window |
t:varname | The variable is local to the current editor tab |
b:varname | The variable is local to the current editor buffer |
l:varname | The variable is local to the current function |
a:varname | The variable is a parameter of the current function |
v:varname | The variable is one that Vim predefines |
A similar table that I want to keep with it:
Vimscript Pseudovariables:
Prefix | Meaning |
---|---|
&varname | A Vim option (local option if defined, otherwise global) |
&l:varname | A local Vim option |
&g:varname | A global Vim option |
@varname | A Vim register |
$varname | An environment variable |