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


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

359 active golfers, 1945 entries

Leaderboard (lowest score wins):
17
#91 - Michel Viktor / @tomkpz

08/11/2021 at 08:22PM

17
#92 - Jon Karl Sigurdsson / @Math_Meditation

09/13/2021 at 10:51PM

17
#93 - Humbaba / @humbabu

12/31/2021 at 10:53PM

17
#94 - Youssef Magdy / @youssef_magdy29

05/01/2022 at 02:11AM

17
#95 - loupiot.veloce / @LoupiotVeloce

07/22/2022 at 08:53PM

17
#96 - z00master / @z00master

08/05/2022 at 05:12PM

17
#97 - monika gadage / @gadage_moni

09/24/2022 at 11:56PM

17
#98 - Vinicius Azevedo Pinheiro / @Viniciu42652081

10/10/2022 at 06:29AM

17
#99 - Nancho Alvarez / @nancho_alvarez

10/22/2022 at 02:18PM

17
#100 - Mrmclarrinson / @mrmclarrinson

12/13/2022 at 01:19PM

17
#101 - DW Luna / @dcheed_

12/21/2022 at 06:19AM

17
#102 - 94 / @kyu08_

04/11/2023 at 11:02AM

17
#103 - Koceto / @Koceto691735529

04/23/2023 at 12:48AM

17
#104 - John Huynh / @huynh_j93

04/30/2023 at 03:06AM

17
#105 - Игорь Квачёнок / @IKvacenok

06/13/2023 at 07:48PM

17
#106 - 7733865@qq.com / @tjxwg

07/05/2023 at 10:04AM

17
#107 - jinx balotchnik / @balotchnik

07/22/2023 at 11:16PM

17
#108 - moh ayaya / @AyayaMoh

08/26/2023 at 09:13PM

17
#109 - Luoyb / @Luoyb

10/25/2023 at 02:49AM

17
#110 - naka / @nak38223985244

10/28/2023 at 12:55PM

18
#111 - Ceda EI / @ceda_ei

11/10/2020 at 01:38PM

18
#112 - Saki Gw / @Sakigw

11/12/2020 at 02:06PM

18
#113 - David Kutschke / @D4KU_

11/12/2020 at 10:01PM

18
#114 - Andreas Siegrist / @andreaszwei

11/15/2020 at 12:33AM

18
#115 - Jonáš Šerých / @serycjon

11/15/2020 at 06:08PM

18
#116 - chocolate / @chocola81394123

11/18/2020 at 06:25AM

18
#117 - kse / @kse92733183

11/18/2020 at 04:01PM

18
#118 - ZackBurtAWS / @ZackBurtSDE

11/18/2020 at 04:10PM

18
#119 - Patty (Dionísio) / @patrickvillela

11/18/2020 at 07:01PM

18
#120 - Tyler Holien / @tylerholien

11/19/2020 at 01:17AM