Vim Tips Wiki
Explore
Main Page
All Pages
Community
Interactive Maps
Community portal
To do
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Vim Tips Wiki
1,649
pages
Explore
Main Page
All Pages
Community
Interactive Maps
Community portal
To do
Editing
Moving around
Back to page
Edit
Edit source
View history
Talk (0)
Edit Page
Moving around
We recommend that you
log in
before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your
Watchlist
.
Creating an account
is quick and free.
The edit appears to have already been undone.
Anti-spam check. Do
not
fill this in!
{{TipImported |id=48 |previous=47 |next=49 |created=2001 |complexity=basic |author= |version=5.7 |rating=41/23 |category1=Moving |category2= }} 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: ; e : Move to the end of a word. ; w : Move forward to the beginning of a word. ; 3w : Move forward three words. ; W : Move forward a WORD (any non-whitespace characters). ; b : Move backward to the beginning of a word. ; 3b : Move backward three words. ; $ : Move to the end of the line. ; 0 : 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. ; j : Jump forward one line. ; 10j : Jump forward 10 lines ; k : Jump backward one line. ; 10k : Jump backward 10 lines. ; H : Jump to the top of the screen. ; M : Jump to the middle of the screen. ; L : 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. ; G : Jump to end of file. ; g : Jump x screen lines in direction (up,down) - useful for moving through a long, wrapped line of text. ; 1G : Jump to beginning of file (same as '''gg'''). ; 50G : Jump to line 50. ; mx : Set mark x at the current cursor position. ; 'x : Jump to the beginning of the line of mark x. ; `x : Jump to the cursor position of mark x. ; <nowiki>''</nowiki> : 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 the last-changed line. ; % : Jump to corresponding item, e.g. from an open brace to its matching closing brace. See [[Moving to matching braces]] for more. ; | : Jump to the 1st column of the current line. ; 42| : Jump to the 42nd column of the current line. === '''g;''' === Jump to the place of last edit. Can be quite helpful while debugging or editing files. : ==References== *{{help|motion.txt}} *{{help|search-commands}} ==Comments==
Summary:
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Help
(
view source
)
Template:Navigation
(
view source
)
Template:TipImported
(
view source
)
Follow on IG
TikTok
Join Fan Lab