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

Winding path - 91 entries

It's a maze, but the bad paths have been blocked off. Mark the correct path.

  • Best score: 27
  • Best player score: 58
  • Number of attempts: 1
attr_aligner - 3106 entries

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

  • Best score: 19
  • Best player score: 33
  • Number of attempts: 3
Two become one - 691 entries

We have two c arrays and want to make one two dimensional out of it. Can we do that?

  • Best score: 25
  • Best player score: 30
  • Number of attempts: 2
Saving the hashes(#) - 1826 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
  • Number of attempts: 2
Change the content of a string - 1260 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 24
  • Number of attempts: 2
Box it - 4894 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 22
  • Number of attempts: 6
Simple, Practical, and Common - 27828 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
  • Number of attempts: 11
NBCU Weekly Challenge - Test - 223 entries

Just testing.

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 2
Letter case trickery - 1451 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: 10
  • Number of attempts: 3
Sort the VimGolf challenges by popularity - 297 entries

"Sort by popularity" is a good order to play the challenges. Not perfect, but you could do a lot worse. ;) Input is a sample copy-pasted from vimgolf.com. Some of the challenge names have digits that will get in your way, so read ":help :sort" for hints on sorting with a regex. When you're done, try your solution on the full list!

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 4
Reverse Simple Deletion - 727 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 1
Gray area - 662 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
Generate a list of numbers - 254 entries

Please generate list of numbers from 1 to 20.

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 2
Don't know what this is - 1822 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 4
Add semicolons - 5703 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 3
Split line with dots - 1943 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 18
  • Number of attempts: 2
I forgot quotes - 13223 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 3
C Reformatting - 654 entries

You may use Visual mode... or not. #uppercase

  • Best score: 30
  • Best player score: 33
  • Number of attempts: 3
SFD-ROC: vimvimvim - 1332 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 9
  • Number of attempts: 2
That hyphen - 2293 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 4
A HAPPY NEW YEAR 2014 ! - 9848 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 5
vim = 22 / 7 - 402 entries

pi square vim

  • Best score: 20
  • Best player score: 20
  • Number of attempts: 2
Shift down - 184 entries

Number words are back.

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 3
-a-b-c- - 2771 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 3
Every other line - 2307 entries

AaAaAaA

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 4
Just the middle - 9896 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 6
A simple change - 366 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
quotes inside quotes - 2881 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
  • Number of attempts: 5
A grid of punctuation - 112 entries

Create a checkerboard of = and - in an 80×24 grid!

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 2
Lisp Condense - 392 entries

Reduce 4 cons selection operations down to one function call.

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 2
Words in parens - 11597 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 3
Condensed Cases - 718 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 2
Test everything! - 112 entries

... and build the desired input data structure. Transform a list of values into a non-trivial format.

  • Best score: 22
  • Best player score: 42
  • Number of attempts: 3
VimGolfNight - 465 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 1
One number per line - 14874 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 7
Count both ways - 903 entries

Right AND down.

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 2
Simple text editing with Vim - 10775 entries

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

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
Marcin Radomski
Twitter:

Programmer. Posts random stuff from all over the Internet.

entered into 37 challenges

contributed 0 challenges