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 214 remaining solutions by signing in and submitting your own entry
#215 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

215 active golfers, 661 entries

Leaderboard (lowest score wins):
15
#1 - Urtica dioica / @udioica

05/25/2012 at 07:49PM

15
#2 - James / @defactojames

10/17/2012 at 06:04PM

15
#3 - Marco Hinz / @_mhinz_

05/23/2013 at 03:52PM

15
#4 - Petro Тrouq / @zulolosi

08/31/2013 at 04:43PM

15
#5 - Sune Simonsen / @sunesimonsen

10/17/2013 at 06:58PM

15
#6 - John Braxler / @braxler

05/15/2014 at 08:06PM

15
#7 - jake romer / @notjakeromer

04/21/2015 at 01:43AM

15
#8 - P. Schwede / @pschwede

05/21/2015 at 07:28PM

15
#9 - Jon Krause / @jkrause314

01/12/2016 at 06:31AM

15
#10 - Ralf Haffa / @fatslo

02/27/2016 at 11:05PM

15
#11 - Miłosz Łakomy / @foobar01123

06/02/2016 at 10:35PM

15
#12 - LiquidsebTest / @LiquidsebTest

12/14/2016 at 09:43AM

15
#13 - Saki Gw / @Sakigw

12/14/2016 at 07:59PM

15
#14 - Daniel / @Daniel00288663

04/04/2017 at 09:51AM

15
#15 - Joel Meyer-Hamme / @JoelMeyerHamme

07/22/2017 at 05:32PM

15
#16 - Karol Łukaszewicz / @Karolukaszewicz

08/03/2017 at 05:23PM

15
#17 - Sergio / @voyeg3r

09/25/2017 at 10:44PM

15
#18 - Turkey Man / @lvturkeyman

11/27/2017 at 07:27AM

15
#19 - BarbaJol / @drpproteus

01/10/2018 at 06:33PM

15
#20 - Evgeny`s Kindle / @EvgenyKindle

05/15/2018 at 05:56AM

15
#21 - Asheq / @TwoMegaOhms

06/06/2018 at 02:00AM

15
#22 - spock900 / @spock9002

09/01/2019 at 04:19PM

15
#23 - yousef Ibrahim / @YucefIbrahim

10/25/2019 at 10:59AM

15
#24 - RockerZZY / @rocker_zzy

06/28/2020 at 11:26PM

15
#25 - blabla zincou / @BZincou

03/21/2022 at 08:13PM

15
#26 - russellzhaomao / @russellzhaomao

05/29/2022 at 01:00PM

15
#27 - Qing Liu / @poeminlash

08/09/2022 at 04:56AM

15
#28 - Janzen / @__Coos

09/22/2022 at 12:37PM

15
#29 - Daksha Chatur / @DakshaChatur

09/26/2022 at 04:14AM

15
#30 - Remus Dalrymple / @bornintheflames

12/13/2023 at 10:49PM