History
Article Edit this page Discussion

Jump to a line number

From Vim Tips Wiki

(Redirected from VimTip336)
Jump to: navigation, search

Tip 336 Previous Next Created: October 3, 2002 Complexity: basic Author: Odyss Version: 5.7


An easy way to to get to a line (whose number we know) faster is to combine some existing methods:

:123<CR>
or
123G
or
123gg

The solution is to map in normal mode the enter to G.

:nmap <CR> G

We can type the line number and then press Enter to get there.

[edit] Comments

Though

:123[Enter]

takes you to line 123 in the file,

123[Enter]

takes you 123 lines down from your present position.


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
Doctor Who
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Mystery Science Theater 3000
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Jump to a line number"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation