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 - 148 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 / 57
  • Number of attempts: 5
Search and Replace 0 - 4989 entries

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

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

This cow is too verbose. Give it a lesson.

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

Little role switching.

  • Best score: 12
  • Best player score: 14
  • Position: #894 / 2128
  • Number of attempts: 4
Greek Letters - 64 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 / 25
  • 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 - 560 entries

Based on "The name of the game".

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

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #1653 / 3683
  • Number of attempts: 2
Letter case trickery - 1630 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: #202 / 518
  • Number of attempts: 7
Recursive Cowsay - 64 entries

Convert 'cowsay' statement to recursive output

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

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1241 / 3963
  • Number of attempts: 5
Pairs of numbers - 363 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 / 136
  • Number of attempts: 3
LaTeX to XML Math Delimiters - 48 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 / 20
  • Number of attempts: 3
199 Fibonacci Numbers - 41 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" - 95 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: #9 / 43
  • Number of attempts: 3
Transposition - 99 entries

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

  • Best score: 31
  • Best player score: 41
  • Position: #20 / 32
  • Number of attempts: 4
SFD-ROC: Tic-Tac-Toe - 159 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: #13 / 54
  • Number of attempts: 6
Presidential Sorting - 51 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 / 26
  • Number of attempts: 2
maximun and minimun - 73 entries

Find the maximum and minimum of the rows.

  • Best score: 50
  • Best player score: 69
  • Position: #18 / 26
  • Number of attempts: 4
Saving the hashes(#) - 2063 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 / 480
  • Number of attempts: 11
Enharmonic Equivalents - 59 entries

Transform # and b to digraphs

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

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #243 / 663
  • Number of attempts: 3
Remove semicolons after expressions - 654 entries

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

  • Best score: 6
  • Best player score: 6
  • Position: #67 / 263
  • 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 - 5071 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #761 / 1748
  • Number of attempts: 6
Make it more readable - 2005 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Position: #261 / 650
  • Number of attempts: 1
Here, piggy, piggy... - 80 entries

Youay owknay atwhay otay oday...

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

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

  • Best score: 156
  • Best player score: 196
  • Position: #12 / 49
  • Number of attempts: 4
Getters & Setters: Java - 207 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 / 58
  • Number of attempts: 3
A Simple One - 1050 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 / 664
  • Number of attempts: 1
Letters are numbers - 167 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: #34 / 76
  • Number of attempts: 3
hiding
Twitter:

entered into 31 challenges

contributed 0 challenges