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

Wrap the text of an email message to 79 characters - 799 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #114 / 421
  • Number of attempts: 1
Adam's challenge - 987 entries

Change both normal to bold and 4 by 2. Adam Wathan challenge this on twitter . He did it in 11 keystrokes on Sublime.

  • Best score: 18
  • Best player score: 23
  • Position: #200 / 271
  • Number of attempts: 3
Changing URL path in CSS - 138 entries

What's the quickest way to swap out all the URLs in a CSS file? Is it wasted keystrokes using look-behinds and look-aheads? (I'm sorry for the delete/report--I made a mistake with the last one requiring an ugly search for graphic to replace with images. I just intended this to be a simple search and replace that might possibly generate some macros or normals solutions that are quicker)

  • Best score: 40
  • Best player score: 40
  • Position: #12 / 62
  • Number of attempts: 3
Shuffle and Sort - 229 entries

The values where sorted incorrectly. Get them back to how they are supposed to be

  • Best score: 17
  • Best player score: 19
  • Position: #18 / 67
  • Number of attempts: 5
Vertical Limit - 2552 entries

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

  • Best score: 21
  • Best player score: 22
  • Position: #111 / 757
  • Number of attempts: 2
replacing each line of a block selection - 3001 entries

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

  • Best score: 18
  • Best player score: 18
  • Position: #36 / 778
  • Number of attempts: 7
Switch function arguments - 2142 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Position: #22 / 665
  • Number of attempts: 3
Append semicolon after expressions - 1056 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #9 / 419
  • Number of attempts: 3
Remove semicolons after expressions - 654 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 6
  • Position: #23 / 263
  • Number of attempts: 4
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #722 / 1749
  • Number of attempts: 3
The meaning - 575 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #110 / 363
  • Number of attempts: 1
Sort the cardinal numbers - 315 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 12
  • Position: #27 / 149
  • Number of attempts: 2
Make it more readable - 2009 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Position: #237 / 652
  • Number of attempts: 2
Generate English Alphabets - 487 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 25
  • Position: #116 / 206
  • Number of attempts: 2
Overall Vimgolf Rank - 216 entries

Suppose you are trying to figure out what your overall rank is at Vimgolf(the sum of all the ranks you got), and as a Vim ninja you decided to use Vim to do the job. Your solution should work for every Vimgolf profile page(The actual input file for this challenge is my Vimgolf profile page). So, direct answer insertion is considered cheating.

  • Best score: 21
  • Best player score: 53
  • Position: #55 / 59
  • Number of attempts: 1
Getters & Setters: Java - 211 entries

Boilerplate getters & setters - it's a tedious fact of life in Java, and probably the only thing that still pulls me back to an IDE. Perhaps someone knows a fast, pure vim way...

  • Best score: 89
  • Best player score: 120
  • Position: #32 / 59
  • Number of attempts: 1
Shebangs for all - 2018 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 12
  • Position: #123 / 519
  • Number of attempts: 4
Almost encrypted - 204 entries

Convert the first paragraph to be even less readable.

  • Best score: 5
  • Best player score: 5
  • Position: #87 / 146
  • Number of attempts: 1
Make Fancy Header - 1063 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 16
  • Position: #64 / 346
  • Number of attempts: 3
Reformat most common surnames - 743 entries

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

  • Best score: 23
  • Best player score: 25
  • Position: #55 / 215
  • Number of attempts: 3
Change the content of a string - 1593 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #76 / 594
  • Number of attempts: 6
Sort and add attributes - 1477 entries

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

  • Best score: 33
  • Best player score: 33
  • Position: #107 / 575
  • Number of attempts: 3
Add fold markers to a .c file - 660 entries

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

  • Best score: 30
  • Best player score: 30
  • Position: #21 / 189
  • Number of attempts: 8
Reconstruct the Sentence - 1589 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: #53 / 425
  • Number of attempts: 5
Braces or Brackets? - 1054 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 47
  • Position: #186 / 324
  • Number of attempts: 6
Whitespace, empty lines and tabs - 3744 entries

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

  • Best score: 16
  • Best player score: 24
  • Position: #376 / 804
  • Number of attempts: 3
Simple text editing with Vim - 12996 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #979 / 3739
  • Number of attempts: 7
Reformat/Refactor a Golfer Class - 7157 entries

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

  • Best score: 28
  • Best player score: 36
  • Position: #436 / 1755
  • Number of attempts: 5
mwatkward
Twitter:

entered into 28 challenges

contributed 0 challenges