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

Swap values inside brackets - 2551 entries

Easy challenge.

  • Best score: 13
  • Best player score: 15
  • Position: #221 / 594
  • Number of attempts: 2
Com(m)a Trouble - 3993 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 16
  • Position: #542 / 910
  • Number of attempts: 1
Array propagate - 354 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 26
  • Position: #63 / 125
  • Number of attempts: 1
Python Hello World! Reformatting - 1057 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: 42
  • Position: #142 / 402
  • Number of attempts: 2
unknown command - 176 entries

I want change 5 words

  • Best score: 7
  • Best player score: 7
  • Position: #73 / 92
  • Number of attempts: 1
Cartesian product - 277 entries

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

  • Best score: 24
  • Best player score: 73
  • Position: #97 / 102
  • Number of attempts: 1
Groups magic - 175 entries

Regexp or macros for string converting: (a) -> ___ (abc) -> ____ (abcd) -> ______ All in the '(' replace to _ multiply by char count + ()

  • Best score: 12
  • Best player score: 13
  • Position: #20 / 102
  • Number of attempts: 1
Prefixes and suffixes - 669 entries

Generate all prefixes of "vimchallenge", then all suffixes.

  • Best score: 17
  • Best player score: 23
  • Position: #70 / 208
  • Number of attempts: 8
Circle of Fifths with Sharps - 133 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: 31
  • Position: #27 / 40
  • Number of attempts: 5
Exchanging Quotes - 878 entries

Sometimes you need to exchange a choice of quotes in some code.

  • Best score: 30
  • Best player score: 34
  • Position: #90 / 234
  • Number of attempts: 5
Switch function arguments - 2237 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 14
  • Position: #537 / 687
  • Number of attempts: 1
Generate Fibonacci Numbers - 334 entries

Use your super vim powers to generate Fibonacci Numbers.

  • Best score: 19
  • Best player score: 69
  • Position: #107 / 108
  • Number of attempts: 1
Generate English Alphabets - 540 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 47
  • Position: #197 / 216
  • Number of attempts: 1
Ruby 1.9 compat - 668 entries

Remember when Ruby supported `when <expr> :`? Well, it doesn't in 1.9, so let's make sure we use `then`, without ruining our lovely new hash syntax!

  • Best score: 14
  • Best player score: 15
  • Position: #125 / 243
  • Number of attempts: 2
Make Fancy Header - 1111 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 18
  • Position: #255 / 357
  • Number of attempts: 1
Linear congruential generator - 157 entries

http://en.wikipedia.org/wiki/Linear_congruential_generator

  • Best score: 28
  • Best player score: 60
  • Position: #48 / 57
  • Number of attempts: 2
Reformat a C golf submission - 681 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: #133 / 222
  • Number of attempts: 3
Remember FizzBuzz? - 829 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 69
  • Position: #160 / 212
  • Number of attempts: 9
Get rid of html tags - 465 entries

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

  • Best score: 12
  • Best player score: 17
  • Position: #152 / 262
  • Number of attempts: 1
Change the content of a string - 1807 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #261 / 658
  • Number of attempts: 5
Sort and add attributes - 1601 entries

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

  • Best score: 33
  • Best player score: 34
  • Position: #424 / 619
  • Number of attempts: 2
Add fold markers to a .c file - 740 entries

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

  • Best score: 27
  • Best player score: 37
  • Position: #144 / 204
  • Number of attempts: 1
Reconstruct the Sentence - 1757 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: #276 / 459
  • Number of attempts: 1
Braces or Brackets? - 1209 entries

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

  • Best score: 34
  • Best player score: 39
  • Position: #95 / 365
  • Number of attempts: 8
Whitespace, empty lines and tabs - 4070 entries

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

  • Best score: 16
  • Best player score: 21
  • Position: #276 / 868
  • Number of attempts: 9
Flodder-challenge - 1508 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 35
  • Position: #184 / 380
  • Number of attempts: 4
Simple text editing with Vim - 13667 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #2438 / 3914
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 7722 entries

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

  • Best score: 7
  • Best player score: 38
  • Position: #723 / 1896
  • Number of attempts: 11
0xf00ff00f
Github:

entered into 28 challenges

contributed 0 challenges