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

Word Blender - 147 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
  • Position: #17 / 56
  • Number of attempts: 5
Search and Replace 0 - 4853 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #247 / 1605
  • Number of attempts: 5
Return the cow - 72 entries

This cow is too verbose. Give it a lesson.

  • Best score: 52
  • Best player score: 56
  • Position: #10 / 29
  • Number of attempts: 7
Vice versa - 7865 entries

Little role switching.

  • Best score: 12
  • Best player score: 14
  • Position: #891 / 2114
  • Number of attempts: 4
Greek Letters - 62 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
  • Position: #11 / 24
  • Number of attempts: 5
O Christmas Tree - 109 entries

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

  • Best score: 22
  • Best player score: 28
  • Position: #21 / 43
  • Number of attempts: 2
VimGolfNight - 538 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #74 / 344
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10652 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #1650 / 3677
  • Number of attempts: 2
Letter case trickery - 1598 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
  • Position: #200 / 514
  • Number of attempts: 7
Recursive Cowsay - 59 entries

Convert 'cowsay' statement to recursive output

  • Best score: 33
  • Best player score: 53
  • Position: #13 / 18
  • Number of attempts: 1
Words in parens - 12868 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1235 / 3950
  • Number of attempts: 5
Pairs of numbers - 361 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
  • Position: #21 / 134
  • Number of attempts: 3
LaTeX to XML Math Delimiters - 41 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
  • Position: #11 / 19
  • Number of attempts: 3
199 Fibonacci Numbers - 40 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
  • Position: #8 / 18
  • Number of attempts: 4
Harder than "abcd > a b c d" - 78 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
  • Position: #8 / 41
  • Number of attempts: 3
Transposition - 83 entries

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

  • Best score: 31
  • Best player score: 41
  • Position: #19 / 31
  • Number of attempts: 4
SFD-ROC: Tic-Tac-Toe - 136 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
  • Position: #12 / 53
  • Number of attempts: 6
Presidential Sorting - 50 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
  • Position: #19 / 25
  • Number of attempts: 2
maximun and minimun - 59 entries

Find the maximum and minimum of the rows.

  • Best score: 50
  • Best player score: 69
  • Position: #17 / 25
  • Number of attempts: 4
Saving the hashes(#) - 2008 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
  • Position: #12 / 476
  • Number of attempts: 11
Enharmonic Equivalents - 57 entries

Transform # and b to digraphs

  • Best score: 18
  • Best player score: 19
  • Position: #23 / 36
  • Number of attempts: 2
Switch function arguments - 2085 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #238 / 653
  • Number of attempts: 3
Remove semicolons after expressions - 639 entries

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

  • Best score: 6
  • Best player score: 6
  • Position: #67 / 261
  • Number of attempts: 3
un-C-escape string - 58 entries

Convert escape sequences to characters

  • Best score: 12
  • Best player score: 12
  • Position: #35 / 52
  • Number of attempts: 3
switch variable - 5045 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #759 / 1742
  • Number of attempts: 6
Make it more readable - 1955 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Position: #258 / 643
  • Number of attempts: 1
Here, piggy, piggy... - 76 entries

Youay owknay atwhay otay oday...

  • Best score: 68
  • Best player score: 75
  • Position: #7 / 22
  • Number of attempts: 10
Before there was Farmville... - 98 entries

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

  • Best score: 156
  • Best player score: 196
  • Position: #12 / 48
  • Number of attempts: 4
Getters & Setters: Java - 206 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
  • Position: #23 / 57
  • Number of attempts: 3
A Simple One - 1009 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: #345 / 648
  • Number of attempts: 1
Letters are numbers - 154 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
  • Position: #33 / 74
  • Number of attempts: 3
hiding
Twitter:

entered into 31 challenges

contributed 0 challenges