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 9v0066567c28000000000277

Count words

Merge duplicates and count each word.

Start file
lorem ipsum adipiscing consectetur sit do tempor do magna sit et lorem eiusmod
et dolore labore consectetur consectetur incididunt ut aliqua sit sit magna et
incididunt do aliqua eiusmod et dolore do tempor adipiscing incididunt
consectetur elit dolore eiusmod incididunt sit magna lorem eiusmod sit et ut
incididunt do magna incididunt labore labore et consectetur adipiscing do
magna sit ut sit et do eiusmod do tempor et do magna et sit et ut et sit
labore et eiusmod et labore ut sit consectetur ut magna et magna do et sit et
dolore sit tempor ut dolore magna labore magna ut sit incididunt consectetur
ut labore et et elit sit labore magna consectetur ut labore et et sit sit
tempor et ut tempor et ut eiusmod do et sit incididunt
End file
"ipsum" : 1
"aliqua" : 2
"elit" : 2
"adipiscing" : 3
"lorem" : 3
"dolore" : 5
"tempor" : 6
"eiusmod" : 7
"consectetur" : 8
"incididunt" : 8
"labore" : 9
"do" : 11
"magna" : 11
"ut" : 12
"sit" : 18
"et" : 23

View Diff

1,10c1,16
< lorem ipsum adipiscing consectetur sit do tempor do magna sit et lorem eiusmod
< et dolore labore consectetur consectetur incididunt ut aliqua sit sit magna et
< incididunt do aliqua eiusmod et dolore do tempor adipiscing incididunt
< consectetur elit dolore eiusmod incididunt sit magna lorem eiusmod sit et ut
< incididunt do magna incididunt labore labore et consectetur adipiscing do
< magna sit ut sit et do eiusmod do tempor et do magna et sit et ut et sit
< labore et eiusmod et labore ut sit consectetur ut magna et magna do et sit et
< dolore sit tempor ut dolore magna labore magna ut sit incididunt consectetur
< ut labore et et elit sit labore magna consectetur ut labore et et sit sit
< tempor et ut tempor et ut eiusmod do et sit incididunt
---
> "ipsum" : 1
> "aliqua" : 2
> "elit" : 2
> "adipiscing" : 3
> "lorem" : 3
> "dolore" : 5
> "tempor" : 6
> "eiusmod" : 7
> "consectetur" : 8
> "incididunt" : 8
> "labore" : 9
> "do" : 11
> "magna" : 11
> "ut" : 12
> "sit" : 18
> "et" : 23

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 6 remaining solutions by signing in and submitting your own entry
#7 cotarmanach / @cotarmanach - Score: 74 - 06/01/24 @ 00:13
:%s/ /\r/g<CR>:sort<CR>ggqs"ayeO"<C-R>a" : 0<Esc>ma:g/^<C-R>a$/norm! dd`a<C-A><CR>j0q16@s:sort n<CR>ZZ

0 comments


Created by: @maharba6

7 active golfers, 30 entries

Leaderboard (lowest score wins):
39
#1 - Jean George / @JeanGeo20504212

06/03/2024 at 10:55PM

39
#2 - Danilo J. S. Bellini 🥊🇧🇷 / @danilobellini

06/05/2024 at 11:46PM

39
#3 - John Braxler / @braxler

06/07/2024 at 12:28PM

41
#4 - Peppa Pig / @PeppaPi95550250

06/09/2024 at 07:16AM

61
#5 - Sander Meij / @SanderMeij

06/03/2024 at 01:53PM

61
#6 - Valacar / @valacar

06/05/2024 at 11:38PM

74
#7 - cotarmanach / @cotarmanach

06/01/2024 at 12:13AM