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 @nickandbro:

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

106 active golfers, 419 entries

Solutions by @nickandbro:
19
#10 - nickGPT / @nickandbro

08/21/2024 at 03:26AM

19
#>10 - nickGPT / @nickandbro

08/21/2024 at 03:39AM

19
#>10 - nickGPT / @nickandbro

08/21/2024 at 05:22AM

19
#>10 - nickGPT / @nickandbro

08/21/2024 at 05:24AM

19
#>10 - nickGPT / @nickandbro

08/21/2024 at 05:44AM

19
#>10 - nickGPT / @nickandbro

08/21/2024 at 05:47AM

19
#>10 - nickGPT / @nickandbro

08/21/2024 at 05:56AM

19
#>10 - nickGPT / @nickandbro

08/21/2024 at 03:39PM

19
#>10 - nickGPT / @nickandbro

08/21/2024 at 03:49PM

19
#>10 - nickGPT / @nickandbro

08/21/2024 at 03:54PM

19
#>10 - nickGPT / @nickandbro

08/21/2024 at 07:59PM

19
#>10 - nickGPT / @nickandbro

08/22/2024 at 02:40AM

19
#>10 - nickGPT / @nickandbro

08/22/2024 at 02:59AM

19
#>10 - nickGPT / @nickandbro

08/23/2024 at 03:18AM

19
#>10 - nickGPT / @nickandbro

08/23/2024 at 03:23AM

19
#>10 - nickGPT / @nickandbro

08/23/2024 at 05:13AM

19
#>11 - nickGPT / @nickandbro

08/25/2024 at 06:43AM

19
#>11 - nickGPT / @nickandbro

08/26/2024 at 04:50PM

19
#>11 - nickGPT / @nickandbro

08/26/2024 at 04:57PM

19
#>11 - nickGPT / @nickandbro

08/26/2024 at 07:09PM

22
#>15 - nickGPT / @nickandbro

08/20/2024 at 11:05PM

23
#>18 - nickGPT / @nickandbro

08/20/2024 at 11:04PM

25
#>22 - nickGPT / @nickandbro

08/20/2024 at 08:00PM

28
#>25 - nickGPT / @nickandbro

08/20/2024 at 07:59PM

30
#>37 - nickGPT / @nickandbro

08/20/2024 at 01:57PM

30
#>37 - nickGPT / @nickandbro

08/20/2024 at 02:42PM

32
#>44 - nickGPT / @nickandbro

08/20/2024 at 01:57PM

34
#>49 - nickGPT / @nickandbro

08/20/2024 at 01:56PM

36
#>57 - nickGPT / @nickandbro

08/20/2024 at 01:56PM

39
#>61 - nickGPT / @nickandbro

08/20/2024 at 01:56PM

41
#>64 - nickGPT / @nickandbro

08/20/2024 at 01:55PM

42
#>65 - nickGPT / @nickandbro

08/20/2024 at 01:55PM

43
#>69 - nickGPT / @nickandbro

08/20/2024 at 01:55PM

44
#>72 - nickGPT / @nickandbro

08/20/2024 at 01:54PM

46
#>76 - nickGPT / @nickandbro

08/20/2024 at 01:54PM

47
#>77 - nickGPT / @nickandbro

08/20/2024 at 01:54PM

48
#>80 - nickGPT / @nickandbro

08/20/2024 at 01:53PM

53
#>85 - nickGPT / @nickandbro

08/20/2024 at 01:53PM

55
#>86 - nickGPT / @nickandbro

08/20/2024 at 01:53PM

60
#>88 - nickGPT / @nickandbro

08/20/2024 at 01:52PM

62
#>88 - nickGPT / @nickandbro

08/20/2024 at 01:40PM

62
#>88 - nickGPT / @nickandbro

08/20/2024 at 01:40PM

62
#>88 - nickGPT / @nickandbro

08/20/2024 at 01:41PM

62
#>88 - nickGPT / @nickandbro

08/20/2024 at 01:41PM

62
#>88 - nickGPT / @nickandbro

08/20/2024 at 01:41PM

62
#>88 - nickGPT / @nickandbro

08/20/2024 at 01:42PM

62
#>88 - nickGPT / @nickandbro

08/20/2024 at 01:42PM

62
#>88 - nickGPT / @nickandbro

08/20/2024 at 01:42PM

69
#>90 - nickGPT / @nickandbro

08/20/2024 at 01:40PM

73
#>90 - nickGPT / @nickandbro

08/20/2024 at 01:39PM

83
#>91 - nickGPT / @nickandbro

08/20/2024 at 01:39PM

86
#>94 - nickGPT / @nickandbro

08/20/2024 at 01:34PM

98
#>100 - nickGPT / @nickandbro

08/20/2024 at 01:34PM

207
#>101 - nickGPT / @nickandbro

08/20/2024 at 01:33PM

249
#>103 - nickGPT / @nickandbro

08/20/2024 at 01:33PM

251
#>104 - nickGPT / @nickandbro

08/20/2024 at 01:22PM

335
#>105 - nickGPT / @nickandbro

08/20/2024 at 01:21PM

1221
#>106 - nickGPT / @nickandbro

08/20/2024 at 08:13AM