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

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

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

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

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

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

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

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

  • Best score: 12
  • Best player score: 12
  • Position: #731 / 1643
  • Number of attempts: 3
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: 39
  • Position: #8 / 387
  • Number of attempts: 5
Do you demand a shrubbery? - 1164 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 18
  • Position: #156 / 301
  • Number of attempts: 7
Don't know what this is - 2025 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 / 587
  • Number of attempts: 5
Mess in revision history - 1210 entries

Help Joe clean up what Steve has cobbled.

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

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1611 / 3703
  • Number of attempts: 4
SFD-ROC: vimvimvim - 1620 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 / 450
  • Number of attempts: 7
Vertical Limit - 2610 entries

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

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

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

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

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #339 / 676
  • Number of attempts: 3
Append semicolon after expressions - 1061 entries

Some lines need the semicolon, some don't.

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

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #669 / 1756
  • Number of attempts: 1
remove dupes from array - 1361 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 / 338
  • Number of attempts: 7
Numbering a List - 1941 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 13
  • Position: #83 / 657
  • Number of attempts: 1
Ruby 1.9 hashes - 1277 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 / 413
  • Number of attempts: 4
A Simple One - 1070 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 / 673
  • Number of attempts: 1
The Cake is a Lie - 1389 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #282 / 538
  • Number of attempts: 1
Make Fancy Header - 1079 entries

Make the header text stand out with surrounding asterisks

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

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

  • Best score: 23
  • Best player score: 24
  • Position: #36 / 230
  • Number of attempts: 4
Remember FizzBuzz? - 787 entries

Output FizzBuzz to 100. Start with nothing.

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

This docstring is a complete lie. Fix it.

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

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

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

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

  • Best score: 30
  • Best player score: 34
  • Position: #92 / 197
  • Number of attempts: 3
Reconstruct the Sentence - 1697 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: #153 / 445
  • Number of attempts: 2
Braces or Brackets? - 1140 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: #58 / 349
  • Number of attempts: 4
Whitespace, empty lines and tabs - 3949 entries

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

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

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 27
  • Position: #34 / 369
  • Number of attempts: 7
Simple text editing with Vim - 13419 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 / 3846
  • Number of attempts: 8
Reformat/Refactor a Golfer Class - 7508 entries

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

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

entered into 32 challenges

contributed 0 challenges