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

125 active golfers, 494 entries

Leaderboard (lowest score wins):
47
#91 - CleisthenesH / @CleisthenesH

08/20/2024 at 10:05AM

47
#92 - Neix20 / @Neix20

10/02/2024 at 07:21AM

48
#93 - Antonio Cormoranes / @anonymous_joe

07/24/2024 at 09:25PM

48
#94 - Benjamin Clauss / @benjaminclauss

08/10/2024 at 03:16AM

48
#95 - mindwrapped / @mindwrapped

08/26/2024 at 07:11PM

48
#96 - DayuanX / @DayuanX

10/07/2024 at 07:24AM

49
#97 - Melih Aktop / @mlhktp

11/02/2024 at 09:39PM

51
#98 - k1mosabe / @k1mosabe

12/03/2024 at 01:07AM

52
#99 - Pablo Acuna / @pacuna

11/27/2024 at 05:57PM

53
#100 - michirakara / @michirakara

08/02/2024 at 05:39AM

53
#101 - DarChan / @richvote

08/13/2024 at 11:21AM

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

08/18/2024 at 04:01PM

54
#103 - Jan Scholz / @radikalliberal

10/23/2024 at 06:20PM

55
#104 - Taky0nDon / @Taky0nDon

07/20/2024 at 12:07AM

59
#105 - Andrey Rakhubovsky / @omnster

08/27/2024 at 01:56PM

60
#106 - Brian Greenhill / @BrianGreenhill

07/17/2024 at 12:12AM

62
#107 - Taylor Pubins / @trpubz

10/21/2024 at 06:58PM

66
#108 - danielbonkowsky / @danielbonkowsky

08/23/2024 at 07:14PM

69
#109 - Milan pal / @milanpal15

07/12/2024 at 11:23AM

80
#110 - VKWHM / @VKWHM

08/12/2024 at 07:21PM

84
#111 - adfj / @adfj143040

07/28/2024 at 01:42PM

85
#112 - J̻̕ͅo̠̻̘h̼̖n̙̩̝͕ D̹̗̗͝oe̶̱̥͙ / @JohnJDoe2

08/15/2024 at 05:20PM

86
#113 - cdrso / @cdrso

08/12/2024 at 04:46PM

87
#114 - Christopher Wood / @CWood-sdf

08/29/2024 at 10:14PM

89
#115 - reatter / @reatter

09/17/2024 at 01:01PM

90
#116 - Byran Huang / @Hello9999901

07/30/2024 at 04:07AM

92
#117 - Murphy / @TemplateXu

08/19/2024 at 06:42AM

93
#118 - Max Gogats / @MaxGogats

08/03/2024 at 11:28PM

98
#119 - Xiaoshubudao / @XiaoshuZ73684

08/19/2024 at 10:03PM

228
#120 - Driftingdrifting / @Driftingdrifting

07/16/2024 at 05:01PM