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):
30
#31 - e.cousinet / @ecousinet

07/16/2024 at 09:46AM

30
#32 - Alex / @alexmatthaios

07/19/2024 at 10:34PM

30
#33 - Håkon Anders Strømsodd / @haakon8855

07/23/2024 at 12:28PM

30
#34 - Maximilian Ballard / @ediw8311xht

08/05/2024 at 02:27AM

30
#35 - Mats Faugli / @matsfaugli

08/05/2024 at 01:33PM

30
#36 - Kevin Kays / @okkays

08/09/2024 at 08:47PM

30
#37 - Bart Hageman / @BartHageman

08/13/2024 at 01:02PM

30
#38 - Karim / @KarimIbrahim

08/22/2024 at 05:33AM

30
#39 - Anton / @Sobes76rus

08/26/2024 at 08:29AM

30
#40 - MartnRamtin / @MartnRamtin

09/03/2024 at 01:09AM

30
#41 - Stoyan Dimov / @stoyandimov

09/04/2024 at 08:34AM

30
#42 - Aurélien Boeuf / @aurelbof

09/12/2024 at 02:42PM

30
#43 - ばやし / @shin5884_kt

09/16/2024 at 01:44PM

32
#44 - Ruebled / @Ruebled

07/24/2024 at 08:25PM

33
#45 - Christopher Arausa | Rathma / @wrathofrathma

08/28/2024 at 09:28PM

33
#46 - rhasarub / @rhasarub

09/05/2024 at 08:47PM

34
#47 - Coenraad / @coenraadv

07/23/2024 at 01:45PM

34
#48 - amberg12 / @amberg12

08/02/2024 at 07:47PM

34
#49 - Tom Dooner / @tdooner

08/09/2024 at 08:41PM

34
#50 - Willy / @Willy6932612311

09/03/2024 at 09:05PM

34
#51 - Stephen Edwards / @sventi555

09/04/2024 at 05:55PM

34
#52 - Alex Elarbee / @elarbee

09/22/2024 at 04:06PM

36
#53 - Andreas Kruck / @Spanching

07/16/2024 at 04:43PM

36
#54 - Felix / @ne0phyte

07/17/2024 at 06:13PM

36
#55 - polo / @marcolagos

07/18/2024 at 08:50PM

36
#56 - Abhinav D. / @decisivedevops

08/02/2024 at 02:15PM

36
#57 - NotWearingPants / @NotWearingPants

08/04/2024 at 11:44PM

38
#58 - Janusz Spatz / @janusz-anue

09/14/2024 at 09:30PM

38
#59 - Alaa Mahmoud Mohamed / @Alaa-MK

09/16/2024 at 12:19AM

39
#60 - Kevin Lou / @klou23

07/26/2024 at 03:52AM