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

Easy challenge.

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

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

  • Best score: 12
  • Best player score: 16
  • Position: #542 / 909
  • 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 - 1022 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: #139 / 391
  • 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 - 274 entries

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

  • Best score: 24
  • Best player score: 73
  • Position: #97 / 101
  • Number of attempts: 1
Groups magic - 168 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 / 98
  • Number of attempts: 1
Prefixes and suffixes - 664 entries

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

  • Best score: 17
  • Best player score: 23
  • Position: #69 / 206
  • 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 - 877 entries

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

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

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 14
  • Position: #532 / 681
  • Number of attempts: 1
Generate Fibonacci Numbers - 317 entries

Use your super vim powers to generate Fibonacci Numbers.

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

Start with a, get up to z.

  • Best score: 19
  • Best player score: 47
  • Position: #195 / 214
  • Number of attempts: 1
Ruby 1.9 compat - 652 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: #124 / 239
  • Number of attempts: 2
Make Fancy Header - 1089 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 18
  • Position: #252 / 354
  • Number of attempts: 1
Linear congruential generator - 149 entries

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

  • Best score: 28
  • Best player score: 60
  • Position: #48 / 56
  • Number of attempts: 2
Reformat a C golf submission - 644 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: #130 / 216
  • Number of attempts: 3
Remember FizzBuzz? - 802 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 69
  • Position: #157 / 206
  • Number of attempts: 9
Get rid of html tags - 460 entries

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

  • Best score: 12
  • Best player score: 17
  • Position: #151 / 260
  • Number of attempts: 1
Change the content of a string - 1779 entries

This docstring is a complete lie. Fix it.

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

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

  • Best score: 33
  • Best player score: 34
  • Position: #419 / 611
  • Number of attempts: 2
Add fold markers to a .c file - 721 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: #143 / 201
  • Number of attempts: 1
Reconstruct the Sentence - 1733 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: #273 / 455
  • Number of attempts: 1
Braces or Brackets? - 1184 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: #93 / 358
  • Number of attempts: 8
Whitespace, empty lines and tabs - 4025 entries

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

  • Best score: 16
  • Best player score: 21
  • Position: #273 / 857
  • Number of attempts: 9
Flodder-challenge - 1490 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 35
  • Position: #183 / 377
  • Number of attempts: 4
Simple text editing with Vim - 13576 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #2425 / 3892
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 7649 entries

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

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

entered into 28 challenges

contributed 0 challenges