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 54698da795f6da00020d85ed

Condensed Cases

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

Start file
enum PlaybackRequestType {
    case Next
    case Previous
    case Play
    case Stop
}
End file
enum PlaybackRequestType {
    case Next, Previous, Play, Stop
}

View Diff

2,5c2
<     case Next
<     case Previous
<     case Play
<     case Stop
---
>     case Next, Previous, Play, Stop

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 David English / @bavib26 - Score: 46 - 02/04/15 @ 03:26
jj3ddklllllllllllla, Previous, p<BS>Play, Stop<Esc>ZZ

0 comments


Created by: @ajh_17

204 active golfers, 652 entries

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

11/17/2014 at 09:20AM

12
#2 - John Braxler / @braxler

11/17/2014 at 04:49PM

12
#3 - Petro Тrouq / @zulolosi

11/17/2014 at 08:19PM

12
#4 - Aldo Utrera / @aldoutrera

11/19/2014 at 04:58PM

12
#5 - Michael Aston / @pennyOsl

11/20/2014 at 08:07PM

12
#6 - Grisha Pushkov / @readoonly

11/23/2014 at 06:33PM

12
#7 - Alex K / @alex_kononovich

11/24/2014 at 01:12PM

12
#8 - David Barker / @dashleybarker

11/25/2014 at 10:48PM

12
#9 - zmo / @guyzmo

11/25/2014 at 11:06PM

12
#10 - Ivan Brennan / @ivanbrennan

11/27/2014 at 01:50AM

12
#11 - Roberto Alegro / @robertoaall

11/30/2014 at 04:00PM

12
#12 - John / @rum2mur

12/01/2014 at 06:17PM

12
#13 - kobby / @_kafdot_

12/09/2014 at 07:07AM

12
#14 - Jakub Horák / @kubahorak

12/12/2014 at 04:12PM

12
#15 - Alex Birdsall / @OilCanSamson

12/17/2014 at 06:26AM

12
#16 - Joshua Greeenberg / @JoshuaGreeenber

12/19/2014 at 12:39PM

12
#17 - Karun Ramakrishnan / @the_karun

12/23/2014 at 11:22PM

12
#18 - juicelink / @juicelink

12/30/2014 at 07:55AM

12
#19 - kimber gonzalez / @kimberlycreates

01/07/2015 at 03:59PM

12
#20 - Charles H. Leggett / @cleggett

01/12/2015 at 04:19PM

12
#21 - mark0829 / @mark0829

01/25/2015 at 11:55AM

12
#22 - Daniel Pham / @dany_pham

01/31/2015 at 08:17PM

12
#23 - Naseem Al-Naji / @NaseemAlnaji

02/19/2015 at 09:41PM

12
#24 - Michael Giuffrida / @mgiuffrida

02/22/2015 at 04:53AM

12
#25 - DrHobo / @_DrHobo_

03/11/2015 at 05:15AM

12
#26 - Evan Coleman / @edc1591

05/11/2015 at 09:30PM

12
#27 - François Marais / @maraisf

05/21/2015 at 11:08PM

12
#28 - Sigurður Ægir Jónsso / @siggiae

06/01/2015 at 09:21AM

12
#29 - Sahana Rajasekar / @sahanarajasekar

06/11/2015 at 04:17AM

12
#30 - Mutter Mumble / @muttermumble

07/10/2015 at 12:13PM