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):
21
#151 - Arthur DELORT / @artDelort

06/15/2022 at 03:49PM

21
#152 - Yichao Wu / @MonusW

02/13/2024 at 12:50PM

22
#153 - Aioriya / @AioriyaDonk

11/14/2020 at 11:29PM

22
#154 - LeLycal.tar.gz ๐Ÿ’พ / @Lycal3

12/01/2020 at 09:59AM

22
#155 - mevmev / @mevmev8

12/04/2020 at 01:06AM

22
#156 - angel / @anmaso

12/04/2020 at 10:30PM

22
#157 - Dave Millican / @dave_millican

01/18/2021 at 12:22PM

22
#158 - Calarasanu Andrei / @_fanfani4_

05/28/2021 at 03:01PM

22
#159 - Vladislav Straka / @StrakaVladislav

11/24/2021 at 01:36AM

22
#160 - POSIX / @po6ix

02/01/2022 at 04:42AM

22
#161 - ๐š‹๐š›๐š’๐šŠ๐š— / @Brianjp93

05/06/2022 at 05:45PM

22
#162 - brett / @brettyukich

09/05/2022 at 03:53PM

22
#163 - James Marshall / @astrophd

10/12/2022 at 06:37PM

22
#164 - James / @Dronak

10/23/2022 at 04:06AM

22
#165 - ะ˜ะฒะฐะฝ / @wansmer

04/23/2023 at 08:36AM

22
#166 - Jacob Sun / @jacobsun000

01/12/2024 at 02:03PM

23
#167 - Vinรญcius Hoyer / @viniciushoyer

11/09/2020 at 06:14PM

23
#168 - RaylanFox / @RaylanFox

11/10/2020 at 08:17AM

23
#169 - Amar Battulga / @amar_battulga

11/10/2020 at 11:01PM

23
#170 - Wayne / @lilwayne15561

11/14/2020 at 03:28AM

23
#171 - pady. ๐Ÿ‡ช๐Ÿ‡บ @hundertzwoelf@sueden.social / @hundertzwoelf_

12/01/2020 at 04:11PM

23
#172 - altamente / @altamnt

12/01/2020 at 05:00PM

23
#173 - Vinicius Gardelli / @itsthegards

12/01/2020 at 08:13PM

23
#174 - speisz / @speiszc

01/20/2021 at 10:34PM

23
#175 - ._. / @Katharsic

04/24/2022 at 02:25PM

23
#176 - Golfer / @Golfer56598542

06/24/2022 at 11:51AM

23
#177 - Topvimgolf Score / @topvimgolfscore

09/20/2023 at 11:05AM

23
#178 - Paul Molloy / @paulsmolloy

10/23/2023 at 08:08PM

24
#179 - majo senf / @majo_senf

11/13/2020 at 09:17AM

24
#180 - SEbbaDK / @SEbbaDK

12/04/2020 at 02:54PM