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

Copy punctuation

I want to copy the last line’s brackets, quotes, and commas to each line. How?

Start file
  #808220    #FF0214    #FFD840    #708230
  #808200    #FF0170    #FFD820    #708210
  #808180    #FF0144    #FFD800    #708190
  #808160    #FF0120    #FFD780    #708170
  #808140    #FF0074    #FFD760    #708150
  #808120    #FF0050    #FFD740    #708130
  #808100    #FF0024    #FFD720    #708110
['#808080', '#FF0000', '#FFD700', '#708090']
End file
['#808220', '#FF0214', '#FFD840', '#708230']
['#808200', '#FF0170', '#FFD820', '#708210']
['#808180', '#FF0144', '#FFD800', '#708190']
['#808160', '#FF0120', '#FFD780', '#708170']
['#808140', '#FF0074', '#FFD760', '#708150']
['#808120', '#FF0050', '#FFD740', '#708130']
['#808100', '#FF0024', '#FFD720', '#708110']
['#808080', '#FF0000', '#FFD700', '#708090']

View Diff

1,7c1,7
<   #808220    #FF0214    #FFD840    #708230
<   #808200    #FF0170    #FFD820    #708210
<   #808180    #FF0144    #FFD800    #708190
<   #808160    #FF0120    #FFD780    #708170
<   #808140    #FF0074    #FFD760    #708150
<   #808120    #FF0050    #FFD740    #708130
<   #808100    #FF0024    #FFD720    #708110
---
> ['#808220', '#FF0214', '#FFD840', '#708230']
> ['#808200', '#FF0170', '#FFD820', '#708210']
> ['#808180', '#FF0144', '#FFD800', '#708190']
> ['#808160', '#FF0120', '#FFD780', '#708170']
> ['#808140', '#FF0074', '#FFD760', '#708150']
> ['#808120', '#FF0050', '#FFD740', '#708130']
> ['#808100', '#FF0024', '#FFD720', '#708110']

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 104 remaining solutions by signing in and submitting your own entry
#105 Yan Sidyakin / @sidyakinian - Score: 1221 - 07/10/24 @ 21:30
jjjjjjjkxi#ji<BS><BS><Esc>hhi['<Esc>llljkjjkkjhxhxlllllllhhhhhhbwwbwbwbwhhhh'i'<Esc>i;<BS>',<Esc>llxxljkh'ia'<Esc>hxlllllllllh<Esc>'i'<Esc><Esc>i<Esc><Esc>li',xx<BS><BS><Esc>xxxi,<Esc>lll'j<Esc><Esc><Esc>jkh'<Esc>i'<Esc>lxllbwbwhhhh;'<Esc>'<Esc><Esc>'i'<Esc><Esc><Esc><Esc>i',<Esc>llzxxxxh<Esc>'a<Esc><Esc>a'b<BS><Esc>wwwbbeeeeeeeeeeebbbbbbbbbbbbeela']<Esc>kabbb<BS><BS><BS><BS>u<BS><Esc>uu<Esc>la']<Esc>ka']<Esc>ab<BS><Esc>b<Esc>bhh'i<Esc><Esc><Esc>ah<BS>'<Esc>h<BS><BS>xxhx<Esc>'i'<Esc><Esc>i',<Esc><Esc><Esc>hhhhhhhh;i'h<BS><Esc><Esc>hxhhxxh'<Esc>'i'i''ij<Esc>xhxhx<Esc>[<Esc><Esc><Esc>i['<Esc><Esc>eel'i''eel'i'<Esc><Esc><Esc><Esc><Esc><Esc>i'm<BS>,xx<BS><BS><Esc>llxx'i;<Esc><Esc><Esc>kj'ii'x<BS><Esc>xix<BS>l<BS>'<Esc>lxel<Esc>'<Esc>i',<Esc><Esc>kkkkjjkkkh0i['<Esc><Esc>lxxea',x<BS><Esc>xi,x<BS><Esc>lxxlxha'<Esc>eelllxxhh<Esc>'i'<Esc><Esc>'<Esc><Esc><Esc><Esc>'<Esc><Esc><Esc><Esc>''''''<Esc><Esc><Esc><Esc><Esc>hhjjkkkkkkkllllllllllllllllllllii<BS>;<BS>',<Esc>lla'<Esc>hxllllllllxx'<Esc>'i;'<Esc><Esc>'''kkkkjjkkkeeeeeeeel<Esc>'i'<Esc><Esc><Esc>''''kjkkeeeeeeellllllli',<Esc>lxxhli '<Esc><Esc>eela']<Esc><Esc>jhhhhhhh0[i['hh<Esc>[<Esc><Esc>[iii<BS>['l<BS><Esc>llljikk<BS><BS>x<BS><Esc>kxhhx''li'<Esc>x'<Esc>'i'<Esc>ii<BS>'x<BS><Esc>lxea;<BS>'m<BS>,<Esc><Esc>lllxxh'i'i<Esc>i;<BS>'e<BS>x<BS><Esc>lxea',ll<BS><BS><Esc>llxlxxi#<Esc>h'<Esc>i'<Esc>lxea',<Esc><Esc>llxxhlxi'<Esc><Esc>eea'\<BS>]<Esc>jhjkeekjjjjkkkkhlhxhx<Esc>[i[<Esc><Esc><Esc><Esc>i['<Esc><Esc>eea',<Esc><Esc>llxxlxi#<Esc>hi'<Esc>lxhlea',ll<BS><BS><Esc>lllxxhxha;<BS>'h<BS><Esc>eel'<Esc><Esc>'<Esc>i',<Esc><Esc>llxxxhli'e<BS><Esc>eela;<BS>']<Esc><Esc>hjhhhhhhh<Esc>'<Esc>'<Esc>'i'<Esc><Esc>a'e<BS><Esc>eea;<BS>'<Esc>hhh<Esc><Esc>bbbhi<Esc>'a;<Esc>a'<Esc><Esc>eea'<Esc><Esc>hebbbbi;<BS>'<Esc>hhhhi'<Esc><Esc>0lli'h<BS><Esc>hxhxi[<Esc>eelli,<Esc>lllxxhxllleli',<Esc>llxxhlxelelli,<Esc><Esc>lllxxhlhxllella\<BS>]<Esc>jhhhhhhhhhh0l'i;a'hh<BS><BS><Esc>hhi[<Esc>llxxhx<Esc>'i''jjjjka'<Esc><Esc>eeli;<BS>',<Esc>lllxxhlhxi'<Esc><Esc>llllllll';<Esc>'i'<Esc><Esc>i',<Esc>llllxhhxxhli'<Esc><Esc>llllllll;'i'<Esc>i;<BS>',ll<BS><BS><Esc>lllllhxxhxhx#<Esc><Esc><Esc><Esc><Esc><Esc><Esc>ih<BS>#<Esc><Esc>hl'i;a<Esc>ha;<BS>'<Esc>eeeeekee0ie<BS><Esc>$la'\<BS>]<Esc>:w<CR>:q<CR>

0 comments


Created by: @maharba6

105 active golfers, 416 entries

Leaderboard (lowest score wins):
39
#61 - gnragazzi / @gnragazzi

07/27/2024 at 11:55PM

39
#62 - Tzero Ocne / @TzeroOcne

08/22/2024 at 08:28AM

40
#63 - Vinayak Kaushik / @VinayakKaushikDH

09/19/2024 at 02:12PM

41
#64 - Vitaly Rudenko / @vitaly-rudenko

08/03/2024 at 10:34AM

42
#65 - Knaughty / @Kn4ughty

08/12/2024 at 11:30AM

42
#66 - Alex Khakhlyuk / @khakhlyuk

08/21/2024 at 02:34PM

42
#67 - Jonathan Schaaij / @jonathanschaaij

08/21/2024 at 06:54PM

42
#68 - Coletronix / @Coletronix

09/18/2024 at 07:54PM

43
#69 - Askma milk / @AskmaMilk55085

08/18/2024 at 01:57AM

44
#70 - Sonu Farid / @sonufarid

07/22/2024 at 10:13AM

44
#71 - Rodi-Janssen / @Rodi-Janssen

08/01/2024 at 01:15PM

44
#72 - John / @john_burner_1

08/06/2024 at 02:18PM

44
#73 - Tarin Mahmood / @tmahmood

08/27/2024 at 01:42AM

44
#74 - Artur Sarlo / @artursarlo

09/27/2024 at 08:09PM

45
#75 - Fionn Fitzmaurice / @fionn

08/29/2024 at 06:40PM

46
#76 - Skewcy / @ChuanyuXue

08/12/2024 at 02:18PM

47
#77 - CleisthenesH / @CleisthenesH

08/20/2024 at 10:05AM

47
#78 - Neix20 / @Neix20

10/02/2024 at 07:21AM

48
#79 - Antonio Cormoranes / @anonymous_joe

07/24/2024 at 09:25PM

48
#80 - Benjamin Clauss / @benjaminclauss

08/10/2024 at 03:16AM

48
#81 - mindwrapped / @mindwrapped

08/26/2024 at 07:11PM

53
#82 - michirakara / @michirakara

08/02/2024 at 05:39AM

53
#83 - DarChan / @richvote

08/13/2024 at 11:21AM

53
#84 - Eric Söderström / @eksoderstrom

08/18/2024 at 04:01PM

55
#85 - Taky0nDon / @Taky0nDon

07/20/2024 at 12:07AM

59
#86 - Andrey Rakhubovsky / @omnster

08/27/2024 at 01:56PM

60
#87 - Brian Greenhill / @BrianGreenhill

07/17/2024 at 12:12AM

66
#88 - danielbonkowsky / @danielbonkowsky

08/23/2024 at 07:14PM

69
#89 - Milan pal / @milanpal15

07/12/2024 at 11:23AM

80
#90 - VKWHM / @VKWHM

08/12/2024 at 07:21PM