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


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

340 active golfers, 1838 entries

Leaderboard (lowest score wins):
38
#271 - usermod / @g_usermod

02/20/2021 at 06:05PM

38
#272 - Emiliano Vazquez / @vazquezemiliano

05/09/2021 at 04:03AM

38
#273 - Patrick Gates / @patrickgates

06/19/2021 at 09:28PM

38
#274 - asdf / @ksmaneee

02/26/2023 at 03:15PM

39
#275 - Anil Narayan / @AnilNarayan2013

11/11/2020 at 04:49AM

39
#276 - Kitsan / @Strustle

11/22/2020 at 11:27AM

39
#277 - ya-suke / @ninja__01

02/08/2022 at 05:33AM

40
#278 - Jake Grossman / @PiranaLaugh

11/11/2020 at 04:54PM

40
#279 - Steffen / @Pions90

12/06/2020 at 03:07PM

40
#280 - kijete3127 / @kijete3127

12/13/2020 at 01:20PM

40
#281 - Danny T / @son_of_torkel

12/25/2020 at 04:05PM

40
#282 - Nishanth Reddy / @Nishanth2066

01/19/2021 at 05:21AM

40
#283 - Xiao Wangwang / @WangwangXiao

01/20/2021 at 06:04PM

40
#284 - Thomas Lüdecke / @t0mM3k

01/21/2021 at 12:43PM

40
#285 - Faizan Ansari / @faizan_157

01/31/2021 at 08:16AM

40
#286 - Ramtin Martin / @martin_ramtin

03/23/2022 at 03:01PM

40
#287 - 阿部 / @l_abb

08/12/2022 at 10:30AM

40
#288 - Ludde / @Ludfjig

10/12/2022 at 02:17AM

41
#289 - Rory Smith / @alan0buchanan

09/14/2021 at 10:08PM

41
#290 - Yeontaek Kim / @YeontaekK

09/17/2021 at 12:20PM

41
#291 - 素村 / @so_No_50xx

12/26/2022 at 02:40AM

41
#292 - Finlay McAfee / @finsqm

02/01/2023 at 05:54PM

42
#293 - ajay.vimgolf / @AjayVimgolf

11/11/2020 at 03:54PM

42
#294 - joao neto / @joaonet49907796

05/18/2021 at 11:46AM

45
#295 - hejhopp87 / @hejhopp87

12/05/2020 at 08:11PM

45
#296 - BOEHBAA / @BOEHBAA

09/29/2021 at 03:18PM

45
#297 - Andrew Tongen / @atongen

11/02/2021 at 07:03PM

45
#298 - Subsector3174 / @subsector3174

01/29/2023 at 01:08AM

45
#299 - 马海洋 / @LG41bT7ZvqOdFl3

02/05/2023 at 10:29PM

46
#300 - Noise Official / @zmunk19

11/12/2020 at 08:33AM