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

142 active golfers, 387 entries

Leaderboard (lowest score wins):
52
#121 - Yondonjamts Ganzorig / @yondonjamts_g

07/24/2021 at 07:43AM

52
#122 - 우정민 / @jeongmin2021

10/02/2022 at 05:07AM

53
#123 - huscarl / @huscarl6

06/07/2021 at 04:42PM

53
#124 - Matt / @kungfu71186

07/04/2021 at 01:09AM

53
#125 - François / @mortyZZ

08/01/2021 at 07:46PM

53
#126 - oleg / @oleg12573505

01/29/2022 at 03:34PM

57
#127 - Sergio / @SergioVl12

07/24/2021 at 05:35AM

57
#128 - 王軒 / @XMRHR

09/03/2021 at 02:50AM

57
#129 - Snurli / @Snurlipus

12/03/2021 at 10:15AM

57
#130 - タケ / @Take3832

04/24/2022 at 11:34AM

58
#131 - Ryan Murphy / @RyanMur92693753

03/12/2022 at 09:05PM

60
#132 - steve / @steve35773420

05/23/2022 at 02:30AM

61
#133 - rakshith 🦄 / @rakshithbellare

12/28/2021 at 01:51PM

61
#134 - Ken / @kenc_

01/20/2022 at 05:38AM

63
#135 - Ratkovszki István / @RatkovszkiIstvn

09/12/2022 at 06:15PM

64
#136 - Liu ko / @liukonst

07/05/2021 at 12:10AM

65
#137 - models / @zornificator

06/23/2021 at 09:58AM

65
#138 - Cesare Tagliaferri / @taglia

11/22/2021 at 09:25AM

65
#139 - Siddharth Murali / @SidTweetsALess

07/01/2022 at 10:07AM

68
#140 - Federico Capoani / @fcapoani

06/10/2021 at 01:03PM

71
#141 - dolfin1107 / @dolfin1107

12/04/2021 at 12:34PM

79
#142 - Darong Mean / @darong_mean

05/29/2021 at 03:41AM