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 55250aff5eba2c043f0318f5

Merge blank lines and properly capitalize

Here you need complete 2 tasks: 1. Remove all unwanted continuous blank lines and leave only 1 blank line between paragraphs. 2. Properly capitalize the sentences.

Start file
the little prince visits the geographer



the sixth planet was ten times larger than the last one. it was inhabited by an old gentleman who wrote voluminous books.


"oh, look! here is an explorer!" he exclaimed to himself when he saw the little prince coming.


the little prince sat down on the table and panted a little. he had already traveled so much and so far!


"where do you come from?" the old gentleman said to him.


"what is that big book?" said the little prince. "what are you doing?"



End file
The little prince visits the geographer

The sixth planet was ten times larger than the last one. It was inhabited by an old gentleman who wrote voluminous books.

"Oh, look! Here is an explorer!" He exclaimed to himself when he saw the little prince coming.

The little prince sat down on the table and panted a little. He had already traveled so much and so far!

"Where do you come from?" The old gentleman said to him.

"What is that big book?" Said the little prince. "What are you doing?"

View Diff

1c1
< the little prince visits the geographer
---
> The little prince visits the geographer
2a3
> The sixth planet was ten times larger than the last one. It was inhabited by an old gentleman who wrote voluminous books.
3a5
> "Oh, look! Here is an explorer!" He exclaimed to himself when he saw the little prince coming.
5,18c7
< the sixth planet was ten times larger than the last one. it was inhabited by an old gentleman who wrote voluminous books.
< 
< 
< "oh, look! here is an explorer!" he exclaimed to himself when he saw the little prince coming.
< 
< 
< the little prince sat down on the table and panted a little. he had already traveled so much and so far!
< 
< 
< "where do you come from?" the old gentleman said to him.
< 
< 
< "what is that big book?" said the little prince. "what are you doing?"
< 
---
> The little prince sat down on the table and panted a little. He had already traveled so much and so far!
19a9
> "Where do you come from?" The old gentleman said to him.
20a11
> "What is that big book?" Said the little prince. "What are you doing?"

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 10 remaining solutions by signing in and submitting your own entry
#11 vgmct / vgmct - Score: 51 - 04/25/15 @ 22:01
:v/./d<CR>:g//norm o<CR>dd:%s/\v(\.|!|"|^) *[^"]/\U&/g<CR>ZZ

0 comments

#12 Eric Potter / pottereric - Score: 54 - 04/09/15 @ 03:12
jdd:%s/\n\n\n/\r\r<CR>dddd:%s/\v(\.|!|"|^) *[^"]/\U&/g<CR>ZZ

0 comments

#13 Premium Ben / muppling - Score: 67 - 04/08/15 @ 12:36
<C-V>G~3Jx:%s/\(["!.] .\)/\U\1/g<CR>:%s/\(".\)/\U\1/g<CR>4Jxkdd3kdd8Gdd4GddZZ

0 comments

Created by: pftb12345

13 active golfers, 22 entries

Leaderboard (lowest score wins):
21
#1 - Urtica dioica / udioica

04/08/2015 at 02:23PM

21
#2 - John Braxler / braxler

04/10/2015 at 12:54PM

22
#3 - Petro Тrouq / zulolosi

04/09/2015 at 01:18AM

22
#4 - Oleg Parashchenko / olparko

04/09/2015 at 09:54AM

23
#5 - Matthieu Crapet / mcr05

04/08/2015 at 07:40PM

23
#6 - Ala' Ibrahim / alaa_ibrahim

04/11/2015 at 01:07AM

24
#7 - pftb12345 / pftb12345

04/08/2015 at 02:48PM

31
#8 - E Both / enboth

04/08/2015 at 01:23PM

44
#9 - kungfuchad / kungfuchad

04/08/2015 at 12:40PM

47
#10 - Elizabeth / sprinkles418

04/09/2015 at 02:35PM

51
#11 - vgmct / vgmct

04/25/2015 at 10:01PM

54
#12 - Eric Potter / pottereric

04/09/2015 at 03:12AM

67
#13 - Premium Ben / muppling

04/08/2015 at 12:36PM