Reverse and count
Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.
Start file
Sixth line
Fifth line
Fourth line
Third line
Second line
First line
End file
1. First line
2. Second line
3. Third line
4. Fourth line
5. Fifth line
6. Sixth line
1,6c1,6
< Sixth line
< Fifth line
< Fourth line
< Third line
< Second line
< First line
---
> 1. First line
> 2. Second line
> 3. Third line
> 4. Fourth line
> 5. Fifth line
> 6. Sixth line
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock
150 remaining solutions by
signing in and submitting your own entry
#151
neleai / @enlaei -
Score: 78 -
12/31/10 @ 21:49
dd<Down><Down><Down><Down>p<Up>dd<Up><Up><Up><Up>pdd<Home><Up>p<Up>dd<Down><Down><Down>p<Up>dd<Up><Up><Up>p<Down>ddp<Up><Up><Up><Up>i1. <Down><Home>2. <Down><Home>3. <Down><Home>4. <Down><Home>5.,<BS> <Down><Home>6. <Esc>:wq<CR>
0 comments
151 active golfers, 389 entries
Leaderboard (lowest score wins):
06/25/2015 at 07:17PM
01/20/2016 at 10:29PM
#3 - Peter Brynza / @v3_1
08/28/2016 at 08:07PM
11/28/2017 at 06:20PM
05/27/2018 at 01:48AM
08/14/2018 at 03:29PM
12/27/2019 at 12:55PM
01/22/2021 at 06:10AM
02/20/2021 at 04:12AM
08/13/2017 at 04:05PM
03/25/2019 at 03:33PM
09/30/2020 at 09:08PM
#13 - Aurélien Delahaye / @alkove
01/02/2011 at 09:29PM
01/03/2011 at 10:48PM
#15 - Danny O'Sullivan / @db0s
01/05/2011 at 11:01AM
01/08/2011 at 11:04PM
06/11/2011 at 12:27AM
06/19/2011 at 05:21PM
07/19/2011 at 02:42PM
10/09/2011 at 07:58PM
12/22/2011 at 04:18AM
01/17/2012 at 06:40PM
03/03/2012 at 06:25PM
03/31/2012 at 06:11PM
04/22/2012 at 03:07AM
09/25/2012 at 12:04AM
07/25/2013 at 03:21AM
06/01/2015 at 09:03PM
07/08/2020 at 11:44PM