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

183 active golfers, 487 entries

Leaderboard (lowest score wins):
44
#121 - AAbraxas / @AAbraxas1

07/01/2021 at 08:24PM

44
#122 - Russell Helmstedter / @RHelmstedter

07/28/2021 at 04:51PM

44
#123 - Scott Berger / @scottberger

09/29/2021 at 01:07AM

44
#124 - Алексей Иванин / @AliakseiIvanin

11/10/2021 at 09:22AM

44
#125 - TimMcGuire / @mcguire

01/01/2022 at 08:30PM

44
#126 - Graham Bates / @gigabates

04/12/2022 at 06:41PM

44
#127 - Mr Spoony / @MrKSpoon

05/26/2022 at 01:37PM

45
#128 - Theo Sarrazin / @tshaero

08/25/2021 at 08:50PM

45
#129 - ya-suke / @ysxninja

02/09/2022 at 06:01AM

45
#130 - Spam Mail / @mrfdot

05/26/2023 at 01:03AM

46
#131 - kmh1622@jagmail.southalabama.edu / @kmh1622

05/28/2021 at 08:21PM

46
#132 - noam teyssier / @noamteyssier

07/18/2021 at 11:35PM

46
#133 - Yeontaek Kim / @YeontaekK

08/18/2021 at 01:06PM

46
#134 - Хью Джолли / @DzolliH

06/19/2022 at 07:04PM

47
#135 - Un Extraño / @link145m

07/31/2021 at 05:31PM

47
#136 - Michael / @triorph

11/07/2021 at 08:07AM

47
#137 - Matthew Beaumont / @mattybeau_dev

11/26/2021 at 12:30AM

47
#138 - Driver / @zhouyijiaren

06/13/2022 at 11:19AM

47
#139 - Pheimors / @pheimors

10/02/2022 at 05:18PM

47
#140 - Denis / @Denis08029031

10/08/2022 at 08:27PM

47
#141 - ._. / @Katharsic

11/18/2022 at 07:39AM

48
#142 - Vinícius Hoyer / @viniciushoyer

05/28/2021 at 02:46PM

48
#143 - Nougatine Naja / @NougatineNaja

01/13/2022 at 01:10PM

48
#144 - willyistaken / @willyistaken

04/10/2024 at 12:53AM

49
#145 - heppen / @heppen_He

08/09/2021 at 04:47PM

50
#146 - Nabil AbuBaker / @nabil_abubaker

07/20/2021 at 01:04PM

50
#147 - trafficone / @trafficone

05/03/2022 at 02:37PM

50
#148 - Henry Chimpden Earwicker / @HChEarwicker

06/14/2022 at 06:40AM

50
#149 - 0xf89 / @0xf89

02/18/2023 at 02:11PM

50
#150 - Pieter-Jan Lavaerts / @Pumpkin_Pie_Eat

03/08/2024 at 01:45PM