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

Simple, Practical, and Common - 33724 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 25
  • Position: #3238 / 7442
  • Number of attempts: 6
Create Leading Zeros - 241 entries

Create leading zeros only for id columns. Please use generic approach!

  • Best score: 23
  • Best player score: 28
  • Position: #44 / 82
  • Number of attempts: 1
Fiddle percentages into real numbers - 867 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 18
  • Position: #227 / 292
  • Number of attempts: 3
VimGolfNight - 566 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #86 / 348
  • Number of attempts: 1
I forgot quotes - 16022 entries

Oops.

  • Best score: 10
  • Best player score: 19
  • Position: #3416 / 4189
  • Number of attempts: 1
Split the words - 372 entries

Add the spaces manually if you must, but if you use Vim's spell checking feature wisely, I think you'll save a LARGE number of strokes.

  • Best score: 18
  • Best player score: 41
  • Position: #88 / 112
  • Number of attempts: 2
attr_aligner - 3522 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 32
  • Position: #456 / 703
  • Number of attempts: 2
Counting in binary - 526 entries

"a" represents 0; "A" represents 1. Start from zero and count to 15.

  • Best score: 16
  • Best player score: 37
  • Position: #67 / 117
  • Number of attempts: 5
Words in parens - 12967 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 18
  • Position: #2786 / 3969
  • Number of attempts: 2
Pairs of numbers - 363 entries

Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"

  • Best score: 26
  • Best player score: 40
  • Position: #87 / 136
  • Number of attempts: 3
Assign list - 192 entries

Assign list elements to matrix

  • Best score: 30
  • Best player score: 52
  • Position: #43 / 61
  • Number of attempts: 2
Saving the hashes(#) - 2063 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 29
  • Position: #318 / 480
  • Number of attempts: 1
Switch function arguments - 2140 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Position: #381 / 664
  • Number of attempts: 4
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1096 / 1749
  • Number of attempts: 3
Ugly spreadsheet copy/paste to CSV - 1009 entries

convert an ugly spreadsheet copy/paste into a CSV format.

  • Best score: 19
  • Best player score: 32
  • Position: #91 / 193
  • 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: #263 / 652
  • Number of attempts: 4
Simple text editing with Vim - 12989 entries

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

  • Best score: 13
  • Best player score: 17
  • Position: #2418 / 3737
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 7154 entries

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

  • Best score: 28
  • Best player score: 39
  • Position: #729 / 1754
  • Number of attempts: 3
evilmoe ☮
Twitter:

Software Developer and Nerd

entered into 18 challenges

contributed 0 challenges