sponsor Vim development Vim logo Vim Book Ad

basic Tip #9: Displaying a variable/macro definition

 tip karma   Rating 21/14, Viewed by 1859 

created:   February 24, 2001 18:00      complexity:   basic
author:   Yegappan      as of Vim:   5.7


To display the definition of a variable, place the cursor on the
variable and use the [i command.  To display a macro definition,
place the cursor on the macro name and use the [d command.
Note that these commands will work most of the time (not all the
time).  To get more help on these commands, use

:help [i
:help [d

 rate this tip  Life Changing Helpful Unfulfilling 

<<Jumping to the declaration of a local/global variable | Jumping to previosuly visited locations in a file >>

Additional Notes

[email protected], February 25, 2001 2:31
Use [I on a variable display all the lines having that variable with line numbers. This is very useful for browsing some C Code.
[email protected], February 28, 2001 10:58
You can also do ]<c-i> do JUMP to the place where it is defined
[email protected], November 11, 2001 14:28
gd

will also take you to where it is defined (unless it is global, in which case gD works)
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to [email protected] after searching the archive. Help Bram help Uganda.
Sponsored by Web Concept Group Inc. SourceForge Logo