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 frequency alignment - 220 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
Chinese Multiplication Table - 50 entries

Print a Chinese multiplication table in Vim. In China, every kid is asked to memorize this table. And thanks to the mono-syllabism of Chinese characters, it is not that hard. Printing the multiplication table is also a good exercise for programming beginners. For-loop, escaped characters, etc... There should be some special ways to print it in Vim.

  • Best score: 39
  • Best player score: 255
  • Number of attempts: 1
Coordinates placeholder - 56 entries

Place coordinates instead of target search.

  • Best score: 22
  • Best player score: 26
  • Number of attempts: 1
Box it - 6800 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 32
  • Number of attempts: 1
NATO phonetic alphabet - 413 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 34
  • Number of attempts: 1
Sort the VimGolf challenges by popularity - 319 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: 21
  • Number of attempts: 2
One number per line - 17271 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 21
  • Number of attempts: 2
Remember FizzBuzz? - 548 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 209
  • Number of attempts: 1
SFD-ROC: The Quick Brown Fox - 145 entries

Someone has vandalized our text (again). Please fix to read: The Quick Brown Fox Jumps Over The Lazy Dog.

  • Best score: 25
  • Best player score: 31
  • Number of attempts: 1
Fiddle percentages into real numbers - 765 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 17
  • Number of attempts: 1
Every other line - 2613 entries

AaAaAaA

  • Best score: 12
  • Best player score: 21
  • Number of attempts: 1
Swap assigned value - 525 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 15
  • Number of attempts: 1
vim = 22 / 7 - 408 entries

pi square vim

  • Best score: 20
  • Best player score: 38
  • Number of attempts: 1
Block Fun 1 - 160 entries

Manipulate the columns to produce desired result.

  • Best score: 14
  • Best player score: 52
  • Number of attempts: 1
Change your calendar - 278 entries

Happy New Year!

  • Best score: 18
  • Best player score: 40
  • Number of attempts: 1
Let's play some Ivmgolf - 975 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 16
  • Number of attempts: 1
The name of the game - 596 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 1
Define to require - 118 entries

When JSHint is enabled, there's a rule that doesn't let you have more than 6 arguments in a function, so the moment you need to add a 7th argument, you need to do a refactoring.

  • Best score: 62
  • Best player score: 104
  • Number of attempts: 1
V to the i - 4462 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 1
Circle in a square - 125 entries

Probably looks more like "Egg in a rectangle" in most fonts, but it's actually 23x23.

  • Best score: 23
  • Best player score: 98
  • Number of attempts: 1
Parsing with CSV: Unify lines and result. - 163 entries

col1;col2;col3;col4 A;1;4;5 A;3;4; A;1;4; # New output: col1;col2;col3;col4 A;1(2x);3;4(3x);5 any ideas?

  • Best score: 21
  • Best player score: 23
  • Number of attempts: 1
Saving the hashes(#) - 1876 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: 45
  • Number of attempts: 1
Enumerate words - 226 entries

Enumerate the unique words in order.

  • Best score: 23
  • Best player score: 28
  • Number of attempts: 1
Just the middle - 10694 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 4
Prefixes and suffixes - 526 entries

Generate all prefixes of "vimchallenge", then all suffixes.

  • Best score: 17
  • Best player score: 32
  • Number of attempts: 3
Whitespace, empty lines and tabs - 2733 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 33
  • Number of attempts: 1
The meaning - 515 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 6
  • Number of attempts: 2
Refactor arguments into object argument - 159 entries

A relatively common Javascript refactoring.

  • Best score: 48
  • Best player score: 99
  • Number of attempts: 1
Simple text editing with Vim - 11150 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
A Simple One - 858 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
Reverse and double space - 424 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 1
A simple change - 377 entries

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

  • Best score: 12
  • Best player score: 28
  • Number of attempts: 1
7th Birthday - 180 entries

We have a bunch of numbers written from 0 to 9 in the order present in the text input file. The task is to create 7 by replacing the numbers with dashes.

  • Best score: 19
  • Best player score: 29
  • Number of attempts: 1
Search and Replace 0 - 4462 entries

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

  • Best score: 12
  • Best player score: 18
  • Number of attempts: 1
abcd > a b c d - 248 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 18
  • Number of attempts: 1
Checkerboard case pattern - 127 entries

All the squares are white. Make some of them black. But only the right ones.

  • Best score: 15
  • Best player score: 30
  • Number of attempts: 2
Minimalist Limerick - 500 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 34
  • Number of attempts: 5
Add semicolons - 8946 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 16
  • Number of attempts: 1
Reconstruct the Sentence - 1038 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 20
  • Best player score: 27
  • Number of attempts: 1
Sort and add attributes - 1113 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 38
  • Number of attempts: 1
I forgot quotes - 14959 entries

Oops.

  • Best score: 10
  • Best player score: 19
  • Number of attempts: 3
lamb had a little Mary - 535 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 51
  • Number of attempts: 2
Fibonacci Triangles - 41 entries

Triangles

  • Best score: 40
  • Best player score: 55
  • Number of attempts: 2
Sort by sum of numbers in a line(?) - 45 entries

The lines with the biggest sums need to be at the top. The sums are on the right, which makes life hard. Maybe you can find a feature that will do all the work for you...

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 1
Extended Customer 2 - 44 entries

Format the chars

  • Best score: 47
  • Best player score: 87
  • 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: 146
  • Number of attempts: 1

Contributed Challenges

Saving the hashes(#) - 1876 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.

7th Birthday - 180 entries

We have a bunch of numbers written from 0 to 9 in the order present in the text input file. The task is to create 7 by replacing the numbers with dashes.

Pradeep Kumar 🇮🇳🇮🇳🇮🇳🇮🇱🇮🇱🇮🇱
Twitter:

To learn संस्कृत, वेद and the art of programming is my only goal. My apologies for poor english.

entered into 46 challenges

contributed 2 challenges