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

Python Hello World! Reformatting - 808 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
  • Number of attempts: 4
switch variable - 4005 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 15
  • Number of attempts: 1
quotes inside quotes - 2580 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: 2
  • Best player score: 14
  • Number of attempts: 4
Mess in revision history - 899 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 17
  • Number of attempts: 8
Simple text editing with Vim - 9723 entries

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

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 6
The Quick Brown Fox Jumps Over The Lazy Vim - 317 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: 10
  • Best player score: 13
  • Number of attempts: 1
From argument to object - 955 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
  • Number of attempts: 4
Reverse Simple Deletion - 681 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 1
For all cases. - 89 entries

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

  • Best score: 8
  • Best player score: 8
  • Number of attempts: 1
The name of the game - 569 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 1
Make Fancy Header - 869 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 2
Letter case trickery - 1375 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
  • Number of attempts: 1
Readable Rubyhash - 227 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
  • Number of attempts: 1
Simple, Practical, and Common - 19708 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: 13
  • Best player score: 22
  • Number of attempts: 5
A HAPPY NEW YEAR 2014 ! - 8842 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 4
Search and Replace 0 - 3766 entries

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

  • Best score: 12
  • Best player score: 18
  • Number of attempts: 1
Reverse characters in a line - 547 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
  • Number of attempts: 3
Change the content of a string - 1192 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 29
  • Number of attempts: 2
attr_aligner - 2710 entries

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

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 5
Vim tetris - 301 entries

Vim can play tetris too!

  • Best score: 21
  • Best player score: 21
  • Number of attempts: 11
Words in parens - 10118 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 5
A Simple One - 799 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
  • Number of attempts: 1
Reformat a C golf submission - 464 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: 23
  • Best player score: 28
  • Number of attempts: 11
Nick Bakkegaard
Twitter:

entered into 23 challenges

contributed 0 challenges