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 330 remaining solutions by signing in and submitting your own entry
#331 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


#332 藤田拓郎 / @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

332 active golfers, 1808 entries

Leaderboard (lowest score wins):
27
#181 - Doemae / @Doemae02

06/18/2021 at 06:12PM

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

07/02/2021 at 03:27AM

27
#183 - AMG / @anmigneer

12/14/2021 at 03:55PM

27
#184 - Selvaganapathy P / @canabady

01/03/2022 at 12:48PM

27
#185 - Andrew Liu / @AndrewL45936893

09/19/2022 at 04:33AM

27
#186 - Ville Viklund / @ville6000

01/13/2023 at 04:30PM

27
#187 - 야호 / @kse8425z

01/27/2023 at 08:37AM

28
#188 - Stefan Krist / @nerdyness_sk

11/18/2020 at 04:00PM

28
#189 - Jon Liang / @jon__liang

12/18/2020 at 04:48AM

28
#190 - Pavlo Hadzheha / @PHadzheha

01/31/2021 at 05:12PM

28
#191 - Neil Butler / @PinkyinParis

08/23/2021 at 03:38AM

28
#192 - Swaraj Dash / @swarajdash_

11/14/2021 at 08:14PM

29
#193 - Sebastian W. / @Sebasti91439242

11/15/2020 at 09:07PM

29
#194 - Miguel Prada / @migueluli

11/25/2020 at 03:57PM

30
#195 - Filipe 💙 / @ABarroso

11/10/2020 at 07:02PM

30
#196 - Aleks Kissinger / @AleksKissinger

11/13/2020 at 07:35PM

30
#197 - Adam MacKinnon / @AmadKinnon

11/23/2020 at 07:12PM

30
#198 - Robert Verst / @r_verst

11/26/2020 at 01:40PM

30
#199 - akabaka / @akabakass

12/04/2020 at 02:36PM

30
#200 - Pieter Kuijpers / @pieterpiq

12/07/2020 at 02:21PM

30
#201 - Fabrizio Perria / @FPerria

12/16/2020 at 04:35PM

30
#202 - thegoncharov / @thegoncharov

12/30/2020 at 07:46AM

30
#203 - Nitesh Rijhwani / @NitzRijhwani

01/05/2021 at 02:24PM

30
#204 - knobbelkesvlaai / @knobbelkesvlaai

01/13/2021 at 10:30AM

30
#205 - tylertucker202 / @tylertucker202

01/18/2021 at 09:02PM

30
#206 - siruichang / @Blessing13Si

01/20/2021 at 10:06AM

30
#207 - Hatchet / @hatxet

01/20/2021 at 09:43PM

30
#208 - Chris Conte / @chriscconte

02/11/2021 at 12:57AM

30
#209 - vimgolf_vinz / @VimgolfV

09/20/2021 at 04:05PM

30
#210 - Nougatine Naja / @NougatineNaja

01/03/2022 at 03:11PM