In .vimrc
, there are several lines that look like:
let g:SuperTabDefaultCompletionType="<c-x><c-o>"
How do I inspect them inside Vim? Something to this effect:
:echom &g:SuperTabDefaultCompletionType
But that command results in an error:
E113: Unknown option: SuperTabDefaultCompletionType E15: Invalid expression: &g:SuperTabDefaultCompletionType
How do I inspect these kinds of variables in Vim? Some plugins set some defaults which I need to inspect.
vim is provided with Vim. When run, the script produces a file with information about Vim's environment. To see the script, use the command :view $VIMRUNTIME/bugreport. vim in Vim.
Plain old :echo will print output, but it will often disappear by the time your script is done. Using :echom will save the output and let you run :messages to view it later.
:echo g:SuperTabDefaultCompletionType
works fine. It gives an error if the variable isn't defined.
Like lucapette wrote you can use :echo g:foo
to inspect a variable. You can also use :let
to see all defined variables and their values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With