History
Article Edit this page Discussion

Moving around

From Vim Tips Wiki

(Redirected from VimTip48)
Jump to: navigation, search

Tip 48 Previous Next Created: March 14, 2001 Complexity: basic Author: Anon Version: 5.7


You can save a lot of time when navigating through text by using appropriate movement commands. In most cases the cursor keys are not the best choice.

Here are some basic movement commands that may help you acquire a taste for more:

Move to the end of a word.
Move forward to the beginning of a word.
3w 
Move forward three words.
Move backward to the beginning of a word.
3b 
Move backward three words.
Move to the end of the line.
Move to the beginning of the line.
Move to the first non-blank character of the line.
Jump forward one sentence.
Jump backward one sentence.
Jump forward one paragraph.
Jump backward one paragraph.
Jump to the top of the screen.
Jump to the middle of the screen.
Jump to the bottom of the screen.
10<PageUp> or 10<CTRL-B>
Move 10 pages up.
5<PageDown> or 5<CTRL-F>
Move 5 pages down.
Jump to end of file.
1G 
Jump to beginning of file (same as gg).
50G 
Jump to line 50.
'm 
Jump to the beginning of the line of mark m.
`m 
Jump to the cursor position of mark m.
''
Return to the line where the cursor was before the latest jump.
(Two single quotes.)
``
Return to the cursor position before the latest jump (undo the jump).
(Two back ticks. This is above the Tab key on some keyboards.)
 % 
Jump to corresponding item, e.g. from an open brace to its matching closing brace.

[edit] References

[edit] Comments

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Pixar
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Dark Shadows
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions


Vote for collaboration of the month.

Send this article to a friend
"Moving around"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation