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 - 2545 entries

Easy challenge.

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

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

  • Best score: 12
  • Best player score: 16
  • Position: #541 / 908
  • Number of attempts: 1
Array propagate - 346 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 26
  • Position: #62 / 123
  • Number of attempts: 1
Python Hello World! Reformatting - 1015 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: #138 / 390
  • Number of attempts: 2
unknown command - 175 entries

I want change 5 words

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

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

  • Best score: 24
  • Best player score: 73
  • Position: #96 / 100
  • Number of attempts: 1
Groups magic - 163 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #19 / 96
  • Number of attempts: 1
Prefixes and suffixes - 649 entries

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

  • Best score: 17
  • Best player score: 23
  • Position: #68 / 205
  • Number of attempts: 8
Circle of Fifths with Sharps - 119 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: #26 / 39
  • Number of attempts: 5
Exchanging Quotes - 864 entries

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

  • Best score: 30
  • Best player score: 34
  • Position: #89 / 232
  • Number of attempts: 5
Switch function arguments - 2195 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 14
  • Position: #529 / 678
  • Number of attempts: 1
Generate Fibonacci Numbers - 300 entries

Use your super vim powers to generate Fibonacci Numbers.

  • Best score: 19
  • Best player score: 69
  • Position: #105 / 106
  • Number of attempts: 1
Generate English Alphabets - 510 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 47
  • Position: #194 / 213
  • Number of attempts: 1
Ruby 1.9 compat - 643 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: #123 / 238
  • Number of attempts: 2
Make Fancy Header - 1080 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 18
  • Position: #250 / 352
  • Number of attempts: 1
Linear congruential generator - 145 entries

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

  • Best score: 28
  • Best player score: 60
  • Position: #47 / 55
  • Number of attempts: 2
Reformat a C golf submission - 631 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: #129 / 215
  • Number of attempts: 3
Remember FizzBuzz? - 789 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 69
  • Position: #156 / 205
  • Number of attempts: 9
Get rid of html tags - 453 entries

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

  • Best score: 12
  • Best player score: 17
  • Position: #149 / 257
  • Number of attempts: 1
Change the content of a string - 1764 entries

This docstring is a complete lie. Fix it.

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

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

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

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

  • Best score: 30
  • Best player score: 37
  • Position: #141 / 199
  • Number of attempts: 1
Reconstruct the Sentence - 1710 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: #269 / 451
  • Number of attempts: 1
Braces or Brackets? - 1151 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: #91 / 355
  • Number of attempts: 8
Whitespace, empty lines and tabs - 3974 entries

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

  • Best score: 16
  • Best player score: 21
  • Position: #269 / 850
  • Number of attempts: 9
Flodder-challenge - 1466 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 35
  • Position: #179 / 374
  • Number of attempts: 4
Simple text editing with Vim - 13509 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #2411 / 3874
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 7579 entries

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

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

entered into 28 challenges

contributed 0 challenges