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

145 active golfers, 574 entries

Leaderboard (lowest score wins):
33
#61 - daviddcox / @daviddcox

04/27/2025 at 02:02AM

33
#62 - hiro1234omochi / @hiro1234omochi

05/11/2025 at 01:42PM

34
#63 - Coenraad / @coenraadv

07/23/2024 at 01:45PM

34
#64 - amberg12 / @amberg12

08/02/2024 at 07:47PM

34
#65 - Tom Dooner / @tdooner

08/09/2024 at 08:41PM

34
#66 - Willy / @Willy6932612311

09/03/2024 at 09:05PM

34
#67 - Stephen Edwards / @sventi555

09/04/2024 at 05:55PM

34
#68 - Alex Elarbee / @elarbee

09/22/2024 at 04:06PM

34
#69 - Anton Strand / @AntonStrand

11/04/2024 at 03:07PM

35
#70 - Ivan Prikaznov / @Prikaz98

10/30/2024 at 11:41PM

35
#71 - Staring / @StaringWhere

12/05/2024 at 11:11PM

36
#72 - Andreas Kruck / @Spanching

07/16/2024 at 04:43PM

36
#73 - Felix / @ne0phyte

07/17/2024 at 06:13PM

36
#74 - polo / @marcolagos

07/18/2024 at 08:50PM

36
#75 - Abhinav D. / @decisivedevops

08/02/2024 at 02:15PM

36
#76 - NotWearingPants / @NotWearingPants

08/04/2024 at 11:44PM

37
#77 - Hessesian / @Hessesian

05/27/2025 at 09:52PM

38
#78 - Janusz Spatz / @janusz-anue

09/14/2024 at 09:30PM

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

09/16/2024 at 12:19AM

39
#80 - Kevin Lou / @klou23

07/26/2024 at 03:52AM

39
#81 - gnragazzi / @gnragazzi

07/27/2024 at 11:55PM

39
#82 - Tzero Ocne / @TzeroOcne

08/22/2024 at 08:28AM

39
#83 - Brice Bischoff / @B-Bischoff

10/25/2024 at 09:49AM

39
#84 - heog / @Heogy

12/30/2024 at 11:28AM

40
#85 - Vinayak Kaushik / @VinayakKaushikDH

09/19/2024 at 02:12PM

40
#86 - demouo / @demouo

10/21/2024 at 02:25PM

41
#87 - Vitaly Rudenko / @vitaly-rudenko

08/03/2024 at 10:34AM

41
#88 - Swaraj Dash / @swarajdash

12/25/2024 at 01:16PM

42
#89 - Knaughty / @Kn4ughty

08/12/2024 at 11:30AM

42
#90 - Alex Khakhlyuk / @khakhlyuk

08/21/2024 at 02:34PM