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

maximun and minimun - 44 entries

Find the maximum and minimum of the rows.

  • Best score: 51
  • Best player score: 69
  • Number of attempts: 4
Greek Letters - 39 entries

Starting with a list of Greek letters, create a cross-reference table showing all of the Greek alpha-beta. You'll likely need to use digraphs (:help digraphs). Note that while most digraphs can be entered with either character first, lowercase sigma has two digraphs -- s* AND *s! Good luck!

  • Best score: 34
  • Best player score: 64
  • Number of attempts: 5
Return the cow - 71 entries

This cow is too verbose. Give it a lesson.

  • Best score: 52
  • Best player score: 56
  • Number of attempts: 7
Recursive Cowsay - 49 entries

Convert 'cowsay' statement to recursive output

  • Best score: 33
  • Best player score: 53
  • Number of attempts: 1
VimGolfNight - 451 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
Vice versa - 5630 entries

Little role switching.

  • Best score: 2
  • Best player score: 14
  • Number of attempts: 4
Make it more readable - 1719 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 1
un-C-escape string - 53 entries

Convert escape sequences to characters

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 3
LaTeX to XML Math Delimiters - 35 entries

Vim is amazing when used to edit MediaWiki text, but typing "<math> . . . </math>" can be tiresome and frustrating if formulas are used often. LaTeX delimiters are so concise and even come in two flavors: "\( . . . \)" for inline math and "\[ . . . \]" for centered formulas. The goal is to perform the following conversions: "\( . . . \)" becomes "<math>. . .</math>" "\[ . . . \]" becomes "<center><math>. . .</math></center>"

  • Best score: 63
  • Best player score: 91
  • Number of attempts: 3
A Simple One - 828 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
Words in parens - 10644 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 5
Before there was Farmville... - 90 entries

There was old MacDonald. For my toddler. The first Vim sing-a-long?

  • Best score: 156
  • Best player score: 196
  • Number of attempts: 4
Here, piggy, piggy... - 75 entries

Youay owknay atwhay otay oday...

  • Best score: 68
  • Best player score: 75
  • Number of attempts: 10
Letter case trickery - 1416 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: 11
  • Number of attempts: 7
switch variable - 4189 entries

how fast can you switch two variable ?

  • Best score: 3
  • Best player score: 12
  • Number of attempts: 6
Switch function arguments - 1795 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 9280 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 2
Search and Replace 0 - 3921 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 5
Letters are numbers - 123 entries

Letters and numbers are interchangeable. A lot of programming languages give you simple ways to convert individual letters to hex, binary and decimal but does Vim?

  • Best score: 20
  • Best player score: 26
  • Number of attempts: 3
O Christmas Tree - 99 entries

Design a macro that makes trees grow (or ASCII triangles, if that's too hard).

  • Best score: 22
  • Best player score: 28
  • Number of attempts: 2
Getters & Setters: Java - 141 entries

Boilerplate getters & setters - it's a tedious fact of life in Java, and probably the only thing that still pulls me back to an IDE. Perhaps someone knows a fast, pure vim way...

  • Best score: 89
  • Best player score: 110
  • Number of attempts: 3
Harder than "abcd > a b c d" - 64 entries

Not as easy as the last challenge. This time, just one space between a and b, up to 25 spaces between y and z. (Removed some lines; diff was too long.)

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 3
Remove semicolons after expressions - 441 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 6
  • Number of attempts: 3
Enharmonic Equivalents - 52 entries

Transform # and b to digraphs

  • Best score: 18
  • Best player score: 19
  • Number of attempts: 2
Saving the hashes(#) - 1688 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: 20
  • Number of attempts: 11
Word Blender - 118 entries

The insides of long words seem to have been run through the blender. Can you fix this famous tale, brave knight?

  • Best score: 28
  • Best player score: 34
  • Number of attempts: 5
Transposition - 66 entries

Transpose the original lines in separate columns, one for each line.

  • Best score: 31
  • Best player score: 41
  • Number of attempts: 4
199 Fibonacci Numbers - 35 entries

Generate 199 Fibonacci Numbers using, if you like, the function S(x,y), a vimscript to sum two big numbers in reverse order.

  • Best score: 51
  • Best player score: 63
  • Number of attempts: 4
SFD-ROC: Tic-Tac-Toe - 124 entries

Tic-Tac-Toe You are 'X', and it is your turn. Stop 'O' from winning, and complete the game. Draw a diagonal line through your winning row of three X's.

  • Best score: 25
  • Best player score: 27
  • Number of attempts: 6
Pairs of numbers - 325 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: 27
  • Number of attempts: 3
Presidential Sorting - 45 entries

Given a nice CSV formatted arrangement of the Presidents of the United States, we need to print out an alphabetical list in pretty columns. Prove that vim can conquer this basic Excel task!

  • Best score: 40
  • Best player score: 53
  • Number of attempts: 2
hiding
Twitter:

entered into 31 challenges

contributed 0 challenges