Vim Tips Wiki
(Undo revision 37780 by 27.251.30.70 (talk))
Tag: Visual edit
Line 13: Line 13:
 
An easy way to to get to a line (whose number we know) faster is to combine some existing methods:
 
An easy way to to get to a line (whose number we know) faster is to combine some existing methods:
 
<pre>
 
<pre>
  +
open the current file in VI mode.</pre>
:123<CR>
 
  +
Then press '/' slash and then enter number(line number) :)
or
 
123G
 
or
 
123gg
 
</pre>
 
   
 
The solution is to map in normal mode the enter to G.
 
The solution is to map in normal mode the enter to G.
 
<pre>
 
<pre>
:nmap <CR> G
 
 
</pre>
 
</pre>
   
Line 28: Line 23:
   
 
==Comments==
 
==Comments==
  +
Though
 
  +
:123[Enter]
 
 
takes you to line 123 in the file,
 
takes you to line 123 in the file,
   

Revision as of 08:44, 26 September 2014

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:

open the current file in VI mode.
Then press '/' slash and then enter number(line  number) :)

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


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

Comments

takes you to line 123 in the file,

123[Enter]

takes you 123 lines down from your present position.