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


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

311 active golfers, 1664 entries

Leaderboard (lowest score wins):
45
#271 - BOEHBAA / @BOEHBAA

09/29/2021 at 03:18PM

45
#272 - Andrew Tongen / @atongen

11/02/2021 at 07:03PM

46
#273 - Noise Official / @zmunk19

11/12/2020 at 08:33AM

46
#274 - Alex Kubica / @alexkubicail

11/12/2020 at 10:11AM

47
#275 - vesa / @XingfDu

01/08/2021 at 11:34AM

47
#276 - yevallus / @yevallus

03/10/2022 at 02:53PM

49
#277 - Buatvimgolf / @buatvimgolf

07/05/2022 at 08:24AM

50
#278 - Bo Xie / @iebox

12/05/2020 at 03:52AM

50
#279 - りょー / @ryoo141

01/10/2021 at 03:20AM

50
#280 - panakin skywalker / @_j3ffrey

08/31/2021 at 03:10PM

50
#281 - Ali Aslan / @AliAsla95742367

10/27/2021 at 01:27AM

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

11/15/2020 at 04:28PM

51
#283 - aravindthangavel / @aravindpt

04/11/2022 at 04:44AM

52
#284 - Ken Powers / @knpwrs

11/11/2020 at 03:25PM

53
#285 - salchint / @salchint

12/04/2020 at 04:46PM

53
#286 - Just Alerik / @Just_Alerik

12/15/2020 at 10:42PM

53
#287 - Jeremy Thompson / @jeremyt918

09/21/2021 at 11:26PM

55
#288 - Joe Farnsworth / @JoeFarnsworth

06/21/2021 at 09:31PM

56
#289 - sydman / @sydman11

11/18/2021 at 09:01AM

56
#290 - Christian Héon / @HeonCv

10/08/2022 at 04:06PM

58
#291 - Dennis Chen / @Mailyfesux

11/12/2020 at 05:18AM

59
#292 - dvorak4tzx / @dvorak4tzx4

12/28/2020 at 04:49PM

59
#293 - Kevin Linnane / @linnanekevin07

12/30/2020 at 10:01PM

59
#294 - iiooii / @APR_PLUS

12/31/2021 at 02:49AM

63
#295 - vr4vc4 / @vr4vc4

03/21/2022 at 07:25AM

64
#296 - Joshua Parco / @JoshuaParco2

11/09/2020 at 07:01PM

65
#297 - Yondonjamts Ganzorig / @yondonjamts_g

11/13/2020 at 11:30AM

67
#298 - monad / @skoblock

12/12/2020 at 05:04PM

67
#299 - SpadeAcademic / @AcademicSpade

01/15/2021 at 06:56AM

68
#300 - Chae Eon Lim / @ChaeEonLim1

06/13/2021 at 05:26AM