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

V to the i - 4885 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 8
  • Position: #1508 / 1915
  • Number of attempts: 1
Wrap the text of an email message to 79 characters - 870 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #302 / 452
  • Number of attempts: 1
Extract argument from function - 2429 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #270 / 773
  • Number of attempts: 3
Search and Replace 0 - 5162 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #731 / 1675
  • Number of attempts: 3
Python Hello World! Reformatting - 1052 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: 39
  • Position: #8 / 400
  • Number of attempts: 5
Do you demand a shrubbery? - 1208 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 18
  • Position: #157 / 310
  • Number of attempts: 7
Don't know what this is - 2070 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: 11
  • Position: #136 / 596
  • Number of attempts: 5
Mess in revision history - 1238 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 17
  • Position: #70 / 260
  • Number of attempts: 4
A HAPPY NEW YEAR 2014 ! - 10758 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1611 / 3717
  • Number of attempts: 4
SFD-ROC: vimvimvim - 1642 entries

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

  • Best score: 8
  • Best player score: 8
  • Position: #130 / 457
  • Number of attempts: 7
Vertical Limit - 2637 entries

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

  • Best score: 21
  • Best player score: 21
  • Position: #102 / 778
  • Number of attempts: 3
replacing each line of a block selection - 3068 entries

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

  • Best score: 18
  • Best player score: 18
  • Position: #131 / 789
  • Number of attempts: 5
Switch function arguments - 2229 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #340 / 684
  • Number of attempts: 3
Append semicolon after expressions - 1087 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #144 / 426
  • Number of attempts: 4
switch variable - 5128 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #669 / 1764
  • Number of attempts: 1
remove dupes from array - 1377 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: 17
  • Position: #88 / 341
  • Number of attempts: 7
Numbering a List - 1969 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 13
  • Position: #83 / 661
  • Number of attempts: 1
Ruby 1.9 hashes - 1313 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: 12
  • Position: #111 / 419
  • Number of attempts: 4
A Simple One - 1093 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: #574 / 681
  • Number of attempts: 1
The Cake is a Lie - 1418 entries

Correct the capitalization of each word

  • Best score: 8
  • Best player score: 9
  • Position: #283 / 543
  • Number of attempts: 1
Make Fancy Header - 1109 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 15
  • Position: #2 / 356
  • Number of attempts: 6
Reformat most common surnames - 837 entries

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

  • Best score: 23
  • Best player score: 24
  • Position: #37 / 239
  • Number of attempts: 4
Remember FizzBuzz? - 826 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 39
  • Position: #17 / 210
  • Number of attempts: 7
Change the content of a string - 1803 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #223 / 656
  • Number of attempts: 1
Sort and add attributes - 1598 entries

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

  • Best score: 33
  • Best player score: 33
  • Position: #280 / 617
  • Number of attempts: 3
Add fold markers to a .c file - 739 entries

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

  • Best score: 27
  • Best player score: 34
  • Position: #95 / 203
  • Number of attempts: 3
Reconstruct the Sentence - 1754 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: 20
  • Position: #159 / 458
  • Number of attempts: 2
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: 36
  • Position: #61 / 365
  • Number of attempts: 4
Whitespace, empty lines and tabs - 4054 entries

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

  • Best score: 16
  • Best player score: 16
  • Position: #42 / 866
  • Number of attempts: 10
Flodder-challenge - 1501 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 27
  • Position: #34 / 379
  • Number of attempts: 7
Simple text editing with Vim - 13645 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #713 / 3907
  • Number of attempts: 8
Reformat/Refactor a Golfer Class - 7694 entries

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

  • Best score: 7
  • Best player score: 32
  • Position: #186 / 1893
  • Number of attempts: 9
Petro Mudrievskyj
Github:

entered into 32 challenges

contributed 0 challenges