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 9v0060b0a374000000000206

Lowercase first characters

This is the (abridged) input for Day 3 in Advent of Code 2019. The output is a format more suitable for Prolog programming: the two lines of input become two lists of pairs, joined together in a wires functor.

Start file
R1009,U263,L517,U449,L805,D78,L798,D883,L777,D562,R652,D348,R999,D767,L959,U493,R59
L1003,D960,L10,D57,R294,U538,R867,D426,L524,D441,R775,U308,R577,D785,R495,U847,R643
End file
wires([r-1009,u-263,l-517,u-449,l-805,d-78,l-798,d-883,l-777,d-562,r-652,d-348,r-999,d-767,l-959,u-493,r-59],[l-1003,d-960,l-10,d-57,r-294,u-538,r-867,d-426,l-524,d-441,r-775,u-308,r-577,d-785,r-495,u-847,r-643]).

View Diff

1,2c1
< R1009,U263,L517,U449,L805,D78,L798,D883,L777,D562,R652,D348,R999,D767,L959,U493,R59
< L1003,D960,L10,D57,R294,U538,R867,D426,L524,D441,R775,U308,R577,D785,R495,U847,R643
---
> wires([r-1009,u-263,l-517,u-449,l-805,d-78,l-798,d-883,l-777,d-562,r-652,d-348,r-999,d-767,l-959,u-493,r-59],[l-1003,d-960,l-10,d-57,r-294,u-538,r-867,d-426,l-524,d-441,r-775,u-308,r-577,d-785,r-495,u-847,r-643]).

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 181 remaining solutions by signing in and submitting your own entry
#182 Darong Mean / @darong_mean - Score: 79 - 05/29/21 @ 03:41
:%s/R/r-/g<CR>:%s/U/u-/g<CR>:%s/L/l-/g<CR>:%s/D/d-/g<CR>kiwires([<Esc>A]<Esc>j.a).<Esc>0i[<Esc><Esc>kJr,hhh:wq<CR>

0 comments


Created by: @salvipeter

182 active golfers, 486 entries

Leaderboard (lowest score wins):
33
#1 - Miłosz Łakomy / @foobar01123

06/07/2021 at 09:39AM

33
#2 - John Braxler / @braxler

06/07/2021 at 07:54PM

33
#3 - roudens / @roudens2

06/12/2021 at 07:00AM

33
#4 - Winnie Yeung / @vionwinnie

06/24/2021 at 05:23PM

33
#5 - sap / @sap38838304

06/28/2021 at 05:47AM

33
#6 - Georg Bökman / @BokmanGeorg

07/02/2021 at 07:35PM

33
#7 - A A A / @37fatos

07/13/2021 at 01:44AM

33
#8 - Bruce Lee / @BruceLeeIII

07/22/2021 at 09:24PM

33
#9 - Fengjun Yang / @fengjun_yang

07/22/2021 at 10:19PM

33
#10 - Ferran / @dillunsos

07/29/2021 at 01:46PM

33
#11 - Lisa Ugray / @lisa_ugray

08/17/2021 at 02:12PM

33
#12 - Roman Privalov / @RomanPrivalov

08/29/2021 at 04:10AM

33
#13 - garry quested / @GQuested

10/01/2021 at 01:49PM

33
#14 - Hugh / @haquaman

10/08/2021 at 03:58AM

33
#15 - Julian Pottle / @jules_np

10/12/2021 at 05:13AM

33
#16 - Jean George / @JeanGeo20504212

11/19/2021 at 02:55PM

33
#17 - Selvaganapathy P / @canabady

12/31/2021 at 11:04AM

33
#18 - Ahmet Bombaci / @ahmetbombaci

01/08/2022 at 01:10AM

33
#19 - Sammit / @somemeatjain

01/25/2022 at 06:47PM

33
#20 - Brett Bender / @brttbndr

02/25/2022 at 05:35PM

33
#21 - Ron / @ronnie9ball

05/20/2022 at 04:02AM

33
#22 - russellzhaomao / @russellzhaomao

05/22/2022 at 09:05AM

33
#23 - Levi Wheeler / @LeviWhe68726437

05/23/2022 at 09:54PM

33
#24 - xtncl / @xtncl

06/10/2022 at 10:44PM

33
#25 - Irakli Chigvaria / @tchigvaria

06/17/2022 at 07:12AM

33
#26 - Alex / @AlexanderHeatl2

07/11/2022 at 11:12PM

33
#27 - Omar Alawadhi / @OmarAla59544225

09/10/2022 at 09:38PM

33
#28 - Topvimgolf Score / @topvimgolfscore

10/15/2022 at 02:46PM

33
#29 - vuems / @vuems2win

11/21/2022 at 11:53PM

33
#30 - 0xf00ff00f / @0xf00ff00f

12/13/2022 at 06:35PM