### Real Vim ninjas count every keystroke - do you?

###### Pick a challenge, fire up Vim, and show us what you got.

```Your VimGolf key: please sign in

\$ gem install vimgolf
\$ vimgolf setup
\$ vimgolf put [challenge ID]
```

### Played Challenges

##### Just the middle - 11073 entries

Delete the instructions at the top and bottom.

• Best score: 7
• Best player score: 8
• Number of attempts: 3
##### I forgot quotes - 15632 entries

Oops.

• Best score: 10
• Best player score: 15
• Number of attempts: 4
##### Do you demand a shrubbery? - 1079 entries

Use :redir and crush the emacsgolfers.

• Best score: 8
• Best player score: 32
• Number of attempts: 1
##### Shuffle puzzle - 302 entries

Sort the lines in each indent group, and sort the groups. That's the pattern. Or just move lines around manually to get a better score.

• Best score: 13
• Best player score: 14
• Number of attempts: 6
##### Two become one - 692 entries

We have two c arrays and want to make one two dimensional out of it. Can we do that?

• Best score: 25
• Best player score: 31
• Number of attempts: 5
##### Piphilology - 124 entries

Piphilology comprises the creation and use of mnemonic techniques to remember a span of digits of the mathematical constant π. http://en.wikipedia.org/wiki/Piphilology

• Best score: 29
• Best player score: 38
• Number of attempts: 1
##### Mess in revision history - 1117 entries

Help Joe clean up what Steve has cobbled.

• Best score: 17
• Best player score: 23
• Number of attempts: 7
##### Vim tetris - 347 entries

Vim can play tetris too!

• Best score: 21
• Best player score: 23
• Number of attempts: 7
##### Five Pillars - 60 entries

Arrange all words in a table with 5 columns. The minimal space between words in columns is 2 spaces. Columns do have varying width.

• Best score: 41
• Best player score: 69
• Number of attempts: 3
##### Write Setters and Getters for PHP - 86 entries

Just simple automation of writing Setters and Getters like Doctrine might use.

• Best score: 102
• Best player score: 122
• Number of attempts: 5
##### Carriage return - 41 entries

I have some raw data from terminal output which uses carriege return for formatting. Carriage return sets the pointer to the first character on the line, and subsequent characters will overwrite what was there before. The challange is to simulate the terminal behaviour in vim. I'm kind of unsure if I should have skipped lines 9 and 15, since there might be some interesting solutions which are not that generic. Happy Golfing!

• Best score: 22
• Best player score: 22
• Number of attempts: 2
##### A HAPPY NEW YEAR 2014 ! - 10509 entries

A HAPPY NEW YEAR 2014 !

• Best score: 11
• Best player score: 14
• Number of attempts: 1
##### O Christmas Tree - 99 entries

Design a macro that makes trees grow (or ASCII triangles, if that's too hard).

• Best score: 22
• Best player score: 30
• Number of attempts: 1
##### Going underground.... - 303 entries

Simple reformatting: in this case changing from the format London underground supplies its customers with, to the format that Google Calendar likes...

• Best score: 22
• Best player score: 34
• Number of attempts: 3
##### Split the words - 346 entries

Add the spaces manually if you must, but if you use Vim's spell checking feature wisely, I think you'll save a LARGE number of strokes.

• Best score: 18
• Best player score: 36
• Number of attempts: 4
##### attr_aligner - 3347 entries

Two attr keywords. Two separate indentations. Align the colons.

• Best score: 19
• Best player score: 33
• Number of attempts: 1
##### Letter case trickery - 1515 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

• Best score: 9
• Best player score: 11
• Number of attempts: 4
##### quotes inside quotes - 2996 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

• Best score: 3
• Best player score: 16
• Number of attempts: 2
##### Hole-in-one - 963 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

• Best score: 15
• Best player score: 16
• Number of attempts: 5
##### Words in parens - 12676 entries

We should all ace this, right?

• Best score: 13
• Best player score: 14
• Number of attempts: 1
##### Saving the hashes(#) - 1921 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

• Best score: 20
• Best player score: 21
• Number of attempts: 9
##### abcd > a b c d - 249 entries

transform the single spaces into 4 spaces repeat for each line

• Best score: 15
• Best player score: 15
• Number of attempts: 1
##### switch variable - 4863 entries

how fast can you switch two variable ?

• Best score: 11
• Best player score: 12
• Number of attempts: 3
##### Make Fancy Header - 929 entries

Make the header text stand out with surrounding asterisks

• Best score: 16
• Best player score: 16
• Number of attempts: 3
##### Fix the Haiku - 251 entries

Change this slightly scrambled haiku to its unscrambled form and fix the capitalisation and punctuation along the way.

• Best score: 28
• Best player score: 38
• Number of attempts: 4
##### Simple text editing with Vim - 11333 entries

Make the pairs of lines match up by making each second line same as first

• Best score: 13
• Best player score: 14
• Number of attempts: 7
##### Reformat/Refactor a Golfer Class - 5781 entries

A simple case of removing unneeded code and fixing broken indentation.

• Best score: 32
• Best player score: 51
• Number of attempts: 4