Vim Tips Wiki
m (New page: {{review}} {{Tip |id=9 |title=Displaying a variable/macro definition |created=February 24, 2001 18:00 |complexity=basic |author=Yegappan |version=5.7 |rating=120/43 |text= To display th...)
 
m (Added to Usage Category + minor reformating)
Line 1: Line 1:
  +
{{Review}}
 
  +
[[Category:Usage]]
{{review}}
 
 
{{Tip
 
{{Tip
 
|id=9
 
|id=9
Line 6: Line 6:
 
|created=February 24, 2001 18:00
 
|created=February 24, 2001 18:00
 
|complexity=basic
 
|complexity=basic
|author=Yegappan
+
|author=[[User:Yegappan|Yegappan]]
 
|version=5.7
 
|version=5.7
 
|rating=120/43
 
|rating=120/43
Line 12: Line 12:
   
   
To display the definition of a variable, place the cursor on the
+
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.
 
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
 
   
 
Note that these commands will work most of the time (not all the time). To get more help on these commands, use
:help [d
 
  +
*<nowiki>:help [i</nowiki>
  +
*<nowiki>:help [d</nowiki>
 
}}
 
}}
   

Revision as of 12:14, 11 June 2007

Previous TipNext Tip

Tip: #9 - Displaying a variable/macro definition

Created: February 24, 2001 18:00 Complexity: basic Author: Yegappan Version: 5.7 Karma: 120/43 Imported from: Tip#9

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

Comments

Use [I on a variable display all the lines having that variable with line numbers. This is very useful for browsing some C Code.

maneesh--AT--india.hp.com , February 25, 2001 2:31


You can also do ]<c-i> do JUMP to the place where it is defined

dp--AT--orion.spectral-sys.com , February 28, 2001 10:58


gd

will also take you to where it is defined (unless it is global, in which case gD works)

bindu--AT--wavell.net , November 11, 2001 14:28


sweet !

os.junkie--AT--gmail.com , February 3, 2006 10:48