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

106 active golfers, 419 entries

Leaderboard (lowest score wins):
80
#91 - VKWHM / @VKWHM

08/12/2024 at 07:21PM

84
#92 - adfj / @adfj143040

07/28/2024 at 01:42PM

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

08/15/2024 at 05:20PM

86
#94 - cdrso / @cdrso

08/12/2024 at 04:46PM

87
#95 - Christopher Wood / @CWood-sdf

08/29/2024 at 10:14PM

89
#96 - reatter / @reatter

09/17/2024 at 01:01PM

90
#97 - Byran Huang / @Hello9999901

07/30/2024 at 04:07AM

92
#98 - Murphy / @TemplateXu

08/19/2024 at 06:42AM

93
#99 - Max Gogats / @MaxGogats

08/03/2024 at 11:28PM

98
#100 - Xiaoshubudao / @XiaoshuZ73684

08/19/2024 at 10:03PM

145
#101 - Pablo Acuna / @pacuna

08/27/2024 at 10:57PM

228
#102 - Driftingdrifting / @Driftingdrifting

07/16/2024 at 05:01PM

249
#103 - Huang / @tututu-dual

07/17/2024 at 12:31PM

251
#104 - Stanley F / @sfo

07/30/2024 at 07:17AM

335
#105 - Serj S. / @ar0ne

08/16/2024 at 02:30PM

1221
#106 - Yan Sidyakin / @sidyakinian

07/10/2024 at 09:30PM