Lines Matching refs:to

8 Before you can insert or delete text the cursor has to be moved to the right
9 place. Vim has a large number of commands to position the cursor. This
10 chapter shows you how to use the most important ones. You can find a list of
14 |03.2| Moving to the start or end of a line
15 |03.3| Moving to a character
17 |03.5| Moving to a specific line
32 commands, you can use a numeric prefix to move past multiple words. For
40 Notice that "w" moves to the start of the next word if it already is at the
42 The "b" command moves backward to the start of the previous word:
48 There is also the "e" command that moves to the next end of a word and "ge",
49 which moves to the previous end of a word:
55 If you are at the last word of a line, the "w" command will take you to the
56 first word in the next line. Thus you can use this to move through a
61 what Vim considers to be a word, see the 'iskeyword' option. If you try this
62 out in the help directly, 'iskeyword' needs to be reset for the examples to
65 It is also possible to move by white-space separated WORDs. This is not a
79 *03.2* Moving to the start or end of a line
81 The "$" command moves the cursor to the end of a line. If your keyboard has
84 The "^" command moves to the first non-blank character of the line. The "0"
85 command (zero) moves to the very first character of the line, and the <Home>
96 The "$" command takes a count, like most movement commands. But moving to
98 editor to move to the end of another line. For example, "1$" moves you to
99 the end of the first line (the one you're on), "2$" to the end of the next
106 *03.3* Moving to a character
112 want to go to the h of human. Just execute the command "fh" and the cursor
119 This also shows that the command "fy" moves to the end of the word really.
120 You can specify a count; therefore, you can go to the "l" of "foul" with
127 The "F" command searches to the left:
142 direction. The cursor is never moved to another line. Not even when the
145 Sometimes you will start a search, only to realize that you have typed the
146 wrong command. You type "f" to search backward, for example, only to realize
155 "%" command is very handy: It moves to the matching paren. If the cursor is
156 on a "(" it will move to the matching ")". If it's on a ")" it will move to
168 When the cursor is not on a useful character, "%" will search forward to find
170 "%" will search forward and find the first "(". Then it moves to its match:
177 *03.5* Moving to a specific line
184 This tells you that you might want to fix something on line 33. So how do you
185 find line 33? One way is to do "9999k" to go to the top of the file and "32j"
186 to go down thirty-two lines. It is not a good way, but it works. A much
187 better way of doing things is to use the "G" command. With a count, this
191 With no argument, "G" positions you at the end of the file. A quick way to
192 go to the start of a file use "gg". "1G" will do the same, but is a tiny bit
206 Another way to move to a line is using the "%" command with a count. For
207 example "50%" moves you to halfway the file. "90%" goes to near the end.
209 The previous assumes that you want to move to a line in the file, no matter if
210 it's currently visible or not. What if you want to move to one of the lines
255 Since 'number' is a boolean option, prepending "no" to its name has the
300 Think of CTRL-E to give you one line Extra. (If you use MS-Windows compatible
304 scroll backwards, use CTRL-B. These should be easy to remember: F for
308 the bottom of the screen. You would like to see the context of the line with
333 You will notice that when you type the "/" the cursor jumps to the last line
335 You can press the backspace key (backarrow or <BS>) to make corrections. Use
340 The characters .*[]^%/\?~$ have special meanings. If you want to use
344 to find the first #include after the cursor: >
348 And then type "n" several times. You will move to each #include in the text.
350 the third match. You can also use a count with "/": "4/the" goes to the
364 Normally you have to type exactly what you want to find. If you don't care
386 <Enter>, but press <Up> instead, Vim changes the prompt to "/two". Another
387 press of <Up> moves you to "/one".
388 You can also use the <Down> cursor key to move through the history of
391 If you know what a previously used pattern starts with, and you want to use it
395 The commands starting with ":" also have a history. That allows you to recall
401 Suppose you see the word "TheLongFunctionName" in the text and you want to
419 Similarly "\<" only matches at the beginning of a word. Thus to search for
425 use these start-of-word and end-of-word markers to only find whole words (you
426 can use "g*" and "g#" to match partial words).
431 While editing a program you see a variable called "nr". You want to check
432 where it's used. You could move the cursor to "nr" and use the "*" command
433 and press "n" to go along all the matches.
439 good way to see where the variable is used, without the need to type commands.
444 Then you need to switch it on again if you want to use it for the next search
445 command. If you only want to remove the highlighting, use this command: >
462 Use this to check if the right match will be found. Then press <Enter> to
463 really jump to that location. Or type more to change the search string.
476 Edit the file, as mentioned at |not-compatible|. Or use this command to
485 Then add a line with the command to set the option, just like you typed it in
490 "G" moves to the end of the file. "o" starts a new line, where you type the
501 The Vim editor uses regular expressions to specify what to search for.
502 Regular expressions are an extremely powerful and compact way to specify a
504 expressions are a bit tricky to specify.
550 If you really want to match a dot, you must avoid its special meaning by
562 When you make a jump to a position with the "G" command, Vim remembers the
577 Also, "j" and "k" are not considered to be a jump, even when you use a
578 count to make them move the cursor quite a long way away.
581 jumps to older positions (Hint: O for older). CTRL-I then jumps back to newer
582 positions (Hint: for many common keyboard layouts, I is just next to O).
589 You first jump to line 33, then search for a line that starts with "The".
590 Then with CTRL-O you jump back to line 33. Another CTRL-O takes you back to
591 where you started. If you now use CTRL-I you jump to line 33 again. And
592 to the match for "The" with another CTRL-I.
607 The ":jumps" command gives a list of positions you jumped to. The entry which
613 Vim enables you to place your own marks in the text. The command "ma" marks
616 To go to a mark, use the command `{mark}, where {mark} is the mark letter.
617 Thus to move to the a mark:
621 The command "'mark" (single quotation mark, or apostrophe) moves you to the
623 command, which also moves you to the marked column.
626 Suppose you have some text near the start of the file you need to look at,
628 Move to the text at the start and place the s (start) mark there: >
632 Then move to the text you want to work on and put the e (end) mark there: >
636 Now you can move around, and when you want to look at the start of the file,
637 you use this to jump there: >
641 Then you can use '' to jump back to where you were, or 'e to jump to the text
644 just easy to remember.
646 You can use this command to get a list of marks: >