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):
17
#91 - Sammasati / @sammasati0

07/16/2011 at 03:02AM

17
#92 - Robert Robotter / @robrob12

07/19/2011 at 09:04AM

17
#93 - Pierre / @Pihour

07/27/2011 at 07:43PM

17
#94 - Enric Lluelles / @enriclluelles

07/29/2011 at 01:19AM

17
#95 - Junfeng / @junfeng

08/05/2011 at 06:51AM

17
#96 - Stephen Gordon / @DubsGordon

08/08/2011 at 10:06PM

17
#97 - William Wolf / @throughnothing

08/31/2011 at 04:46AM

17
#98 - Theodore Finn Gast / @tfgast

09/01/2011 at 08:17PM

17
#99 - David Jacobs / @dave_jacobs

09/02/2011 at 05:46AM

17
#100 - Tim Tsu / @vimgolfpunk

09/04/2011 at 11:31PM

17
#101 - Simon Scarfe / @simonscarfe

09/06/2011 at 11:55AM

17
#102 - Jesús Espino / @jespinog

09/07/2011 at 09:46AM

17
#103 - Terrance Kennedy / @Cyphus

09/09/2011 at 06:33AM

17
#104 - Justin Love / @wondible

09/18/2011 at 12:20PM

17
#105 - André Kvist Aronsen / @andrearonsen

10/24/2011 at 08:57AM

17
#106 - vimja / @vimja666

10/29/2011 at 07:59AM

17
#107 - William Dunand / @wdunand

11/15/2011 at 02:59AM

17
#108 - You-Siang Lin / @yslinnctu

11/29/2011 at 03:52AM

17
#109 - Ben Somers / @somanyrobots

11/30/2011 at 01:45AM

17
#110 - Gabriel Barta / @gbarta

12/02/2011 at 10:06AM

17
#111 - Martin Aumueller / @aumuell

12/14/2011 at 09:55AM

17
#112 - Jon Olin / @8BitTree

01/02/2012 at 02:10AM

17
#113 - derp derp / @derp__

01/03/2012 at 08:07AM

17
#114 - Vladyslav Marsikov / @gagabogolo

01/05/2012 at 10:01PM

17
#115 - Siu / @davidsinuela

02/15/2012 at 10:51PM

17
#116 - じょんあば / @john_ababa

02/27/2012 at 01:05PM

17
#117 - dominique pellé / @vimgolfisto

03/10/2012 at 05:35PM

17
#118 - cyberrodent_n / @cyberRodent_n

03/30/2012 at 06:17AM

17
#119 - Augustin Trancart / @autra42

04/23/2012 at 11:43AM

17
#120 - Rod Knowlton / @codelahoma

04/27/2012 at 12:31AM