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 5014b2156318a4000200000b

Convert regular pandoc footnotes to in-line notes

Pandoc extends markdown by allowing footnotes, which are usually represented with a footnote identifier followed later in the document by the footnote itself. But Pandoc also allows inline footnotes without identifiers. How many strokes does it take to convert regular footnotes to inline notes? (NB: I've had trouble figuring out whether text-width makes a difference to Vimgolf in comparing the input and output file. I finally tested this locally using the Vimgolf vimrc and did a "gq" on the entire buffer as the last step. Apologies if I'm making a newbie mistake. First time submitter.)

Start file
American democracy means, at the very least, majority rule. And Wendell
Phillips was, above all, a democrat. “I plant myself always on
democratic principles," Phillips said in 1865. "I am a democrat,
ingrained, from top to toe.”[^1]

Of course, Phillips could not always be so explicit in calling himself a
democrat, because during his lifetime, the Democratic Party was
committed officially to silencing abolitionists like him. But in
retrospect, few things about Phillips are clearer than that he was a
democrat. In an era when even the Democratic Party committed itself, at
most, to universal white manhood suffrage, Phillips advocated the right
to vote without respect to sex or complexion, and he also publicly
supported the efforts of democratic reformers abroad like the British
Chartists at a time when even male suffrage was still rare and
controversial outside the United States. The abolitionist and Chartist
exile to the United States John C. Cluer, for example, vouched for
Phillips as "a genuine Democrat," and claimed to know that Phillips,
while in England in 1840, had "perilled his popularity by finding his
way into a loft among the Chartists," and speaking and sympathizing with
them, "instead of seeking introductions to the aristocracy."[^2]

A far-sighted advocate for the right to vote, Phillips also planted
himself on the broader democratic principle that the people and "public
opinion" should rule. In an important 1852 speech entitled "Public
Opinion," Phillips even declared that "the people never err." He did not
mean, of course, that every "single verdict which the people of to-day
may record" was right, as he immediately clarified. But he did believe
that "the great democratic tendencies of the masses" moved in the
direction of right, especially over the long run. If, as James Brewer
Stewart notes in his biography, Phillips was born "an offspring of
aristocrats," as a man he became a democrat of democrats.[^3]

[^1]: "Massachusetts Anti-Slavery Society Annual Meeting," *Liberator*,
    17 February 1865. Phillips made the statement while arguing for
    voting rights for freedmen in the South.

[^2]: "Twenty-Ninth Annual Meeting of the Massachusetts Anti-Slavery
    Society," *Liberator*, 31 January 1862. Phillips's longstanding
    commitments to the expansion of suffrage are sometimes overlooked
    because in the 1840s and 1850s Phillips himself, like many
    Garrisonians, refused to vote under a proslavery Constitution. Yet
    Phillips's position was much like Garrison, who explained his
    support for women's right to vote in 1850 by saying that "I want the
    women to have the right to vote, and I call upon them to demand it
    perseveringly until they possess it. When they have obtained it, it
    will be for them to say whether they will exercise it or not."
    Garrison quoted in John L. Thomas, *The Liberator: William Lloyd
    Garrison, A Biography* (Boston: Little, Brown, 1963), 372-373; see
    also Kraditor, *Means and Ends in American Abolitionism*, 59.

[^3]: Wendell Phillips, "Public Opinion," in *Speeches, Lectures and
    Letters* (Boston: James Redpath, 1863), 45-46; James Brewer Stewart,
    *Wendell Phillips: Liberty's Hero* (Baton Rouge: Louisiana State
    University Press, 1986, 3).
End file
American democracy means, at the very least, majority rule. And Wendell
Phillips was, above all, a democrat. “I plant myself always on democratic
principles," Phillips said in 1865. "I am a democrat, ingrained, from top to
toe.”^["Massachusetts Anti-Slavery Society Annual Meeting," *Liberator*, 17
February 1865. Phillips made the statement while arguing for voting rights for
freedmen in the South.]

Of course, Phillips could not always be so explicit in calling himself a
democrat, because during his lifetime, the Democratic Party was committed
officially to silencing abolitionists like him. But in retrospect, few things
about Phillips are clearer than that he was a democrat. In an era when even the
Democratic Party committed itself, at most, to universal white manhood
suffrage, Phillips advocated the right to vote without respect to sex or
complexion, and he also publicly supported the efforts of democratic reformers
abroad like the British Chartists at a time when even male suffrage was still
rare and controversial outside the United States. The abolitionist and Chartist
exile to the United States John C. Cluer, for example, vouched for Phillips as
"a genuine Democrat," and claimed to know that Phillips, while in England in
1840, had "perilled his popularity by finding his way into a loft among the
Chartists," and speaking and sympathizing with them, "instead of seeking
introductions to the aristocracy."^["Twenty-Ninth Annual Meeting of the
Massachusetts Anti-Slavery Society," *Liberator*, 31 January 1862. Phillips's
longstanding commitments to the expansion of suffrage are sometimes overlooked
because in the 1840s and 1850s Phillips himself, like many Garrisonians,
refused to vote under a proslavery Constitution. Yet Phillips's position was
much like Garrison, who explained his support for women's right to vote in 1850
by saying that "I want the women to have the right to vote, and I call upon
them to demand it perseveringly until they possess it. When they have obtained
it, it will be for them to say whether they will exercise it or not." Garrison
quoted in John L. Thomas, *The Liberator: William Lloyd Garrison, A Biography*
(Boston: Little, Brown, 1963), 372-373; see also Kraditor, *Means and Ends in
American Abolitionism*, 59.]

A far-sighted advocate for the right to vote, Phillips also planted himself on
the broader democratic principle that the people and "public opinion" should
rule. In an important 1852 speech entitled "Public Opinion," Phillips even
declared that "the people never err." He did not mean, of course, that every
"single verdict which the people of to-day may record" was right, as he
immediately clarified. But he did believe that "the great democratic tendencies
of the masses" moved in the direction of right, especially over the long run.
If, as James Brewer Stewart notes in his biography, Phillips was born "an
offspring of aristocrats," as a man he became a democrat of democrats.^[Wendell
Phillips, "Public Opinion," in *Speeches, Lectures and Letters* (Boston: James
Redpath, 1863), 45-46; James Brewer Stewart, *Wendell Phillips: Liberty's Hero*
(Baton Rouge: Louisiana State University Press, 1986, 3).]

View Diff

2,4c2,6
< Phillips was, above all, a democrat. “I plant myself always on
< democratic principles," Phillips said in 1865. "I am a democrat,
< ingrained, from top to toe.”[^1]
---
> Phillips was, above all, a democrat. “I plant myself always on democratic
> principles," Phillips said in 1865. "I am a democrat, ingrained, from top to
> toe.”^["Massachusetts Anti-Slavery Society Annual Meeting," *Liberator*, 17
> February 1865. Phillips made the statement while arguing for voting rights for
> freedmen in the South.]
7,20c9,32
< democrat, because during his lifetime, the Democratic Party was
< committed officially to silencing abolitionists like him. But in
< retrospect, few things about Phillips are clearer than that he was a
< democrat. In an era when even the Democratic Party committed itself, at
< most, to universal white manhood suffrage, Phillips advocated the right
< to vote without respect to sex or complexion, and he also publicly
< supported the efforts of democratic reformers abroad like the British
< Chartists at a time when even male suffrage was still rare and
< controversial outside the United States. The abolitionist and Chartist
< exile to the United States John C. Cluer, for example, vouched for
< Phillips as "a genuine Democrat," and claimed to know that Phillips,
< while in England in 1840, had "perilled his popularity by finding his
< way into a loft among the Chartists," and speaking and sympathizing with
< them, "instead of seeking introductions to the aristocracy."[^2]
---
> democrat, because during his lifetime, the Democratic Party was committed
> officially to silencing abolitionists like him. But in retrospect, few things
> about Phillips are clearer than that he was a democrat. In an era when even the
> Democratic Party committed itself, at most, to universal white manhood
> suffrage, Phillips advocated the right to vote without respect to sex or
> complexion, and he also publicly supported the efforts of democratic reformers
> abroad like the British Chartists at a time when even male suffrage was still
> rare and controversial outside the United States. The abolitionist and Chartist
> exile to the United States John C. Cluer, for example, vouched for Phillips as
> "a genuine Democrat," and claimed to know that Phillips, while in England in
> 1840, had "perilled his popularity by finding his way into a loft among the
> Chartists," and speaking and sympathizing with them, "instead of seeking
> introductions to the aristocracy."^["Twenty-Ninth Annual Meeting of the
> Massachusetts Anti-Slavery Society," *Liberator*, 31 January 1862. Phillips's
> longstanding commitments to the expansion of suffrage are sometimes overlooked
> because in the 1840s and 1850s Phillips himself, like many Garrisonians,
> refused to vote under a proslavery Constitution. Yet Phillips's position was
> much like Garrison, who explained his support for women's right to vote in 1850
> by saying that "I want the women to have the right to vote, and I call upon
> them to demand it perseveringly until they possess it. When they have obtained
> it, it will be for them to say whether they will exercise it or not." Garrison
> quoted in John L. Thomas, *The Liberator: William Lloyd Garrison, A Biography*
> (Boston: Little, Brown, 1963), 372-373; see also Kraditor, *Means and Ends in
> American Abolitionism*, 59.]
22,54c34,45
< A far-sighted advocate for the right to vote, Phillips also planted
< himself on the broader democratic principle that the people and "public
< opinion" should rule. In an important 1852 speech entitled "Public
< Opinion," Phillips even declared that "the people never err." He did not
< mean, of course, that every "single verdict which the people of to-day
< may record" was right, as he immediately clarified. But he did believe
< that "the great democratic tendencies of the masses" moved in the
< direction of right, especially over the long run. If, as James Brewer
< Stewart notes in his biography, Phillips was born "an offspring of
< aristocrats," as a man he became a democrat of democrats.[^3]
< 
< [^1]: "Massachusetts Anti-Slavery Society Annual Meeting," *Liberator*,
<     17 February 1865. Phillips made the statement while arguing for
<     voting rights for freedmen in the South.
< 
< [^2]: "Twenty-Ninth Annual Meeting of the Massachusetts Anti-Slavery
<     Society," *Liberator*, 31 January 1862. Phillips's longstanding
<     commitments to the expansion of suffrage are sometimes overlooked
<     because in the 1840s and 1850s Phillips himself, like many
<     Garrisonians, refused to vote under a proslavery Constitution. Yet
<     Phillips's position was much like Garrison, who explained his
<     support for women's right to vote in 1850 by saying that "I want the
<     women to have the right to vote, and I call upon them to demand it
<     perseveringly until they possess it. When they have obtained it, it
<     will be for them to say whether they will exercise it or not."
<     Garrison quoted in John L. Thomas, *The Liberator: William Lloyd
<     Garrison, A Biography* (Boston: Little, Brown, 1963), 372-373; see
<     also Kraditor, *Means and Ends in American Abolitionism*, 59.
< 
< [^3]: Wendell Phillips, "Public Opinion," in *Speeches, Lectures and
<     Letters* (Boston: James Redpath, 1863), 45-46; James Brewer Stewart,
<     *Wendell Phillips: Liberty's Hero* (Baton Rouge: Louisiana State
<     University Press, 1986, 3).
---
> A far-sighted advocate for the right to vote, Phillips also planted himself on
> the broader democratic principle that the people and "public opinion" should
> rule. In an important 1852 speech entitled "Public Opinion," Phillips even
> declared that "the people never err." He did not mean, of course, that every
> "single verdict which the people of to-day may record" was right, as he
> immediately clarified. But he did believe that "the great democratic tendencies
> of the masses" moved in the direction of right, especially over the long run.
> If, as James Brewer Stewart notes in his biography, Phillips was born "an
> offspring of aristocrats," as a man he became a democrat of democrats.^[Wendell
> Phillips, "Public Opinion," in *Speeches, Lectures and Letters* (Boston: James
> Redpath, 1863), 45-46; James Brewer Stewart, *Wendell Phillips: Liberty's Hero*
> (Baton Rouge: Louisiana State University Press, 1986, 3).]

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 12 remaining solutions by signing in and submitting your own entry
#13 Sean Griffin / sgrif - Score: 62 - 08/12/12 @ 21:11
?<0xc3><0xa2><CR>l"b2xNl"a2xqq/[<CR>w*Wd}nca[^[<C-R>1]<Esc>q2@qjdGq<Esc><Esc>gqgg/<0xc3><0xa2><CR>"apn"bpZZ

sgrif: My solution had to account for the double quote being replaced with â and some unicode entries, which caused formatting to get screwed up.

1 comment

#14 Chris Brown / engineercyb - Score: 71 - 07/31/12 @ 19:41
Go<Esc>qq33GdWV}JddG/[^<CR>cW^[<Esc>"1pkJxA<BS><BS>]<Esc>q2@qjddgg4G27lct^"<Esc>gggqG4Gf"PkjlxZZ

engineercyb: My version has a bizarre mistake on line 4. The double quote on the original file is replaced with ”, which screws up all my formatting. My score is 50 without all the nonsense dealing with that.

1 comment

#15 grep -ir malcol\?m / GregMalcolm - Score: 106 - 08/12/12 @ 23:08
33G<GdW4Jd04G$PF^Xlr[34GdW14J0d$20GP<Esc>u$PxXF^Xlr[35GdW4J$d0ud$bbb5JhPF^Xlr[2G$Jf r<CR>gqG$a<Esc>x4G$JWWf r<CR>gqj:wq<CR>

0 comments

Created by: wcaleb

15 active golfers, 51 entries

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

07/30/2012 at 10:33AM

26
#2 - Conner McDaniel / connermcd

07/30/2012 at 06:28PM

26
#3 - John Braxler / braxler

10/10/2014 at 06:54PM

27
#4 - Justin Love / wondible

07/29/2012 at 07:49PM

27
#5 - Kerson Hsiao / KersonHsiao

07/30/2012 at 09:21AM

28
#6 - Marcin Sza / coot_

09/25/2012 at 09:16AM

31
#7 - Catalin Ciurea / catalinciurea

08/12/2012 at 08:25PM

39
#8 - Gary Fixler / gfixler

08/02/2012 at 08:35AM

43
#9 - Andy Nguyen / aqnaqnaqn

08/09/2012 at 05:12PM

48
#10 - Salvador / smastermind

08/16/2012 at 09:34AM

50
#11 - 刘玮 / lwjef

08/16/2012 at 05:27AM

55
#12 - Caleb McDaniel / wcaleb

07/29/2012 at 04:26AM

62
#13 - Sean Griffin / sgrif

08/12/2012 at 09:11PM

71
#14 - Chris Brown / engineercyb

07/31/2012 at 07:41PM

106
#15 - grep -ir malcol\?m / GregMalcolm

08/12/2012 at 11:08PM