Wikia

Vim Tips Wiki

Jump to a line number

Talk0
1,612pages on
this wiki
Revision as of 17:39, December 11, 2013 by Fritzophrenic (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Tip 336 Printable Monobook 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.

CommentsEdit

Though

:123[Enter]

takes you to line 123 in the file,

123[Enter]

takes you 123 lines down from your present position.


Around Wikia's network

Random Wiki