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

Easy challenge.

  • Best score: 13
  • Best player score: 15
  • Position: #219 / 589
  • Number of attempts: 2
Com(m)a Trouble - 3960 entries

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

  • Best score: 12
  • Best player score: 16
  • Position: #537 / 900
  • Number of attempts: 1
Array propagate - 344 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 26
  • Position: #61 / 122
  • Number of attempts: 1
Python Hello World! Reformatting - 1011 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 / 387
  • Number of attempts: 2
unknown command - 170 entries

I want change 5 words

  • Best score: 7
  • Best player score: 7
  • Position: #73 / 90
  • 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 - 646 entries

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

  • Best score: 17
  • Best player score: 23
  • Position: #68 / 204
  • 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 - 2188 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 14
  • Position: #528 / 676
  • 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 - 509 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 47
  • Position: #194 / 212
  • Number of attempts: 1
Ruby 1.9 compat - 642 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 / 237
  • Number of attempts: 2
Make Fancy Header - 1079 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 18
  • Position: #250 / 351
  • 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 - 629 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 / 214
  • Number of attempts: 3
Remember FizzBuzz? - 786 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 69
  • Position: #156 / 203
  • Number of attempts: 9
Get rid of html tags - 440 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 / 251
  • Number of attempts: 1
Change the content of a string - 1736 entries

This docstring is a complete lie. Fix it.

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

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

  • Best score: 33
  • Best player score: 34
  • Position: #413 / 599
  • Number of attempts: 2
Add fold markers to a .c file - 689 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 / 196
  • Number of attempts: 1
Reconstruct the Sentence - 1690 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: #268 / 444
  • Number of attempts: 1
Braces or Brackets? - 1138 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 / 348
  • Number of attempts: 8
Whitespace, empty lines and tabs - 3927 entries

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

  • Best score: 16
  • Best player score: 21
  • Position: #265 / 838
  • Number of attempts: 9
Flodder-challenge - 1436 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 35
  • Position: #176 / 366
  • Number of attempts: 4
Simple text editing with Vim - 13369 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #2393 / 3834
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 7480 entries

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

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

entered into 28 challenges

contributed 0 challenges