Real Vim ninjas count every keystroke - do you?

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

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

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 4ff83e9749534f000100003f

run of the mill SQL execute

lots of room for improvement

Start file
myCursor.execute('SELECT * FROM "AllUsers"("uid", "email", "firstName", "lastName", "roles", "facebookid", "twitterid", "twitterName", "photoURL", "gender", "timeJoined", "tag", "Permissions", "address1", "address2", "city", "zip", "state", "country", "mobilephone", "landline");', {"uid", "email", "firstName", "lastName", "roles", "facebookid", "twitterid", "twitterName", "photoURL", "gender", "timeJoined", "tag", "Permissions", "address1", "address2", "city", "zip", "state", "country", "mobilephone", "landline"})
End file
curg.execute('SELECT * FROM "AllUsers"(%(uid)d, %(email)s, %(firstName)s, %(lastName)s, %(roles)s, %(facebookid)d, %(twitterid)d, %(twitterName)s, %(photoURL)s, %(gender)s,     %(timeJoined)s, %(tag)s, %(Permissions)s, %(address1)s, %(address2)s, %(city)s, %(zip)s, %(state)s, %(country)s, %(mobilephone)s, %(landline)s);',  {'uid':uid, 'email':email    , 'firstName':firstName, 'lastName':lastName, 'roles':roles, 'facebookid':facebookid, 'twitterid':twitterid, 'twitterName':twitterName, 'photoURL':photoURL, 'gender':gender,     'timeJoined':timeJoined, 'tag':tag, 'Permissions':Permissions, 'address1':address1, 'address2':address2, 'city':city, 'zip':zip, 'state':state, 'country':country, 'mobilephon    e':mobilephone, 'landline':landline});

View Diff

1c1
< myCursor.execute('SELECT * FROM "AllUsers"("uid", "email", "firstName", "lastName", "roles", "facebookid", "twitterid", "twitterName", "photoURL", "gender", "timeJoined", "tag", "Permissions", "address1", "address2", "city", "zip", "state", "country", "mobilephone", "landline");', {"uid", "email", "firstName", "lastName", "roles", "facebookid", "twitterid", "twitterName", "photoURL", "gender", "timeJoined", "tag", "Permissions", "address1", "address2", "city", "zip", "state", "country", "mobilephone", "landline"})
---
> curg.execute('SELECT * FROM "AllUsers"(%(uid)d, %(email)s, %(firstName)s, %(lastName)s, %(roles)s, %(facebookid)d, %(twitterid)d, %(twitterName)s, %(photoURL)s, %(gender)s,     %(timeJoined)s, %(tag)s, %(Permissions)s, %(address1)s, %(address2)s, %(city)s, %(zip)s, %(state)s, %(country)s, %(mobilephone)s, %(landline)s);',  {'uid':uid, 'email':email    , 'firstName':firstName, 'lastName':lastName, 'roles':roles, 'facebookid':facebookid, 'twitterid':twitterid, 'twitterName':twitterName, 'photoURL':photoURL, 'gender':gender,     'timeJoined':timeJoined, 'tag':tag, 'Permissions':Permissions, 'address1':address1, 'address2':address2, 'city':city, 'zip':zip, 'state':state, 'country':country, 'mobilephon    e':mobilephone, 'landline':landline});

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 10 remaining solutions by signing in and submitting your own entry
#11 Tautvidas Sipavičius / @tautvidas - Score: 168 - 08/10/12 @ 11:40
2f(v%:s/\%V"\(\w\+\)"/%(\1)s/g<CR>cwcurg<Esc>2f(v%:s\V<BS>%Vid.s/id)d/g<CR>v%:s\%V<BS><BS><BS>/\%Vid.s/id)d/g<CR>f{v%:s/\%V"(<BS>\(\w\+\)"/'\1':\1/g<CR>/%(ti<CR>4i <Esc>f{i <Esc>2f,4i <Esc>9f,l4i <Esc>/ne'<CR>l4i <Esc>A;<Esc>:wq<CR>

0 comments

#12 Eric Mathison / @ericmathison - Score: 288 - 07/13/12 @ 02:13
:map <F4> di"hi%()<esc>hpllxxi<CR>/"<CR>nn.<F4>d<Esc>n<F4>s<Esc>n<F4>s<Esc>n<F4>s<Esc>n<F4>s<Esc>n<F4>d<Esc>n<F4>d<Esc>n<F4>s<Esc>n<F4>s<Esc>n<F4>s<Esc>n<F4>s<Esc>n<F4>s<Esc>n<F4>s<Esc><F4><Esc>ujgj,NN<F4>s<Esc>n<F4>s<Esc>n<F4>s<Esc>n<F4>s<Esc>n<F4>s<Esc>n<F4>s<Esc>n<F4>s<Esc>n<F4>s<Esc>n:map <F5> yi"na:<esc>pn<CR><F5><F5><F5><F5><F5><F5><F5><F5><F5><F5><F5><F5><F5><F5><F5><F5><F5><F5><F5><F5><F5>A;<Esc>5Fei    <Esc>gkgknr':map <F6> n.<CR><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6><F6>0cwcurg10f,<BS><BS><BS><BS><Esc>10f,a    <Esc>jgjF{i <Esc>2fla    <Esc>gjF,.ZZ

0 comments

#13 w / @_weslly - Score: 754 - 07/18/12 @ 09:14
Ccurg.execute('SELECT * FROM "AllUsers"(%(uid)d, %(email)s, %(firstName)s, %(lastName)s, %(roles)s, %(facebookid)d, %(twitterid)d, %(twitterName)s, %(photoURL)s, %(gender)s,     %(timeJoined)s, %(tag)s, %(Permissions)s, %(address1)s, %(address2)s, %(city)s, %(zip)s, %(state)s, %(country)s, %(mobilephone)s, %(landline)s);',  {'uid':uid, 'email':email    , 'firstName':firstName, 'lastName':lastName, 'roles':roles, 'facebookid':facebookid, 'twitterid':twitterid, 'twitterName':twitterName, 'photoURL':photoURL, 'gender':gender,     'timeJoined':timeJoined, 'tag':tag, 'Permissions':Permissions, 'address1':address1, 'address2':address2, 'city':city, 'zip':zip, 'state':state, 'country':country, 'mobilephon    e':mobilephone, 'landline':landline});<CR><BS><Esc>ZZ

0 comments

Created by: @alimoeeny

13 active golfers, 16 entries

Leaderboard (lowest score wins):
4654945923_eb2c60ee5f_normal
66
#1 - Kerson Hsiao / @KersonHsiao

07/11/2012 at 01:51AM

Dsc_0096_2_normal
67
#2 - Victor Ramirez / @virako

10/19/2012 at 05:13PM

Q6hrg93p4r3hn56thmd0_normal
69
#3 - Urtica dioica / @udioica

01/16/2013 at 09:52PM

40051_789281885907_29616532_44170636_2091417_n_normal
73
#4 - Conner McDaniel / @connermcd

07/07/2012 at 11:08AM

Default_profile_1_normal
76
#5 - John Anderson / @opejn

07/30/2012 at 12:53AM

Jlove201003sq_normal
82
#6 - Justin Love / @wondible

07/09/2012 at 07:37AM

Default_profile_3_normal
92
#7 - James Davis / @tripvg

08/05/2012 at 08:55AM

Default_profile_0_normal
114
#8 - Damien Chilot / @duser_2

10/06/2012 at 04:20PM

Emblemofroto_normal
125
#9 - Glen / @Glen_S

07/20/2012 at 01:52PM

Default_profile_6_normal
150
#10 - Kevin Manalo / @kevinmanalo

07/25/2012 at 03:22AM

Me_normal
168
#11 - Tautvidas Sipavičius / @tautvidas

08/10/2012 at 11:40AM

Default_profile_0_normal
288
#12 - Eric Mathison / @ericmathison

07/13/2012 at 02:13AM

S7hauzmpk569g3s4y072_normal
754
#13 - w / @_weslly

07/18/2012 at 09:14AM