Lines Matching refs:to
9 contains many features to aid in writing programs. Jump around to find where
28 tags file. This can be used by Vim to directly jump from any place to the
40 Now when you are in Vim and you want to go to a function definition, you can
41 jump to it by using the following command: >
46 The CTRL-] command jumps to the tag of the word that is under the cursor.
47 This makes it easy to explore a tangle of C code. Suppose, for example, that
50 call to "write_line" and pressing CTRL-], you jump to the definition of this
52 The "write_line" function calls "write_char". You need to figure out what
53 it does. So you position the cursor over the call to "write_char" and press
90 Now to go back. The CTRL-T command goes to the preceding tag. In the example
91 above you get back to the "write_line" function, in the call to "write_char".
92 This command takes a count argument that indicates how many tags to jump
94 following command goes to the tag on top of the list: >
100 These commands thus allow you to go down a call tree with CTRL-] and back
101 up again with CTRL-T. Use ":tags" to find out where you are.
107 containing the new function. But suppose you want to see not only the old
113 To split the current window and jump to the tag under the cursor use this
124 them. Vim will then only be able to jump to tags within that directory.
125 To find more tags files, set the 'tags' option to include all the relevant
134 "~/proj/sub/tags". For this situation Vim offers to search a whole directory
142 When Vim has to search many places for tags files, you can hear the disk
143 rattling. It may get a bit slow. In that case it's better to spend this
146 argument to search a whole directory tree: >
153 and even Vim scripts. See the ctags documentation to tune this.
154 Now you only need to tell Vim where your big tags file is: >
162 the ":tag" command will jump to the first one. If there is a match in the
164 You can now jump to other matches for the same tag with: >
168 Repeat this to find further matches. If there are many, you can select which
169 one to jump to: >
184 Enter nr of choice (<CR> to abort): ~
187 like to jump to. The information in the other columns give you a good idea of
192 :tfirst go to first match
193 :[count]tprevious go to [count] previous match
194 :[count]tnext go to [count] next match
195 :tlast go to last match
202 Command line completion is a good way to avoid typing a long tag name. Just
211 Vim to use a pattern to find the tag.
212 Suppose you want to jump to a tag that contains "block". First type
221 example, suppose you want to select a tag that starts with "write_": >
232 Since CTRL-] takes you to the definition of the identifier under the cursor,
246 but you can ignore that. Do ":setlocal ts=99" to clean it up a bit.
251 Move the cursor to the line that contains the function you want to go to.
252 Now press <Enter>. Vim will go to the other window and jump to the selected
259 'tagcase' as "followic", or set 'tagcase' to "ignore".
262 is to assume a sorted tags file, which makes a tags search a lot faster, but
265 The 'taglength' option can be used to tell Vim the number of significant
274 When you edit code that contains a function call, you need to use the correct
275 arguments. To know what values to pass you can look at how the function is
279 To open a preview window to display the function "write_char": >
283 Vim will open a window, and jumps to the tag "write_char". Then it takes you
284 back to the original position. Thus you can continue typing without the need
285 to use a CTRL-W command.
299 useful to edit a header file, for example: >
303 Finally, ":psearch" can be used to find a word in the current file and any
322 commands can be used to move around.
332 "#ifdef" and press %. Vim will jump to the "#else". Pressing % again takes
333 you to the "#endif". Another % takes you to the "#ifdef" again.
335 good way to check if you didn't forget an "#endif".
336 When you are somewhere inside a "#if" - "#endif", you can jump to the start
341 If you are not after a "#if" or "#ifdef" Vim will beep. To jump forward to
356 With the cursor in the last line, "[#" moves to the first line. The "#ifdef"
362 In C code blocks are enclosed in {}. These can get pretty long. To move to
363 the start of the outer block use the "[[" command. Use "][" to find the end.
365 The "[{" command moves to the start of the current block. It skips over
366 pairs of {} at the same level. "]}" jumps to the end.
384 of {} is for a method. When somewhere inside a class use "[m" to find the
387 Additionally, "[]" moves backward to the end of a function and "]]" moves
388 forward to the start of the next function. The end of a function is defined
408 Don't forget you can also use "%" to move between matching (), {} and [].
414 The "[(" and "])" commands work similar to "[{" and "]}", except that they
427 To move back to the start of a comment use "[/". Move forward to the end of a
443 "unsigned". A quick way to find this is with the "[I" command.
456 searched. In most cases this results in the right declaration to be found.
459 However, a few things must be right for "[I" to do its work. First of all,
461 works for C and C++. For other languages you will have to change it.
491 To fix the files that could not be found, add a directory to the 'path'
492 option. A good place to find out about this is the Makefile. Look out for
517 If you want to see which included files are actually found, use this
529 "[I" produces a list with only one line of text. When you want to have a
530 closer look at the first item, you can jump to that line with the command: >
537 want to jump to another item than the first one, type the number first: >
541 Will jump to the third item in the list. Remember that you can use CTRL-O to
542 jump back to where you started from.
560 line looks like that defines the items for "[D". You could change it to make
562 The commands related to "[D" are:
572 and jump to the first place where the word under the cursor is used: >
576 Hint: Goto Definition. This command is very useful to find a variable or
593 This will go back to the start of the current function and find the first
594 occurrence of the word under the cursor. Actually, it searches backwards to