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 - 146 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: #16 / 55
  • Number of attempts: 5
Search and Replace 0 - 4792 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #247 / 1585
  • 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
  • Position: #9 / 28
  • Number of attempts: 7
Vice versa - 7805 entries

Little role switching.

  • Best score: 12
  • Best player score: 14
  • Position: #888 / 2101
  • Number of attempts: 4
Greek Letters - 61 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: #10 / 23
  • Number of attempts: 5
O Christmas Tree - 108 entries

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

  • Best score: 22
  • Best player score: 28
  • Position: #20 / 42
  • Number of attempts: 2
VimGolfNight - 536 entries

Based on "The name of the game".

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

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #1646 / 3667
  • Number of attempts: 2
Letter case trickery - 1594 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: #199 / 511
  • Number of attempts: 7
Recursive Cowsay - 58 entries

Convert 'cowsay' statement to recursive output

  • Best score: 33
  • Best player score: 53
  • Position: #12 / 17
  • Number of attempts: 1
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1233 / 3946
  • Number of attempts: 5
Pairs of numbers - 360 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: #20 / 133
  • Number of attempts: 3
LaTeX to XML Math Delimiters - 40 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: #10 / 18
  • Number of attempts: 3
199 Fibonacci Numbers - 39 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: #7 / 17
  • Number of attempts: 4
Harder than "abcd > a b c d" - 77 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: #7 / 40
  • Number of attempts: 3
Transposition - 82 entries

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

  • Best score: 31
  • Best player score: 41
  • Position: #18 / 30
  • Number of attempts: 4
SFD-ROC: Tic-Tac-Toe - 134 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: #11 / 51
  • Number of attempts: 6
Presidential Sorting - 48 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: #18 / 23
  • Number of attempts: 2
maximun and minimun - 58 entries

Find the maximum and minimum of the rows.

  • Best score: 51
  • Best player score: 69
  • Position: #16 / 24
  • Number of attempts: 4
Saving the hashes(#) - 1992 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 / 473
  • Number of attempts: 11
Enharmonic Equivalents - 56 entries

Transform # and b to digraphs

  • Best score: 18
  • Best player score: 19
  • Position: #22 / 35
  • Number of attempts: 2
Switch function arguments - 2082 entries

How to switch two arguments of a function.

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

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

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

Convert escape sequences to characters

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

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #757 / 1736
  • Number of attempts: 6
Make it more readable - 1952 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Position: #257 / 640
  • Number of attempts: 1
Here, piggy, piggy... - 75 entries

Youay owknay atwhay otay oday...

  • Best score: 68
  • Best player score: 75
  • Position: #6 / 21
  • Number of attempts: 10
Before there was Farmville... - 97 entries

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

  • Best score: 156
  • Best player score: 196
  • Position: #11 / 47
  • Number of attempts: 4
Getters & Setters: Java - 205 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: #22 / 56
  • Number of attempts: 3
A Simple One - 1001 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 / 643
  • Number of attempts: 1
Letters are numbers - 150 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: #32 / 73
  • Number of attempts: 3
hiding
Twitter:

entered into 31 challenges

contributed 0 challenges