Take the 2-minute tour ×  What's the syntax for selecting a
range of lines?  I want to run a command over lines 1405 until
1700.  And one from 1405 until the end of file, without wanting
to look up that number.  Update: Is it possible to select a
range from the current line to Nth line?  share|improve this
question add comment  3 Answers  up vote 8 down vote accepted
You can do this (replace d with your command)    share|improve
this answer add comment  For your update: use .,N where N is the
line you want.  (and in case you have further updates, check out
:he range).  share|improve this answer RTFM instead of just
asking? Crazy concept :) But yeah, quite helpful indeed. – 
k0pernikus Jan 26 '12 at 20:05 worth a look :) –  Edd Steel Jan
26 '12 at 20:20 add comment   • Go to line 1405 by typing:
1405G.   • Press V to switch to VISUAL LINE mode and then go to
line 1701 by typing: 1701G.   • Now your lines are selected, you
can run a command on them. For example, to replace foo with bar
type: :s/foo/bar/. share