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

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

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

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

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

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

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

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

  • Best score: 7
  • Best player score: 12
  • Position: #732 / 1680
  • Number of attempts: 3
Python Hello World! Reformatting - 1057 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 / 402
  • 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 ! - 10757 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1611 / 3717
  • Number of attempts: 4
SFD-ROC: vimvimvim - 1643 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 / 458
  • Number of attempts: 7
Vertical Limit - 2642 entries

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

  • Best score: 10
  • Best player score: 21
  • Position: #103 / 781
  • Number of attempts: 3
replacing each line of a block selection - 3070 entries

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

  • Best score: 7
  • Best player score: 18
  • Position: #132 / 791
  • Number of attempts: 5
Switch function arguments - 2235 entries

How to switch two arguments of a function.

  • Best score: 7
  • Best player score: 12
  • Position: #340 / 687
  • Number of attempts: 3
Append semicolon after expressions - 1088 entries

Some lines need the semicolon, some don't.

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

how fast can you switch two variable ?

  • Best score: 9
  • Best player score: 11
  • Position: #670 / 1767
  • Number of attempts: 1
remove dupes from array - 1379 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 / 342
  • Number of attempts: 7
Numbering a List - 1970 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 13
  • Position: #83 / 662
  • Number of attempts: 1
Ruby 1.9 hashes - 1315 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 / 421
  • Number of attempts: 4
A Simple One - 1096 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 / 683
  • Number of attempts: 1
The Cake is a Lie - 1422 entries

Correct the capitalization of each word

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

Make the header text stand out with surrounding asterisks

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

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

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

Output FizzBuzz to 100. Start with nothing.

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

This docstring is a complete lie. Fix it.

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

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

  • Best score: 33
  • Best player score: 33
  • Position: #280 / 622
  • Number of attempts: 3
Add fold markers to a .c file - 748 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 / 205
  • Number of attempts: 3
Reconstruct the Sentence - 1763 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: #161 / 461
  • Number of attempts: 2
Braces or Brackets? - 1219 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: #62 / 367
  • Number of attempts: 4
Whitespace, empty lines and tabs - 4083 entries

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

  • Best score: 7
  • Best player score: 16
  • Position: #43 / 872
  • Number of attempts: 10
Flodder-challenge - 1527 entries

Replace the text the most efficient and win!

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

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

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

entered into 32 challenges

contributed 0 challenges