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 387 remaining solutions by signing in and submitting your own entry
#388 ahappyston1 / @ahappyston1 - Score: 120 - 09/27/24 @ 10:32
<Right><Right><Left><Left><Left><Esc><Right><Down><Right><Up><Down><Left><Up><Right><BS><Right>i<BS><BS><C-Z><C-Z><BS><BS><BS><BS><BS>[2<Right><Left><BS>1<Right><Right><Right><BS>2<Right><Right><Right><Right><Right><BS>4<Right><Right><Right><Right><Left><Del>5<C-Z><BS><BS><BS>5]<Down><Left><Left><Left><Left><BS>4<BS>3<Right><Right><Right><BS>6<Down><Left><Left><Left><BS>4<Right><Right><Right><BS>7<Down><Left><Left><Left><BS>2<Right><Right><Right><BS>8<Right><Right><Right><Right><Right><Right><BS>1<Right><Right><Right><Right><BS>2<Esc>":<BS><BS><BS><BS><BS><PageDown>:wq<CR>

0 comments


Created by: @wedesoft

388 active golfers, 2128 entries

Leaderboard (lowest score wins):
36
#301 - max / @max_vimaster

06/25/2021 at 10:06AM

36
#302 - 咸糖🎯 / @GIA917229015

01/04/2024 at 03:08PM

37
#303 - jgoerner / @jgoerner2

11/11/2020 at 11:22PM

37
#304 - Leander Hendrikx / @leanderhendrikx

11/19/2020 at 01:13PM

37
#305 - — / @Cenarius

12/07/2020 at 01:26AM

37
#306 - artisan bed maker / @ebencooke

12/16/2020 at 03:47AM

37
#307 - Scott Atkins / @scottrick49

05/26/2021 at 07:17PM

37
#308 - Quentin Leroy / @qnleroy

08/22/2021 at 01:34PM

37
#309 - Pieter-Jan Lavaerts / @Pumpkin_Pie_Eat

03/08/2024 at 02:37PM

38
#310 - Jan Lukány / @Lukanyj

11/17/2020 at 12:41PM

38
#311 - usermod / @g_usermod

02/20/2021 at 06:05PM

38
#312 - Emiliano Vazquez / @vazquezemiliano

05/09/2021 at 04:03AM

38
#313 - Patrick Gates / @patrickgates

06/19/2021 at 09:28PM

38
#314 - asdf / @ksmaneee

02/26/2023 at 03:15PM

39
#315 - Anil Narayan / @AnilNarayan2013

11/11/2020 at 04:49AM

39
#316 - Kitsan / @Strustle

11/22/2020 at 11:27AM

39
#317 - ya-suke / @ysxninja

02/08/2022 at 05:33AM

39
#318 - c-coyne / @c-coyne

05/24/2025 at 01:49AM

40
#319 - Jake Grossman / @PiranaLaugh

11/11/2020 at 04:54PM

40
#320 - Steffen / @Pions90

12/06/2020 at 03:07PM

40
#321 - kijete3127 / @kijete3127

12/13/2020 at 01:20PM

40
#322 - Danny T / @son_of_torkel

12/25/2020 at 04:05PM

40
#323 - Nishanth Reddy / @Nishanth2066

01/19/2021 at 05:21AM

40
#324 - Xiao Wangwang / @WangwangXiao

01/20/2021 at 06:04PM

40
#325 - Thomas Lüdecke / @t0mM3k

01/21/2021 at 12:43PM

40
#326 - Faizan Ansari / @faizan_157

01/31/2021 at 08:16AM

40
#327 - Ramtin Martin / @martin_ramtin

03/23/2022 at 03:01PM

40
#328 - 阿部 / @l_abb

08/12/2022 at 10:30AM

40
#329 - Ludde / @Ludfjig

10/12/2022 at 02:17AM

40
#330 - KoroneListener / @KoroneListener

09/05/2024 at 05:45PM