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 5fa95fbdd285680008e41e4b

swap number pairs

Swap the numbers in a bunch of 2-element arrays.

Start file
[2, 1], [5, 4]
[6, 3]
[7, 4]
[8, 2], [12, 11]
End file
[1, 2], [4, 5]
[3, 6]
[4, 7]
[2, 8], [11, 12]

View Diff

1,4c1,4
< [2, 1], [5, 4]
< [6, 3]
< [7, 4]
< [8, 2], [12, 11]
---
> [1, 2], [4, 5]
> [3, 6]
> [4, 7]
> [2, 8], [11, 12]

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 297 remaining solutions by signing in and submitting your own entry
#298 Khalin George / @Khalin_George - Score: 116 - 12/02/20 @ 18:42
<Right><Left>]ewwweWWv<Esc><Esc>bbbbbbbvllxpx<Left>x<Left>i, <Esc>:w<CR>wlllllr4<Right><Right><Right>45r5<Left><Right>5<Down><Up><Up><Up>r5<Left><Right>r5jhhhhr3lllr6jr7jkhhhr4jr2lllljhr8llllllr1llllr2<Esc>:wq<CR>

0 comments


#299 藤田拓郎 / @FujitaTakuro - Score: 116 - 05/23/21 @ 11:30
l<C-V>3l4jhxlpuhp<C-V>4jlI, <Esc>;lll<C-V>lljhjjxllllLjhk1jhjjkkk;;;;lllllllll<C-V>llxlPlxxhi, <Esc>Gwwwwwl<C-V>llllxu<C-V>lllxllp<C-U>uPi, l<BS><Esc>lllxx:wq<CR>

0 comments


Created by: @wedesoft

299 active golfers, 1616 entries

Leaderboard (lowest score wins):
26
#151 - MrRubiksSC / @RubiksSc

11/16/2020 at 01:32AM

26
#152 - James Lowenthal / @JamesAnthonyLow

11/22/2020 at 01:45AM

26
#153 - damned-me / @damned_me_

05/25/2021 at 05:44PM

26
#154 - Maorun / @Maorun11

06/30/2021 at 02:04PM

26
#155 - Hommels / @pseudohommels

10/26/2021 at 03:09AM

26
#156 - ややお / @yayaoh

12/24/2021 at 02:13AM

26
#157 - satetheus-vimgolf / @SVimgolf

07/24/2022 at 08:18AM

26
#158 - Andrii Soldatenko / @a_soldatenko

10/07/2022 at 09:39PM

27
#159 - Rafal C. / @RafalC37709324

11/14/2020 at 12:57PM

27
#160 - Matt DB / @MattDB12

12/06/2020 at 05:57PM

27
#161 - Eric Banisadr / @ebanisadr

12/13/2020 at 11:05AM

27
#162 - fray bauhaus / @BauhausFray

01/12/2021 at 12:38PM

27
#163 - Doemae / @Doemae02

06/18/2021 at 06:12PM

27
#164 - 時空裂縫 / @0xdcbf

07/02/2021 at 03:27AM

27
#165 - AMG / @anmigneer

12/14/2021 at 03:55PM

27
#166 - Selvaganapathy P / @canabady

01/03/2022 at 12:48PM

27
#167 - Andrew Liu / @AndrewL45936893

09/19/2022 at 04:33AM

28
#168 - Stefan Krist / @nerdyness_sk

11/18/2020 at 04:00PM

28
#169 - Jon Liang / @jon__liang

12/18/2020 at 04:48AM

28
#170 - Pavlo Hadzheha / @PHadzheha

01/31/2021 at 05:12PM

28
#171 - Neil Butler / @PinkyinParis

08/23/2021 at 03:38AM

28
#172 - Swaraj Dash / @swarajdash_

11/14/2021 at 08:14PM

29
#173 - Sebastian W. / @Sebasti91439242

11/15/2020 at 09:07PM

29
#174 - Miguel Prada / @migueluli

11/25/2020 at 03:57PM

30
#175 - Filipe 💙 / @ABarroso

11/10/2020 at 07:02PM

30
#176 - Aleks Kissinger / @AleksKissinger

11/13/2020 at 07:35PM

30
#177 - Adam MacKinnon / @AmadKinnon

11/23/2020 at 07:12PM

30
#178 - Robert Verst / @r_verst

11/26/2020 at 01:40PM

30
#179 - akabaka / @akabakass

12/04/2020 at 02:36PM

30
#180 - Pieter Kuijpers / @pieterpiq

12/07/2020 at 02:21PM