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

One number per line - 18831 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 18
  • Position: #1370 / 3889
  • Number of attempts: 5
vim = 22 / 7 - 475 entries

pi square vim

  • Best score: 20
  • Best player score: 33
  • Position: #95 / 135
  • Number of attempts: 1
Wrap the text of an email message to 79 characters - 846 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #124 / 437
  • Number of attempts: 2
Extract argument from function - 2376 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 14
  • Position: #289 / 759
  • Number of attempts: 1
Search and Replace 0 - 5027 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #782 / 1637
  • Number of attempts: 3
Just the middle - 11541 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2278 / 4230
  • Number of attempts: 2
Sierpinski's Triangle - 86 entries

Build the famous fractal, Sierpinski's Triangle.

  • Best score: 25
  • Best player score: 52
  • Position: #22 / 27
  • Number of attempts: 1
Cartesian product - 266 entries

{1,2,3,4,5} X {1,2,3,4,5}

  • Best score: 24
  • Best player score: 32
  • Position: #47 / 99
  • Number of attempts: 1
VimGolfNight - 575 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #62 / 352
  • Number of attempts: 1
Don't know what this is - 2025 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 16
  • Position: #429 / 587
  • Number of attempts: 1
Where should I put the Newline? - 883 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #268 / 438
  • Number of attempts: 1
Mess in revision history - 1210 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 27
  • Position: #155 / 254
  • Number of attempts: 1
Shuffle puzzle - 346 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: 16
  • Position: #74 / 104
  • Number of attempts: 1
Going underground.... - 357 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: 32
  • Position: #89 / 129
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10713 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #1775 / 3700
  • Number of attempts: 1
Counting in binary - 526 entries

"a" represents 0; "A" represents 1. Start from zero and count to 15.

  • Best score: 16
  • Best player score: 33
  • Position: #58 / 117
  • Number of attempts: 1
Words in parens - 12992 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2095 / 3977
  • Number of attempts: 1
Delete unwanted lines - 431 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 10
  • Position: #205 / 234
  • Number of attempts: 1
Dehamlizing - 185 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 38
  • Position: #22 / 72
  • Number of attempts: 3
Shuffle and Sort - 233 entries

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

  • Best score: 17
  • Best player score: 23
  • Position: #31 / 69
  • Number of attempts: 2
SFD-ROC: Tic-Tac-Toe - 159 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: 36
  • Position: #36 / 54
  • Number of attempts: 1
SFD-ROC: The Quick Brown Fox - 202 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: #32 / 108
  • Number of attempts: 1
SFD-ROC: ASCII Logo Border - 90 entries

Draw a border around this familiar logo ;)

  • Best score: 20
  • Best player score: 35
  • Position: #24 / 33
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1620 entries

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

  • Best score: 8
  • Best player score: 9
  • Position: #143 / 450
  • Number of attempts: 3
SFD-ROC: Pipe Dreams - 115 entries

Move the pipes so they match the output.

  • Best score: 12
  • Best player score: 14
  • Position: #13 / 47
  • Number of attempts: 2
Create an alphabet diamond - 105 entries

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

  • Best score: 37
  • Best player score: 56
  • Position: #14 / 32
  • Number of attempts: 2
Vertical Limit - 2596 entries

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

  • Best score: 21
  • Best player score: 25
  • Position: #323 / 767
  • Number of attempts: 1
replacing each line of a block selection - 3007 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 25
  • Position: #532 / 780
  • Number of attempts: 1
Append semicolon after expressions - 1061 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #173 / 421
  • Number of attempts: 1
Remove semicolons after expressions - 663 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 8
  • Position: #186 / 264
  • Number of attempts: 1
switch variable - 5094 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #126 / 1754
  • Number of attempts: 4
Make it more readable - 2009 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Position: #363 / 652
  • Number of attempts: 1
remove dupes from array - 1360 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 33
  • Position: #313 / 337
  • Number of attempts: 1
imports alignment (python) - 700 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 23
  • Position: #109 / 198
  • Number of attempts: 2
Generate Fibonacci Numbers - 294 entries

Use your super vim powers to generate Fibonacci Numbers.

  • Best score: 19
  • Best player score: 24
  • Position: #74 / 104
  • Number of attempts: 1
Numbering a List - 1940 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 22
  • Position: #436 / 656
  • Number of attempts: 1
Ruby 1.9 hashes - 1272 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 12
  • Best player score: 18
  • Position: #342 / 412
  • Number of attempts: 2
Shebangs for all - 2049 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 16
  • Position: #312 / 523
  • Number of attempts: 2
A Simple One - 1067 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: #282 / 671
  • Number of attempts: 1
The Cake is a Lie - 1386 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 11
  • Position: #433 / 537
  • Number of attempts: 1
Make Fancy Header - 1075 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 17
  • Position: #179 / 349
  • Number of attempts: 3
Reformat some Python - 627 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 41
  • Position: #112 / 240
  • Number of attempts: 1
Reformat a C golf submission - 614 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: 33
  • Position: #120 / 210
  • Number of attempts: 1
Reverse characters in a line - 789 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: 13
  • Position: #51 / 269
  • Number of attempts: 1
PEP8 Python Wrapping Comments and Code - 219 entries

According to PEP8, long flowy text and code should have different max line lengths. Code: 79 characters max Long flowy text: 72 characters max

  • Best score: 21
  • Best player score: 33
  • Position: #50 / 69
  • Number of attempts: 1
Reformat most common surnames - 782 entries

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

  • Best score: 23
  • Best player score: 33
  • Position: #143 / 227
  • Number of attempts: 1
Remember FizzBuzz? - 758 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 57
  • Position: #91 / 200
  • Number of attempts: 2
Get rid of html tags - 423 entries

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

  • Best score: 12
  • Best player score: 26
  • Position: #224 / 245
  • Number of attempts: 2
Change the content of a string - 1707 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 27
  • Position: #484 / 628
  • Number of attempts: 1
Deleting folded text - 388 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: #59 / 122
  • Number of attempts: 2
Sort and add attributes - 1539 entries

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

  • Best score: 33
  • Best player score: 33
  • Position: #113 / 594
  • Number of attempts: 2
Add fold markers to a .c file - 683 entries

Fold markers can make it easier to navigate source code. Add them to this .c file.

  • Best score: 30
  • Best player score: 31
  • Position: #50 / 194
  • Number of attempts: 3
Reconstruct the Sentence - 1677 entries

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

  • Best score: 19
  • Best player score: 21
  • Position: #210 / 440
  • Number of attempts: 3
Braces or Brackets? - 1096 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: #108 / 339
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3852 entries

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

  • Best score: 16
  • Best player score: 22
  • Position: #308 / 829
  • Number of attempts: 6
Flodder-challenge - 1401 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 37
  • Position: #206 / 358
  • Number of attempts: 1
Simple text editing with Vim - 13262 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1006 / 3810
  • Number of attempts: 4
Reformat/Refactor a Golfer Class - 7389 entries

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

  • Best score: 7
  • Best player score: 35
  • Position: #354 / 1825
  • Number of attempts: 5
vansan
Twitter:

entered into 58 challenges

contributed 0 challenges