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

Reformat symbols in list

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

Start file
inputs = [ 1 2 3 4 5 ]
outputs = [ 1 2 3 4 5 ]
End file
inputs = [ i1 i2 i3 i4 i5 ]
outputs = [ (o1,i1) (o2,i2) (o3,i3) (o4,i4) (o5,i5) ]

View Diff

1,2c1,2
< inputs = [ 1 2 3 4 5 ]
< outputs = [ 1 2 3 4 5 ]
---
> inputs = [ i1 i2 i3 i4 i5 ]
> outputs = [ (o1,i1) (o2,i2) (o3,i3) (o4,i4) (o5,i5) ]

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 41 remaining solutions by signing in and submitting your own entry
#42 thisisharrison / @thisislharrison - Score: 179 - 08/08/22 @ 15:37
jkt[llii<Esc>ulii<Esc>w.w.w.w.h[[lllllllllyt]jlpllhhhhhhhhhhhhhhhhhi<BS>l<BS><Esc>lllllllllllllhhjjjjjjkkjhhhhhhhhhi(o1,<Right><Right>)l<BS><Right>(o2,<Right><Right>)<Right>o3,<Left><Left><Left>(<Esc>wwwwjhi)l<BS><Right>o4,<Left><Left><Left>(<Esc>eeei<Right>)l<BS><Esc>llio5,<Left><Left><Left>(<Right><Right><Right><Right><Right>)<Esc>ldt]i <Esc>:x<CR>

0 comments


Created by: @selfuryon

42 active golfers, 165 entries

Leaderboard (lowest score wins):
24
#1 - Jon Krause / @jkrause314

07/19/2022 at 04:41AM

24
#2 - Saki Gw / @Sakigw

07/19/2022 at 04:51PM

24
#3 - Andrew Morris / @andrew_morris

07/19/2022 at 11:08PM

24
#4 - Danilo J. S. Bellini / @danilobellini

07/22/2022 at 07:26AM

24
#5 - Александр Черенков / @AleksandrCeren3

07/23/2022 at 01:23AM

24
#6 - Irakli Chigvaria / @tchigvaria

07/25/2022 at 10:05AM

24
#7 - John Braxler / @braxler

07/25/2022 at 03:17PM

24
#8 - fraktal / @FraktalRebirth

07/27/2022 at 08:16AM

24
#9 - xvczuwo / @xvczuwoa

08/01/2022 at 07:21PM

25
#10 - Jean George / @JeanGeo20504212

07/16/2022 at 10:39AM

25
#11 - Alex / @AlexanderHeatl2

07/17/2022 at 02:46AM

25
#12 - loupiot.veloce / @LoupiotVeloce

07/17/2022 at 03:23PM

25
#13 - wpr__ / @wpr____

07/19/2022 at 02:40PM

25
#14 - Lory / @Lory46845742

07/22/2022 at 03:07PM

25
#15 - GreenPinguin / @GreenPinguin2

07/26/2022 at 11:58AM

25
#16 - Eric Briand / @eric_briand

07/29/2022 at 01:58PM

27
#17 - Smylers / @Smylers2

07/15/2022 at 01:21PM

27
#18 - satetheus-vimgolf / @SVimgolf

07/17/2022 at 05:17AM

27
#19 - TimMcGuire / @mcguire

07/18/2022 at 10:52PM

27
#20 - cqjxx / @cqjxx1

07/20/2022 at 02:01PM

27
#21 - Aleksandre Khokhiashvili / @skkhokho

07/23/2022 at 10:28AM

27
#22 - Zachary Peterson / @zpeterson16

07/27/2022 at 11:40AM

27
#23 - mika / @mika31120321

07/30/2022 at 11:29AM

27
#24 - Maksim Galinchik / @MGalinchik

08/02/2022 at 11:00PM

27
#25 - ShookerAndBeta / @Shooker2012

08/05/2022 at 06:33AM

27
#26 - Anthony Hein / @anthonynhein

08/06/2022 at 02:03PM

27
#27 - Calum Smith / @cpmsmith

08/07/2022 at 05:39PM

29
#28 - Nougatine Naja / @NougatineNaja

07/26/2022 at 12:46PM

32
#29 - William Kennedy / @_williamkennedy

07/15/2022 at 01:55PM

34
#30 - zuozuomu / @zuozuomu

07/30/2022 at 12:46AM