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 - 34021 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: 22
  • Position: #959 / 7517
  • Number of attempts: 5
From argument to object - 1566 entries

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

  • Best score: 17
  • Best player score: 17
  • Position: #27 / 471
  • Number of attempts: 4
Search and Replace 0 - 5162 entries

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

  • Best score: 12
  • Best player score: 18
  • Position: #1369 / 1675
  • Number of attempts: 1
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: 46
  • Position: #316 / 400
  • Number of attempts: 4
For all cases. - 180 entries

In this case... change it! :) Watch the line.

  • Best score: 8
  • Best player score: 8
  • Position: #16 / 111
  • Number of attempts: 1
Vim tetris - 390 entries

Vim can play tetris too!

  • Best score: 21
  • Best player score: 21
  • Position: #12 / 108
  • Number of attempts: 11
Mess in revision history - 1238 entries

Help Joe clean up what Steve has cobbled.

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

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #218 / 3717
  • Number of attempts: 4
attr_aligner - 3568 entries

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

  • Best score: 19
  • Best player score: 19
  • Position: #58 / 711
  • Number of attempts: 5
Letter case trickery - 1688 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 17
  • Position: #475 / 526
  • Number of attempts: 1
quotes inside quotes - 3202 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 14
  • Position: #71 / 1093
  • Number of attempts: 4
Words in parens - 13054 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #92 / 3991
  • Number of attempts: 5
Readable Rubyhash - 285 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: 23
  • Best player score: 27
  • Position: #30 / 98
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 456 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 13
  • Position: #182 / 199
  • Number of attempts: 1
The name of the game - 696 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #74 / 369
  • Number of attempts: 1
switch variable - 5128 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 15
  • Position: #1496 / 1764
  • Number of attempts: 1
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: #293 / 681
  • Number of attempts: 1
Reverse Simple Deletion - 874 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #261 / 466
  • Number of attempts: 1
Make Fancy Header - 1109 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 17
  • Position: #185 / 356
  • Number of attempts: 2
Reformat a C golf submission - 681 entries

Take this C golf submission (for the "tiny but standards-compliant Hello World program" category, naturally), and turn it into formatted C code.

  • Best score: 22
  • Best player score: 28
  • Position: #66 / 222
  • Number of attempts: 11
Reverse characters in a line - 845 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 8
  • Best player score: 18
  • Position: #199 / 283
  • Number of attempts: 3
Change the content of a string - 1803 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 29
  • Position: #572 / 656
  • Number of attempts: 2
Simple text editing with Vim - 13644 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1057 / 3906
  • Number of attempts: 6
Nick Bakkegaard
Twitter:

entered into 23 challenges

contributed 0 challenges