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 - 32904 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 / 7270
  • Number of attempts: 5
From argument to object - 1262 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 / 417
  • Number of attempts: 4
Search and Replace 0 - 4651 entries

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

  • Best score: 12
  • Best player score: 18
  • Position: #1252 / 1541
  • Number of attempts: 1
Python Hello World! Reformatting - 897 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: #280 / 350
  • Number of attempts: 4
For all cases. - 127 entries

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

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

Vim can play tetris too!

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

Help Joe clean up what Steve has cobbled.

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

A HAPPY NEW YEAR 2014 !

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

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

  • Best score: 19
  • Best player score: 19
  • Position: #58 / 685
  • Number of attempts: 5
Letter case trickery - 1547 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: #449 / 498
  • Number of attempts: 1
quotes inside quotes - 3026 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 / 1044
  • Number of attempts: 4
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #67 / 3919
  • Number of attempts: 5
Readable Rubyhash - 239 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: #26 / 88
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 388 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: #165 / 180
  • Number of attempts: 1
The name of the game - 627 entries

End up with the name of the game.

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

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 15
  • Position: #1448 / 1701
  • Number of attempts: 1
A Simple One - 916 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 / 610
  • Number of attempts: 1
Reverse Simple Deletion - 758 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #247 / 429
  • Number of attempts: 1
Make Fancy Header - 963 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 17
  • Position: #171 / 326
  • Number of attempts: 2
Reformat a C golf submission - 522 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: #54 / 193
  • Number of attempts: 11
Reverse characters in a line - 645 entries

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

  • Best score: 12
  • Best player score: 18
  • Position: #168 / 236
  • Number of attempts: 3
Change the content of a string - 1346 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 29
  • Position: #462 / 520
  • Number of attempts: 2
Simple text editing with Vim - 11624 entries

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

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

entered into 23 challenges

contributed 0 challenges