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):
32
#271 - Ken / @kenc_

01/20/2022 at 06:46AM

32
#272 - 우정민 / @jeongmin2021

10/02/2022 at 07:58PM

32
#273 - Yāsky / @Yaasky

01/17/2023 at 07:55PM

32
#274 - sap / @sap38838304

06/09/2023 at 07:13AM

32
#275 - Olivier Bégassat / @zk_evm

06/11/2023 at 02:58PM

32
#276 - Flimsy Giraffe / @flimsy_giraffe

10/04/2023 at 07:34PM

33
#277 - Riley John Gibbs / @RileyJohnGibbs

11/20/2020 at 11:35PM

33
#278 - Norman Liu / @normanwliu

12/06/2020 at 06:16AM

33
#279 - Bharath / @Bharath15952517

12/12/2020 at 03:04PM

33
#280 - John Smith / @JohnSmi38307095

03/19/2021 at 02:21PM

33
#281 - Siddharth Murali / @SidTweetsALess

06/25/2022 at 03:23PM

34
#282 - Jonathan Ketner / @Chariotrunner

12/03/2020 at 01:46AM

34
#283 - said / @said13664960

12/16/2020 at 03:24PM

34
#284 - Marcin Dostojewski / @MarcinekAGH

01/10/2021 at 02:55PM

34
#285 - Martin LOUAZEL / @Zbrahark

02/18/2021 at 07:56AM

34
#286 - Vgrbwat / @vgrbwat

06/03/2021 at 03:57AM

34
#287 - François / @mortyZZ

08/01/2021 at 05:41PM

34
#288 - Yochem van Rosmalen / @yoch3m

01/31/2022 at 12:09PM

34
#289 - Joe Bushi / @joebushi

12/01/2022 at 07:49PM

34
#290 - Nicholas Healy / @nickrhealy

12/18/2022 at 09:21PM

34
#291 - Kha Nguyen / @__ngtrongkha

12/22/2022 at 01:15AM

34
#292 - Alexandre Ignjatovic / @bankair

01/23/2023 at 01:08PM

34
#293 - xiaoao1024 / @xiaoao1024

05/10/2024 at 02:06AM

35
#294 - Tosoa Bacca / @elsifaka

11/10/2020 at 09:06AM

35
#295 - bladehaze / @bladehaze

12/09/2020 at 11:25PM

35
#296 - 正気・腕力・不労所得 / @tsukimizake774

12/19/2020 at 04:31PM

35
#297 - 김범준 / @kmbmjn

01/14/2021 at 06:13AM

35
#298 - Dave Baskind / @davebaskind

10/28/2022 at 08:40AM

36
#299 - Ken Baldwin / @kenbald1

01/19/2021 at 07:00PM

36
#300 - Roman Matzutt / @matzutt

06/13/2021 at 02:00PM