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 by @benz1234567:

Unlock 13 remaining solutions by signing in and submitting your own entry
Created by: @maharba6

106 active golfers, 419 entries

Solutions by @benz1234567:
28
#25 - benz1234567 / @benz1234567

08/08/2024 at 08:10PM

30
#>35 - benz1234567 / @benz1234567

08/08/2024 at 08:02PM

32
#>44 - benz1234567 / @benz1234567

08/08/2024 at 07:59PM

33
#>44 - benz1234567 / @benz1234567

08/08/2024 at 07:57PM

34
#>48 - benz1234567 / @benz1234567

08/08/2024 at 07:52PM

35
#>52 - benz1234567 / @benz1234567

08/08/2024 at 07:45PM

38
#>57 - benz1234567 / @benz1234567

08/08/2024 at 07:41PM

41
#>64 - benz1234567 / @benz1234567

08/08/2024 at 07:34PM

41
#>64 - benz1234567 / @benz1234567

08/08/2024 at 07:38PM

49
#>82 - benz1234567 / @benz1234567

08/08/2024 at 07:29PM

57
#>86 - benz1234567 / @benz1234567

08/08/2024 at 07:26PM

80
#>90 - benz1234567 / @benz1234567

08/08/2024 at 07:06PM

83
#>91 - benz1234567 / @benz1234567

08/08/2024 at 07:03PM