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 [challenge ID]

Played Challenges

Wrap the text of an email message to 79 characters - 676 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Position: #127 / 384
  • Number of attempts: 1
Search and Replace 0 - 4790 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 12
  • Position: #168 / 1585
  • Number of attempts: 2
Python Hello World! Reformatting - 936 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 43
  • Position: #149 / 363
  • Number of attempts: 2
Circle of Fifths with Sharps - 93 entries

Display a list of the Circle of Fifths with corresponding solfege syllables with sharps. Handling spaces may be tricky.

  • Best score: 24
  • Best player score: 24
  • Position: #2 / 35
  • Number of attempts: 1
NATO phonetic alphabet - 498 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 21
  • Position: #63 / 189
  • Number of attempts: 2
Shuffle and Sort - 208 entries

The values where sorted incorrectly. Get them back to how they are supposed to be

  • Best score: 17
  • Best player score: 22
  • Position: #26 / 65
  • Number of attempts: 1
SFD-ROC: Tic-Tac-Toe - 132 entries

Tic-Tac-Toe You are 'X', and it is your turn. Stop 'O' from winning, and complete the game. Draw a diagonal line through your winning row of three X's.

  • Best score: 25
  • Best player score: 31
  • Position: #16 / 50
  • Number of attempts: 1
SFD-ROC: The Quick Brown Fox - 168 entries

Someone has vandalized our text (again). Please fix to read: The Quick Brown Fox Jumps Over The Lazy Dog.

  • Best score: 24
  • Best player score: 28
  • Position: #26 / 100
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 400 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 10
  • Position: #23 / 187
  • Number of attempts: 1
The name of the game - 646 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #13 / 354
  • Number of attempts: 1
Complete the circuit grid! - 81 entries

Continuing from the last challenge, add additional rows to the grid. Change each of the names from 'A1'...'A10' to 'B1'...'B10', 'C1'...'C10', etc, and for each new row add 0.7 to the X values in the (X Y) at the end of each line.

  • Best score: 49
  • Best player score: 73
  • Position: #18 / 28
  • Number of attempts: 2
SFD-ROC: ASCII Logo Border - 70 entries

Draw a border around this familiar logo ;)

  • Best score: 20
  • Best player score: 21
  • Position: #7 / 30
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1569 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 14
  • Position: #311 / 437
  • Number of attempts: 1
SFD-ROC: Pipe Dreams - 99 entries

Move the pipes so they match the output.

  • Best score: 12
  • Best player score: 13
  • Position: #9 / 44
  • Number of attempts: 2
Python to Ruby - 195 entries

Convert this Python code to Ruby. NOTE: This program likely won't run.

  • Best score: 24
  • Best player score: 34
  • Position: #34 / 58
  • Number of attempts: 1
Cleanining up 80 column concatenated text - 188 entries

1. Put the whole query on one line, remove the concatenation operators 2. Remove the double spaces that appear a few times in the query 3. Use string-interpolated variable statementPid rather than the ugly concatenation

  • Best score: 31
  • Best player score: 44
  • Position: #43 / 76
  • Number of attempts: 2
SFD-ROC: ROT13 Phonics - 96 entries

A is for apple, b is for ball, etc... This familiar phonics poem has been rotated 13 characters. Make the letter match the word.

  • Best score: 6
  • Best player score: 6
  • Position: #7 / 70
  • Number of attempts: 1
Create an alphabet diamond - 79 entries

Here's a brain teaser to keep things interesting...

  • Best score: 40
  • Best player score: 54
  • Position: #10 / 30
  • Number of attempts: 2
you're stuck on jQuery < 1.7 - 335 entries

replace calls to jQuery 1.7+'s `on` with calls to pre 1.7 `bind`

  • Best score: 25
  • Best player score: 26
  • Position: #16 / 110
  • Number of attempts: 2
Inconsistent real estate paste - 184 entries

Format a hand-typed real estate listing that uses inconsistent punctuation into four sections

  • Best score: 24
  • Best player score: 34
  • Position: #27 / 55
  • Number of attempts: 1
Vertical Limit - 2436 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 23
  • Position: #195 / 735
  • Number of attempts: 4
Make the circuit grid! - 85 entries

Copy this command for a circuit layout program to create 10 total smd commands. Increment the number in quotes to name each pad, and add 0.7 to each of the (X Y) coordinates at the end of each line.

  • Best score: 26
  • Best player score: 26
  • Position: #15 / 48
  • Number of attempts: 1
Aligning function arguments to match a specific coding style - 220 entries

Most projects have specific coding style guidelines. In this case, the argument list must be broken into a new line for each argument, with the argument names right aligned, taking into account pointers.

  • Best score: 16
  • Best player score: 18
  • Position: #35 / 67
  • Number of attempts: 1
Switch function arguments - 2064 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Position: #344 / 647
  • Number of attempts: 2
Remove noise from HTTP log - 693 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 16
  • Position: #159 / 270
  • Number of attempts: 1
Happy New Year! - 143 entries

This is a simple new year's challenge.

  • Best score: 22
  • Best player score: 28
  • Position: #39 / 57
  • Number of attempts: 1
Generate English Alphabets - 463 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 25
  • Position: #119 / 198
  • Number of attempts: 1
Solve the Sokoban - 161 entries

A wink for all Vimgolfers that play Nethack too.

  • Best score: 25
  • Best player score: 27
  • Position: #10 / 71
  • Number of attempts: 1
A Simple One - 996 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #284 / 641
  • Number of attempts: 1
Another Mixed-Up Haiku - 237 entries

VimGolf ... a perfect evening?

  • Best score: 21
  • Best player score: 24
  • Position: #50 / 85
  • Number of attempts: 3
Reverse Simple Deletion - 832 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #240 / 454
  • Number of attempts: 1
The Cake is a Lie - 1284 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #126 / 511
  • Number of attempts: 1
Fix the Haiku - 275 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: 37
  • Position: #32 / 109
  • Number of attempts: 3
Compile C - 365 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 21
  • Position: #61 / 132
  • Number of attempts: 1
Almost encrypted - 198 entries

Convert the first paragraph to be even less readable.

  • Best score: 5
  • Best player score: 5
  • Position: #89 / 144
  • Number of attempts: 1
Reformat some Python - 579 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 35
  • Position: #50 / 229
  • Number of attempts: 2
Reformat a C golf submission - 552 entries

Take this C golf submission (for the "tiny but standards-compliant Hello World program" category, naturally), and turn it into formatted C code.

  • Best score: 22
  • Best player score: 25
  • Position: #11 / 199
  • Number of attempts: 3
Reverse characters in a line - 709 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 12
  • Best player score: 15
  • Position: #123 / 249
  • Number of attempts: 2
Reformat most common surnames - 644 entries

Reformat copy-pasted table into a list of the most common surnames

  • Best score: 23
  • Best player score: 27
  • Position: #79 / 197
  • Number of attempts: 1
Remember FizzBuzz? - 653 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 62
  • Position: #114 / 177
  • Number of attempts: 1
Get rid of html tags - 368 entries

Want to read more about Vim's background? Then get rid of those html tags...

  • Best score: 15
  • Best player score: 17
  • Position: #65 / 217
  • Number of attempts: 1
Change the content of a string - 1457 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #80 / 552
  • Number of attempts: 3
Deleting folded text - 338 entries

The text below contains three folds. Delete them (and the text inside them). For example: 123 456 /*{{{*/ 789 /*}}}*/ 012 Should become: 123 012 Also, add `aoeuaoeu` to make sure small solutions don't get flagged as cheating.

  • Best score: 17
  • Best player score: 20
  • Position: #54 / 113
  • Number of attempts: 1
Sort and add attributes - 1321 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 34
  • Position: #309 / 527
  • Number of attempts: 1
Reconstruct the Sentence - 1348 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 20
  • Best player score: 21
  • Position: #183 / 379
  • Number of attempts: 1
Braces or Brackets? - 870 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 41
  • Position: #92 / 284
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3290 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 20
  • Position: #191 / 729
  • Number of attempts: 3
Simple text editing with Vim - 12233 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #958 / 3567
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 6512 entries

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

  • Best score: 32
  • Best player score: 40
  • Position: #761 / 1603
  • Number of attempts: 1
tmr
Twitter:

entered into 49 challenges

contributed 0 challenges