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

175 active golfers, 467 entries

Leaderboard (lowest score wins):
33
#31 - moh ayaya / @AyayaMoh

08/24/2023 at 06:46PM

33
#32 - Vimgolf User / @VimgolfU

11/17/2023 at 12:30PM

33
#33 - Aly Thobani / @alythobani

04/07/2024 at 09:07PM

34
#34 - SwordSwordSwordBird / @SwordSwordBird

06/01/2021 at 04:56AM

34
#35 - Smylers / @Smylers2

06/01/2021 at 03:16PM

34
#36 - grosa / @_grosa_

06/10/2021 at 06:06AM

34
#37 - 悟史 / @A1OBJTxN5fTg5EJ

07/11/2021 at 06:15AM

34
#38 - Nate Slager / @NateSlagr

07/14/2021 at 02:56AM

34
#39 - JahmannDev / @JahmannD

07/16/2021 at 12:07AM

34
#40 - Trần Chí Thiện / @tecix

08/18/2021 at 03:42PM

34
#41 - migoo / @migoo00668679

10/31/2021 at 01:00PM

34
#42 - $HA-|| / @s_k0731

11/29/2021 at 03:10PM

34
#43 - deusthe / @deusthe91

12/18/2021 at 09:38PM

34
#44 - Pawel Wenda / @pwlwnd

02/23/2022 at 10:21PM

34
#45 - 스치 / @champemunasong

04/09/2022 at 01:48PM

34
#46 - Youssef Magdy / @youssef_magdy29

04/29/2022 at 08:21PM

34
#47 - redbigyesnoGoThenWhy / @redbigyesno

06/05/2022 at 04:43AM

34
#48 - Dank City / @ddankcity

12/08/2022 at 02:00PM

34
#49 - Geoff Liu / @geoff_liu

09/24/2023 at 03:56AM

34
#50 - Luoyb / @Luoyb

10/23/2023 at 06:00AM

34
#51 - tien / @tien40766111

11/19/2023 at 03:10PM

34
#52 - jonas-grobe / @jonas-grobe

02/02/2024 at 07:58PM

35
#53 - Arya Kumar / @SusSquirrel

05/30/2021 at 12:29PM

35
#54 - Tuure / @tuure_p

06/04/2021 at 01:49AM

35
#55 - Vim Golfer / @VimGolfer20

08/23/2021 at 11:57AM

35
#56 - Tanzeel Kazi / @tanzeelkazi

10/12/2021 at 03:16AM

35
#57 - vimgolfaccfekxh / @vimgolfaccfekxh

10/22/2022 at 02:22AM

35
#58 - François / @mortyZZ

03/25/2023 at 04:58PM

35
#59 - Иван / @wansmer

04/21/2023 at 03:47AM

35
#60 - Oleksiy Syvokon 🇺🇦 / @OSyvokon

10/09/2023 at 08:30AM