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 4fca76aad3a0d4000100007e

Calculate the table totals

Go ahead... commit the treachery of using vim as a spreadsheet.

Start file
+--------------+--------+----------+---------+
| Item         | Cost   | Amount   | Total   |
+==============+========+==========+=========+
| Apple        | 2.00   | 3        |         |
+--------------+--------+----------+---------+
| Orange       | 2.50   | 4        |         |
+--------------+--------+----------+---------+
| Banana       | 1.00   | 6        |         |
+--------------+--------+----------+---------+
| Kiwi         | 7.00   | 5        |         |
+--------------+--------+----------+---------+
| Mango        | 5.00   | 2        |         |
+--------------+--------+----------+---------+
| Plum         | 4.00   | 9        |         |
+--------------+--------+----------+---------+
| Nectarine    | 3.50   | 7        |         |
+--------------+--------+----------+---------+
| Watermelon   | 5.00   | 3        |         |
+--------------+--------+----------+---------+
| Grapes       | 4.00   | 2        |         |
+--------------+--------+----------+---------+
| Tangerine    | 5.00   | 6        |         |
+--------------+--------+----------+---------+
End file
+--------------+--------+----------+---------+
| Item         | Cost   | Amount   | Total   |
+==============+========+==========+=========+
| Apple        | 2.00   | 3        |    6.00 |
+--------------+--------+----------+---------+
| Orange       | 2.50   | 4        |   10.00 |
+--------------+--------+----------+---------+
| Banana       | 1.00   | 6        |    6.00 |
+--------------+--------+----------+---------+
| Kiwi         | 7.00   | 5        |   35.00 |
+--------------+--------+----------+---------+
| Mango        | 5.00   | 2        |   10.00 |
+--------------+--------+----------+---------+
| Plum         | 4.00   | 9        |   36.00 |
+--------------+--------+----------+---------+
| Nectarine    | 3.50   | 7        |   24.50 |
+--------------+--------+----------+---------+
| Watermelon   | 5.00   | 3        |   15.00 |
+--------------+--------+----------+---------+
| Grapes       | 4.00   | 2        |    8.00 |
+--------------+--------+----------+---------+
| Tangerine    | 5.00   | 6        |   30.00 |
+--------------+--------+----------+---------+

View Diff

4c4
< | Apple        | 2.00   | 3        |         |
---
> | Apple        | 2.00   | 3        |    6.00 |
6c6
< | Orange       | 2.50   | 4        |         |
---
> | Orange       | 2.50   | 4        |   10.00 |
8c8
< | Banana       | 1.00   | 6        |         |
---
> | Banana       | 1.00   | 6        |    6.00 |
10c10
< | Kiwi         | 7.00   | 5        |         |
---
> | Kiwi         | 7.00   | 5        |   35.00 |
12c12
< | Mango        | 5.00   | 2        |         |
---
> | Mango        | 5.00   | 2        |   10.00 |
14c14
< | Plum         | 4.00   | 9        |         |
---
> | Plum         | 4.00   | 9        |   36.00 |
16c16
< | Nectarine    | 3.50   | 7        |         |
---
> | Nectarine    | 3.50   | 7        |   24.50 |
18c18
< | Watermelon   | 5.00   | 3        |         |
---
> | Watermelon   | 5.00   | 3        |   15.00 |
20c20
< | Grapes       | 4.00   | 2        |         |
---
> | Grapes       | 4.00   | 2        |    8.00 |
22c22
< | Tangerine    | 5.00   | 6        |         |
---
> | Tangerine    | 5.00   | 6        |   30.00 |

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 23 remaining solutions by signing in and submitting your own entry
#24 John Whitley / @johnwhitley - Score: 78 - 06/02/12 @ 19:18
jqq++f|l"ayt f|ll"bylf|lR<C-R>=<C-R>a*<C-R>b<CR>0<Esc>q9@q:%s/\(\d\+\.\d\d\)\( *\)  |$/ \2\1 |<CR>ZZ

0 comments

#25 lauri lehmijoki / @laurilehmijoki - Score: 78 - 06/03/12 @ 03:56
jqq0jj/\d<CR>"ayt f|w"byl2f|6hR<C-R>=<C-R>a*<C-R>b<CR>0<Esc>q9@q:%s/\s\{3\}\(\d\.00\)\s\s/    \1 <CR>ZZ

0 comments

#26 Eric Soderstrom / @eksoderstrom - Score: 137 - 07/19/12 @ 12:07
jjj<Esc>$hhhhhR6.00<Esc>jjhhhhR10.00<Esc>jjhhhR6.00<Esc>jjhhhhR35.00<Esc>jjhhhhR10.00<Esc>jjhhhhR36.00<Esc>jjhhhhR24.50<Esc>jjhhhhR15.00<Esc>jjhhhhR8.00<Esc>lxbbbi <Esc>jjR30.00<Esc><Esc>ZZ

0 comments

#27 Michaël M. / @asenar - Score: 162 - 06/02/12 @ 14:32
:<Up><Up>%s#\(\(\d.\d\d\)   | \(\d\)        |   \).*#\=submatch(1) . float2nr(str2float(submatch(2))*str2float(submatch(3))) . ".00 |"<CR>gg/6<CR>i <Esc><Down><Down><Down><Down>i <Esc>/24<CR>a<Right><Right>5<Del><Esc>/8<CR>i <Esc>ZZ

0 comments

#28 Noel Alejandro / @noelrock333 - Score: 177 - 06/22/12 @ 16:17
)*<Right>3j$hhC<Esc>uR6.<Esc>uhhR6.00<Esc>3hi<BS><Esc>$i <Esc>[{hhhhh2jR10.00<Left><Left><Esc>yw2j2hu<C-R>2jlRr<BS>6<Esc>p<Esc>u<Right>R.00<Left><Left><Left><Left>2j<Esc>u<Esc>2jhR35.00<Esc>2jia<Esc>u<Left><Left><Left><Left>R10.00<Esc>8W2Wh5hR36.00<Esc>2j4hR34<BS><BS>24.50<Esc>2j4hR15.00<Esc>2j3hR8.00<Esc>2j4hR30.00<Esc>:w<CR><C-W>q

0 comments

#29 Benjamin Sergeant / @bsergean - Score: 200 - 06/04/12 @ 21:57
2ju<C-O>3j4f|hhhhqq.00$hhhhqqqi.<Esc>ur.lr0lr0qjjhh.u@qj2kj2j2h.xuuuuuuuuuuuqqr.0ll$uuuqqr.lr0lr02h2jq@q@q@qqqr.lr0l.2h2jq@q7@q@qk2hlhr3lr0kkr82kr5hr12kr2lr4f0r52k3h33l5hr6hr32kr1lr02kr5hr32klr62kr0hr12klr6ZZ

0 comments

Created by: @connermcd

29 active golfers, 80 entries

Leaderboard (lowest score wins):
40051_789281885907_29616532_44170636_2091417_n_normal
33
#1 - Conner McDaniel / @connermcd

06/02/2012 at 06:05PM

T_e_normal
33
#2 - Tim Chase / @gumnos

06/02/2012 at 07:56PM

Q6hrg93p4r3hn56thmd0_normal
33
#3 - Urtica dioica / @udioica

07/20/2012 at 02:04PM

312189_10150481221796258_700041257_11172966_434509532_n_normal
33
#4 - Sean Griffin / @sgrif

08/12/2012 at 07:33PM

Dsc_0096_2_normal
33
#5 - Victor Ramirez / @virako

01/23/2013 at 04:18PM

Jlove201003sq_normal
34
#6 - Justin Love / @wondible

06/02/2012 at 05:45PM

Bc879469f279ee24b7fbdfad7c2216d9_normal
34
#7 - 無ん垢の叫び / @john_ababa

06/02/2012 at 07:28PM

Mobile_photo_mar_15__2010_12_39_49_normal
34
#8 - Rod Knowlton / @codelahoma

06/03/2012 at 01:08PM

Uwe_horns_by_joao_normal
34
#9 - Dave / @zzdave13

06/07/2012 at 01:35PM

Default_profile_3_normal
34
#10 - Édouard M'tou / @DouardM

10/08/2012 at 07:00AM

Default_profile_3_normal
45
#11 - James Davis / @tripvg

08/03/2012 at 10:40PM

P1000007_normal
46
#12 - h_east (DDD ready) / @h_east

06/03/2012 at 03:51AM

4654945923_eb2c60ee5f_normal
49
#13 - Kerson Hsiao / @KersonHsiao

06/10/2012 at 11:11AM

Default_profile_0_normal
51
#14 - Benoit Mortgat / @Benoit_Mortgat

06/04/2012 at 09:41PM

N600670539_2716872_2871452_normal
51
#15 - Runar / @runarfu

01/12/2013 at 03:15AM

E269db141731bb4b5dd8d6c1288d39c7_normal
52
#16 - Jonathan Lozinski / @jlozinski

06/03/2012 at 09:10AM

Jbgutierrez_normal
53
#17 - Javier Blanco / @jbgutierrez

06/06/2012 at 04:04PM

Gravatar_normal
55
#18 - Asmund Liseth / @Asmund_L

06/20/2012 at 01:17PM

Default_profile_6_normal
59
#19 - William Dunand / @wdunand

07/26/2012 at 11:56PM

Default_profile_0_normal
66
#20 - Pandae / @psasqw

06/25/2012 at 06:35AM

Default_profile_5_normal
68
#21 - Jason Wolf / @zephyr_wolf

11/08/2012 at 11:09AM

Default_profile_1_normal
71
#22 - Chris Brown / @engineercyb

07/12/2012 at 02:48PM

Jj3_normal
71
#23 - Maksim S. / @waynesayonara

09/02/2012 at 08:42AM

Self-avatar-2009_normal
78
#24 - John Whitley / @johnwhitley

06/02/2012 at 07:18PM

Kuva_077_normal
78
#25 - lauri lehmijoki / @laurilehmijoki

06/03/2012 at 03:56AM

Default_profile_6_normal
137
#26 - Eric Soderstrom / @eksoderstrom

07/19/2012 at 12:07PM

Moi-parano_normal
162
#27 - Michaël M. / @asenar

06/02/2012 at 02:32PM

Nuevo-1_normal
177
#28 - Noel Alejandro / @noelrock333

06/22/2012 at 04:17PM

Me_50x50_normal
200
#29 - Benjamin Sergeant / @bsergean

06/04/2012 at 09:57PM