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 5521ef575709ea270a00ce69

Remove hard line breaks

Text files with Hard breaks are not good for e-readers. We need remove all hard line breaks and have long lines.

Start file
[ chapter 1 ] - we are
introduced to the narrator, a
pilot, and his ideas about
grown-ups

Once when i was six years old
i saw a magnificent picture in
a book, called true stories
from nature, about the
primeval forest. It was a
picture of a boa constrictor
in the act of swallowing an
animal. Here is a copy of the
drawing.

In the book it said: "boa
constrictors swallow their
prey whole, without chewing
it. After that they are not
able to move, and they sleep
through the six months that
they need for digestion."

I pondered deeply, then, over
the adventures of the jungle.
And after some work with a
colored pencil i succeeded in
making my first drawing. My
drawing number one. It looked
like this:

I showed my masterpiece to the
grown-ups, and asked them
whether the drawing frightened
them.

But they answered: "frighten?
Why should any one be
frightened by a hat?"

My drawing was not a picture
of a hat. It was a picture of
a boa constrictor digesting an
elephant. But since the
grown-ups were not able to
understand it, i made another
drawing: i drew the inside of
the boa constrictor, so that
the grown-ups could see it
clearly. They always need to
have things explained. My
drawing number two looked like
this:

The grown-ups response, this
time, was to advise me to lay
aside my drawings of boa
constrictors, whether from the
inside or the outside, and
devote myself instead to
geography, history, arithmetic
and grammar. That is why, at
the age of six, i gave up what
might have been a magnificent
career as a painter. I had
been disheartened by the
failure of my drawing number
one and my drawing number two.
Grown-ups never understand
anything by themselves, and it
is tiresome for children to be
always and forever explaining
things to them.

So then i chose another
profession, and learned to
pilot airplanes. I have flown
a little over all parts of the
world; and it is true that
geography has been very useful
to me. At a glance i can
distinguish china from
arizona. If one gets lost in
the night, such knowledge is
valuable.

In the course of this life i
have had a great many
encounters with a great many
people who have been concerned
with matters of consequence. I
have lived a great deal among
grown-ups. I have seen them
intimately, close at hand. And
that hasnt much improved my
opinion of them.

Whenever i met one of them who
seemed to me at all
clear-sighted, i tried the
experiment of showing him my
drawing number one, which i
have always kept. I would try
to find out, so, if this was a
person of true understanding.
But, whoever it was, he, or
she, would always say:

"that is a hat."

Then i would never talk to
that person about boa
constrictors, or primeval
forests, or stars. I would
bring myself down to his
level. I would talk to him
about bridge, and golf, and
politics, and neckties. And
the grown-up would be greatly
pleased to have met such a
sensible man.
End file
[ chapter 1 ] - we are introduced to the narrator, a pilot, and his ideas about grown-ups
Once when i was six years old i saw a magnificent picture in a book, called true stories from nature, about the primeval forest. It was a picture of a boa constrictor in the act of swallowing an animal. Here is a copy of the drawing.
In the book it said: "boa constrictors swallow their prey whole, without chewing it. After that they are not able to move, and they sleep through the six months that they need for digestion."
I pondered deeply, then, over the adventures of the jungle.  And after some work with a colored pencil i succeeded in making my first drawing. My drawing number one. It looked like this:
I showed my masterpiece to the grown-ups, and asked them whether the drawing frightened them.
But they answered: "frighten?  Why should any one be frightened by a hat?"
My drawing was not a picture of a hat. It was a picture of a boa constrictor digesting an elephant. But since the grown-ups were not able to understand it, i made another drawing: i drew the inside of the boa constrictor, so that the grown-ups could see it clearly. They always need to have things explained. My drawing number two looked like this:
The grown-ups response, this time, was to advise me to lay aside my drawings of boa constrictors, whether from the inside or the outside, and devote myself instead to geography, history, arithmetic and grammar. That is why, at the age of six, i gave up what might have been a magnificent career as a painter. I had been disheartened by the failure of my drawing number one and my drawing number two.  Grown-ups never understand anything by themselves, and it is tiresome for children to be always and forever explaining things to them.
So then i chose another profession, and learned to pilot airplanes. I have flown a little over all parts of the world; and it is true that geography has been very useful to me. At a glance i can distinguish china from arizona. If one gets lost in the night, such knowledge is valuable.
In the course of this life i have had a great many encounters with a great many people who have been concerned with matters of consequence. I have lived a great deal among grown-ups. I have seen them intimately, close at hand. And that hasnt much improved my opinion of them.
Whenever i met one of them who seemed to me at all clear-sighted, i tried the experiment of showing him my drawing number one, which i have always kept. I would try to find out, so, if this was a person of true understanding.  But, whoever it was, he, or she, would always say:
"that is a hat."
Then i would never talk to that person about boa constrictors, or primeval forests, or stars. I would bring myself down to his level. I would talk to him about bridge, and golf, and politics, and neckties. And the grown-up would be greatly pleased to have met such a sensible man.

View Diff

1,108c1,11
< [ chapter 1 ] - we are
< introduced to the narrator, a
< pilot, and his ideas about
< grown-ups
< 
< Once when i was six years old
< i saw a magnificent picture in
< a book, called true stories
< from nature, about the
< primeval forest. It was a
< picture of a boa constrictor
< in the act of swallowing an
< animal. Here is a copy of the
< drawing.
< 
< In the book it said: "boa
< constrictors swallow their
< prey whole, without chewing
< it. After that they are not
< able to move, and they sleep
< through the six months that
< they need for digestion."
< 
< I pondered deeply, then, over
< the adventures of the jungle.
< And after some work with a
< colored pencil i succeeded in
< making my first drawing. My
< drawing number one. It looked
< like this:
< 
< I showed my masterpiece to the
< grown-ups, and asked them
< whether the drawing frightened
< them.
< 
< But they answered: "frighten?
< Why should any one be
< frightened by a hat?"
< 
< My drawing was not a picture
< of a hat. It was a picture of
< a boa constrictor digesting an
< elephant. But since the
< grown-ups were not able to
< understand it, i made another
< drawing: i drew the inside of
< the boa constrictor, so that
< the grown-ups could see it
< clearly. They always need to
< have things explained. My
< drawing number two looked like
< this:
< 
< The grown-ups response, this
< time, was to advise me to lay
< aside my drawings of boa
< constrictors, whether from the
< inside or the outside, and
< devote myself instead to
< geography, history, arithmetic
< and grammar. That is why, at
< the age of six, i gave up what
< might have been a magnificent
< career as a painter. I had
< been disheartened by the
< failure of my drawing number
< one and my drawing number two.
< Grown-ups never understand
< anything by themselves, and it
< is tiresome for children to be
< always and forever explaining
< things to them.
< 
< So then i chose another
< profession, and learned to
< pilot airplanes. I have flown
< a little over all parts of the
< world; and it is true that
< geography has been very useful
< to me. At a glance i can
< distinguish china from
< arizona. If one gets lost in
< the night, such knowledge is
< valuable.
< 
< In the course of this life i
< have had a great many
< encounters with a great many
< people who have been concerned
< with matters of consequence. I
< have lived a great deal among
< grown-ups. I have seen them
< intimately, close at hand. And
< that hasnt much improved my
< opinion of them.
< 
< Whenever i met one of them who
< seemed to me at all
< clear-sighted, i tried the
< experiment of showing him my
< drawing number one, which i
< have always kept. I would try
< to find out, so, if this was a
< person of true understanding.
< But, whoever it was, he, or
< she, would always say:
< 
---
> [ chapter 1 ] - we are introduced to the narrator, a pilot, and his ideas about grown-ups
> Once when i was six years old i saw a magnificent picture in a book, called true stories from nature, about the primeval forest. It was a picture of a boa constrictor in the act of swallowing an animal. Here is a copy of the drawing.
> In the book it said: "boa constrictors swallow their prey whole, without chewing it. After that they are not able to move, and they sleep through the six months that they need for digestion."
> I pondered deeply, then, over the adventures of the jungle.  And after some work with a colored pencil i succeeded in making my first drawing. My drawing number one. It looked like this:
> I showed my masterpiece to the grown-ups, and asked them whether the drawing frightened them.
> But they answered: "frighten?  Why should any one be frightened by a hat?"
> My drawing was not a picture of a hat. It was a picture of a boa constrictor digesting an elephant. But since the grown-ups were not able to understand it, i made another drawing: i drew the inside of the boa constrictor, so that the grown-ups could see it clearly. They always need to have things explained. My drawing number two looked like this:
> The grown-ups response, this time, was to advise me to lay aside my drawings of boa constrictors, whether from the inside or the outside, and devote myself instead to geography, history, arithmetic and grammar. That is why, at the age of six, i gave up what might have been a magnificent career as a painter. I had been disheartened by the failure of my drawing number one and my drawing number two.  Grown-ups never understand anything by themselves, and it is tiresome for children to be always and forever explaining things to them.
> So then i chose another profession, and learned to pilot airplanes. I have flown a little over all parts of the world; and it is true that geography has been very useful to me. At a glance i can distinguish china from arizona. If one gets lost in the night, such knowledge is valuable.
> In the course of this life i have had a great many encounters with a great many people who have been concerned with matters of consequence. I have lived a great deal among grown-ups. I have seen them intimately, close at hand. And that hasnt much improved my opinion of them.
> Whenever i met one of them who seemed to me at all clear-sighted, i tried the experiment of showing him my drawing number one, which i have always kept. I would try to find out, so, if this was a person of true understanding.  But, whoever it was, he, or she, would always say:
110,121c13
< 
< Then i would never talk to
< that person about boa
< constrictors, or primeval
< forests, or stars. I would
< bring myself down to his
< level. I would talk to him
< about bridge, and golf, and
< politics, and neckties. And
< the grown-up would be greatly
< pleased to have met such a
< sensible man.
---
> Then i would never talk to that person about boa constrictors, or primeval forests, or stars. I would bring myself down to his level. I would talk to him about bridge, and golf, and politics, and neckties. And the grown-up would be greatly pleased to have met such a sensible man.

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 33 remaining solutions by signing in and submitting your own entry
#34 Mike Krason / @mfkrason - Score: 51 - 04/23/15 @ 02:16
/^$<CR>qaqqa:<Esc><Esc>q:0<CR>qaVnJjq10@aV<Esc>jVGJ:%s/\s\+$//<CR>:w<CR>:q<CR>

0 comments


Created by: @pftb12345

34 active golfers, 74 entries

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

04/06/2015 at 05:29AM

10
#2 - Tim Chase / @gumnos

04/06/2015 at 11:43AM

10
#3 - kandrey999 / @kandrey999

04/06/2015 at 12:49PM

10
#4 - John Braxler / @braxler

04/06/2015 at 06:24PM

10
#5 - Oleg Parashchenko / @olparko

04/07/2015 at 08:44AM

10
#6 - Oskar Fridell / @rax0m

10/09/2017 at 12:14PM

10
#7 - Jon Krause / @jkrause314

12/13/2020 at 07:09PM

10
#8 - russellzhaomao / @russellzhaomao

06/19/2022 at 02:44AM

10
#9 - Alex / @AlexanderHeatl2

07/07/2022 at 10:23PM

10
#10 - MonkieeBoi / @MonkieeBoi

02/09/2024 at 11:34AM

10
#11 - Peppa Pig / @PeppaPi95550250

05/28/2024 at 03:59AM

13
#12 - Berel94 / @Berel94

03/20/2024 at 05:59PM

14
#13 - Matt / @mcr05

04/06/2015 at 07:47AM

14
#14 - E Both / @enboth

04/06/2015 at 10:17AM

14
#15 - Elizabeth / @sprinkles418

04/06/2015 at 11:19PM

14
#16 - ZC-死理性派 / @zecyzhang

04/08/2015 at 02:12PM

14
#17 - Louis Caruana / @louiecaruana

04/24/2015 at 03:43AM

14
#18 - vgmct / @vgmct

04/25/2015 at 07:11PM

14
#19 - Clark DuVall / @theclarkatron

05/23/2015 at 07:13PM

14
#20 - David Stensland / @DavidStensland

08/20/2016 at 04:27AM

14
#21 - Norbert / @mullno

05/16/2019 at 09:37PM

16
#22 - Petro Тrouq / @zulolosi

04/07/2015 at 08:23PM

17
#23 - ltn614 / @ltn614

10/08/2015 at 09:14AM

17
#24 - arsi arola / @mos_kiitto

12/11/2019 at 09:23PM

17
#25 - mevmev / @mevmev8

09/28/2021 at 09:34PM

18
#26 - James / @Dronak

04/06/2015 at 03:02AM

19
#27 - squdle / @squdle

06/17/2017 at 10:35AM

21
#28 - PJ Frazer / @pj_frazer

11/24/2018 at 02:30AM

21
#29 - nickGPT / @nickandbro

08/28/2024 at 04:16AM

23
#30 - Bitt Faulk / @bittfaulk

03/02/2020 at 10:41PM