Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 4dcd7b572c8e510001000005

Interweave two blocks of text

Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?

Start file
one
two
three
four
five
six
seven
eight
nine
ten
1
2
3
4
5
6
7
8
9
10
End file
one	1
two	2
three	3
four	4
five	5
six	6
seven	7
eight	8
nine	9
ten	10

View Diff

1,20c1,10
< one
< two
< three
< four
< five
< six
< seven
< eight
< nine
< ten
< 1
< 2
< 3
< 4
< 5
< 6
< 7
< 8
< 9
< 10
---
> one	1
> two	2
> three	3
> four	4
> five	5
> six	6
> seven	7
> eight	8
> nine	9
> ten	10

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 203 remaining solutions by signing in and submitting your own entry
#204 Jurica / @Jurica34581259 - Score: 47 - 12/12/18 @ 12:02
:1,10s/$/\t<CR>1Gqa10j0yw10k$p<Esc>jq9@a:g/^[1-9]/d<CR>ZZ

0 comments


Created by: @mwhooker

204 active golfers, 574 entries

Leaderboard (lowest score wins):
23
#181 - Michael Jin / @michaeljin

03/12/2012 at 12:56AM

23
#182 - Jacek Wysocki / @ex00

06/14/2012 at 12:22PM

23
#183 - Chris Brown / @engineercyb

09/13/2012 at 01:21AM

23
#184 - Connie Qi / @connieqi

06/12/2014 at 02:40PM

23
#185 - AssertFailure / @AssertFailure

12/05/2018 at 11:57AM

23
#186 - grantopher orange / @grantopher

07/23/2019 at 08:10PM

24
#187 - Daniel Lundin / @danielundin

11/21/2011 at 07:42PM

24
#188 - simonced / @simonced

09/28/2014 at 12:15AM

25
#189 - Oliver Christ / @0liverChrist

11/12/2013 at 09:44PM

25
#190 - Habib Alamin / @alaminium94

12/22/2015 at 10:40AM

25
#191 - Avian Y / @y_avian

06/27/2017 at 07:40PM

26
#192 - Matt Donahoe / @mdonahoe

10/13/2011 at 05:37AM

26
#193 - ajh / @AlexJHammel

12/24/2012 at 07:35PM

26
#194 - Gurukandhamoorthi / @Gurukandhamoor1

08/03/2017 at 06:19PM

26
#195 - Jakub Jasiński / @jakub__jasinski

08/07/2018 at 09:09PM

26
#196 - shahanavaz m / @shahanavazm

02/21/2022 at 05:04AM

28
#197 - Matthew Broatch / @mnbroatch

07/09/2017 at 11:08PM

29
#198 - x03n046 / @x03n046

05/13/2022 at 12:32AM

30
#199 - Vojtěch Šívr / @VojtechSivr

06/09/2011 at 07:54PM

30
#200 - Christopher Erin / @MCNormalMode

09/21/2011 at 12:56AM

30
#201 - Tyler Breisacher / @tbreisacher

08/25/2012 at 09:34AM

35
#202 - Joel Gallant / @joelg236

03/09/2016 at 11:11PM

38
#203 - Narciso Guillen / @narcisoguillen

05/03/2012 at 05:30PM

47
#204 - Jurica / @Jurica34581259

12/12/2018 at 12:02PM