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

180 active golfers, 482 entries

Leaderboard (lowest score wins):
35
#61 - François / @mortyZZ

03/25/2023 at 04:58PM

35
#62 - Иван / @wansmer

04/21/2023 at 03:47AM

35
#63 - Oleksiy Syvokon 🇺🇦 / @OSyvokon

10/09/2023 at 08:30AM

36
#64 - Jon Krause / @jkrause314

05/28/2021 at 02:27PM

36
#65 - Kyle / @Kyle98675198

05/29/2021 at 08:22PM

36
#66 - czheo / @czheo

06/04/2021 at 07:00AM

36
#67 - Roger Stoltz / @rogsto1

06/06/2021 at 08:47PM

36
#68 - nedlog / @nedlog18

06/18/2021 at 12:29PM

36
#69 - MrRubiksSC / @RubiksSc

08/14/2021 at 02:36PM

36
#70 - Shrutesh Patil / @patil_shrutesh

12/03/2021 at 11:27AM

36
#71 - 深窓の令嬢@ドクター / @arbino1031

12/15/2021 at 02:26PM

36
#72 - steve / @steve35773420

04/20/2023 at 07:45PM

36
#73 - Divvy C. / @divvy_c

08/13/2023 at 12:15PM

36
#74 - Leon Katsnelson / @leonkatsnelson

01/01/2024 at 06:14PM

37
#75 - :wq / @write_quit_22

05/28/2021 at 02:52PM

37
#76 - iBhagwan / @iiBhagwan

07/02/2021 at 05:19PM

37
#77 - mevmev / @mevmev8

07/29/2021 at 09:59PM

37
#78 - Peter Pandorum / @PeterPandorum

08/07/2021 at 09:23PM

37
#79 - heyotetsuo / @heyotetsuo

09/12/2021 at 09:08PM

37
#80 - Tim / @MarhjaKhazua

05/16/2022 at 06:40PM

37
#81 - oboki / @happy_oboki

07/28/2022 at 05:23AM

37
#82 - jimmarq / @jimmarq

10/30/2022 at 10:44PM

37
#83 - James / @Dronak

11/08/2022 at 07:53PM

37
#84 - Rob / @robjbishop

09/13/2023 at 09:15PM

38
#85 - Connor / @ronnocthered

08/15/2021 at 04:52AM

38
#86 - Shubh Agarwal / @shu7bh

03/20/2022 at 07:12PM

39
#87 - kafang plays vimgolf / @KafangV

06/22/2021 at 05:30PM

39
#88 - Víctor López / @viticlick

09/29/2021 at 09:41PM

39
#89 - WhyIsThisFishInMyEar / @why_ear

11/20/2021 at 10:46AM

39
#90 - Aliasf / @rammenmaster96

04/02/2023 at 07:16PM