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


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

341 active golfers, 1840 entries

Leaderboard (lowest score wins):
46
#301 - Alex Kubica / @alexkubicail

11/12/2020 at 10:11AM

46
#302 - D G G / @DGJourneyman

02/20/2023 at 11:04AM

47
#303 - vesa / @XingfDu

01/08/2021 at 11:34AM

47
#304 - yevallus / @yevallus

03/10/2022 at 02:53PM

49
#305 - Buatvimgolf / @buatvimgolf

07/05/2022 at 08:24AM

49
#306 - ひま / @sux2mfgj_gz

12/15/2022 at 01:36PM

50
#307 - Bo Xie / @iebox

12/05/2020 at 03:52AM

50
#308 - りょー / @ryoo141

01/10/2021 at 03:20AM

50
#309 - panakin skywalker / @_j3ffrey

08/31/2021 at 03:10PM

50
#310 - Ali Aslan / @AliAsla95742367

10/27/2021 at 01:27AM

51
#311 - just here to scroll. / @idontknow0001

11/15/2020 at 04:28PM

51
#312 - aravindthangavel / @aravindpt

04/11/2022 at 04:44AM

52
#313 - Ken Powers / @knpwrs

11/11/2020 at 03:25PM

52
#314 - Matilda Amy / @Matilda_Amy2

03/30/2023 at 05:14PM

53
#315 - salchint / @salchint

12/04/2020 at 04:46PM

53
#316 - Just Alerik / @Just_Alerik

12/15/2020 at 10:42PM

53
#317 - Jeremy Thompson / @jeremyt918

09/21/2021 at 11:26PM

55
#318 - Joe Farnsworth / @JoeFarnsworth

06/21/2021 at 09:31PM

56
#319 - sydman / @sydman11

11/18/2021 at 09:01AM

56
#320 - Christian Héon / @HeonCv

10/08/2022 at 04:06PM

58
#321 - Dennis Chen / @Mailyfesux

11/12/2020 at 05:18AM

59
#322 - dvorak4tzx / @dvorak4tzx4

12/28/2020 at 04:49PM

59
#323 - Kevin Linnane / @linnanekevin07

12/30/2020 at 10:01PM

59
#324 - iiooii / @APR_PLUS

12/31/2021 at 02:49AM

63
#325 - vr4vc4 / @vr4vc4

03/21/2022 at 07:25AM

64
#326 - Joshua Parco / @JoshuaParco2

11/09/2020 at 07:01PM

65
#327 - Yondonjamts Ganzorig / @yondonjamts_g

11/13/2020 at 11:30AM

67
#328 - monad / @skoblock

12/12/2020 at 05:04PM

67
#329 - SpadeAcademic / @AcademicSpade

01/15/2021 at 06:56AM

68
#330 - Chae Eon Lim / @ChaeEonLim1

06/13/2021 at 05:26AM