Played Challenges
Wrap the text of an email message to 79 characters - 776 entries
You're replying to an email with silly long lines. Clean them up.
- Best score: 5
- Best player score: 5
- Position: #183 / 415
- Number of attempts: 1
Search and Replace 0 - 4994 entries
Replace every instance of 'aaa' with 'xaaax'.
- Best score: 12
- Best player score: 16
- Position: #1164 / 1627
- Number of attempts: 2
Interweave two blocks of text - 659 entries
Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?
- Best score: 15
- Best player score: 17
- Position: #124 / 214
- Number of attempts: 3
Python Hello World! Reformatting - 994 entries
A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.
- Best score: 39
- Best player score: 43
- Position: #163 / 380
- Number of attempts: 1
Swap assigned value - 651 entries
Simple problem but looking for interesting solutions.
- Best score: 10
- Best player score: 12
- Position: #201 / 255
- Number of attempts: 5
VimGolfNight - 560 entries
Based on "The name of the game".
- Best score: 12
- Best player score: 13
- Position: #302 / 347
- Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10672 entries
A HAPPY NEW YEAR 2014 !
- Best score: 11
- Best player score: 11
- Position: #280 / 3685
- Number of attempts: 3
Hanging Indent for Footnotes - 72 entries
Format this footnote (in kramdown syntax) so that it has hanging indent.
- Best score: 17
- Best player score: 21
- Position: #12 / 30
- Number of attempts: 2
Top X - 212 entries
The End File is the Top 10 Vimgolf Leaderboard at June 29, 2013. This is a second version, with a great contribution of @udioica. X is ten in Roman,a numeric system in ancient Rome
- Best score: 18
- Best player score: 24
- Position: #22 / 71
- Number of attempts: 1
Words in parens - 12939 entries
We should all ace this, right?
- Best score: 13
- Best player score: 23
- Position: #3630 / 3964
- Number of attempts: 2
Assign list - 192 entries
Assign list elements to matrix
- Best score: 30
- Best player score: 31
- Position: #6 / 61
- Number of attempts: 5
paste indent correction - JS - 112 entries
You copy some javascript code from a website and paste it into vim, it does not look good!
- Best score: 16
- Best player score: 16
- Position: #22 / 59
- Number of attempts: 3
Delete unwanted lines - 419 entries
Delete all lines which does not end in "o.."
- Best score: 9
- Best player score: 11
- Position: #207 / 230
- Number of attempts: 1
Word frequency alignment - 290 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
- Position: #67 / 161
- Number of attempts: 2
XML to JSON - 47 entries
Convert this xml file into json.
- Best score: 75
- Best player score: 99
- Position: #8 / 20
- Number of attempts: 4
REDRUM - 166 entries
If you remember "The Shinning", the first time you saw the bloody word REDRUM you probably thinked "What the Hell is that?" Well, then you know that you need a little help from a looking-glass to make sense of it. Now it's time to use vim like a mirror to reveal the message.
- Best score: 14
- Best player score: 18
- Position: #42 / 65
- Number of attempts: 3
Enumerate words - 254 entries
Enumerate the unique words in order.
- Best score: 23
- Best player score: 27
- Position: #61 / 91
- Number of attempts: 2
Execute immediate SQL - 90 entries
Sql string tranformation ...
- Best score: 58
- Best player score: 70
- Position: #12 / 32
- Number of attempts: 2
Groups magic - 161 entries
Regexp or macros for string converting: (a) -> ___ (abc) -> ____ (abcd) -> ______ All in the '(' replace to _ multiply by char count + ()
- Best score: 13
- Best player score: 14
- Position: #42 / 94
- Number of attempts: 1
Refactor arguments into object argument - 166 entries
A relatively common Javascript refactoring.
- Best score: 48
- Best player score: 71
- Position: #42 / 68
- Number of attempts: 1
Readable Rubyhash - 267 entries
Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!
- Best score: 23
- Best player score: 30
- Position: #70 / 95
- Number of attempts: 1
Dehamlizing - 185 entries
Change this piece of HAML code back into erb
- Best score: 32
- Best player score: 43
- Position: #46 / 72
- Number of attempts: 1
Checkerboard case pattern - 164 entries
All the squares are white. Make some of them black. But only the right ones.
- Best score: 15
- Best player score: 27
- Position: #59 / 61
- Number of attempts: 1
NATO phonetic alphabet - 529 entries
Transform the series of words into a list.
- Best score: 19
- Best player score: 24
- Position: #154 / 196
- Number of attempts: 3
The Quick Brown Fox Jumps Over The Lazy Vim - 425 entries
Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."
- Best score: 8
- Best player score: 11
- Position: #122 / 193
- Number of attempts: 1
The name of the game - 668 entries
End up with the name of the game.
- Best score: 11
- Best player score: 11
- Position: #110 / 361
- Number of attempts: 1
SFD-ROC: vimvimvim - 1606 entries
Oh no, this line is longer than 80 chars... put each 'vim' on a new line.
- Best score: 8
- Best player score: 15
- Position: #401 / 446
- Number of attempts: 2
Stairs Indenting - 473 entries
Indent each line with <line number> whitespaces.
- Best score: 12
- Best player score: 15
- Position: #146 / 197
- Number of attempts: 3
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: 25
- Position: #148 / 480
- Number of attempts: 6
you're stuck on jQuery < 1.7 - 362 entries
replace calls to jQuery 1.7+'s `on` with calls to pre 1.7 `bind`
- Best score: 25
- Best player score: 29
- Position: #57 / 113
- Number of attempts: 4
Vertical Limit - 2540 entries
transform a succession of one word lines to a an array of strings
- Best score: 21
- Best player score: 28
- Position: #573 / 755
- Number of attempts: 1
replacing each line of a block selection - 3001 entries
replace each line's ../assets/js with /javascripts
- Best score: 18
- Best player score: 32
- Position: #695 / 778
- Number of attempts: 1
Switch function arguments - 2139 entries
How to switch two arguments of a function.
- Best score: 11
- Best player score: 12
- Position: #238 / 663
- Number of attempts: 4
Append semicolon after expressions - 1056 entries
Some lines need the semicolon, some don't.
- Best score: 11
- Best player score: 13
- Position: #311 / 419
- Number of attempts: 1
Reverse and double space - 500 entries
Reverse the order of the given lines and double space everything
- Best score: 14
- Best player score: 19
- Position: #176 / 199
- Number of attempts: 1
Remove noise from HTTP log - 717 entries
This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.
- Best score: 15
- Best player score: 16
- Position: #167 / 273
- Number of attempts: 4
Ugly spreadsheet copy/paste to CSV - 1009 entries
convert an ugly spreadsheet copy/paste into a CSV format.
- Best score: 19
- Best player score: 24
- Position: #75 / 193
- Number of attempts: 6
Replacing some words - 428 entries
How fast could it be?
- Best score: 17
- Best player score: 20
- Position: #63 / 151
- Number of attempts: 2
Make it more readable - 2005 entries
Insert blank lines to make it more organized and readable
- Best score: 13
- Best player score: 19
- Position: #559 / 650
- Number of attempts: 1
Line Zipper - 473 entries
Zip/pair related lines.
- Best score: 12
- Best player score: 16
- Position: #179 / 215
- Number of attempts: 1
remove dupes from array - 1358 entries
given a random string that contains a ruby-esque array, make sure that there are no duplicate elements
- Best score: 17
- Best player score: 27
- Position: #274 / 336
- Number of attempts: 2
PHP <--> Java class conversion Part 2 - 98 entries
Same class but reverse!
- Best score: 79
- Best player score: 106
- Position: #16 / 39
- Number of attempts: 2
PHP Array Syntax -> MailChimp Merge Syntax - 545 entries
I recently needed to send an e-mail to our marketing department listing allowed merge tags for our MailChimp campaigns. The allowed merge tags were determined from a PHP array in one of our PHP classes. I transformed the PHP class to MailChimp's syntax and sent the e-mail. It was, however, a long, laborious process. I'm still fairly new to Vim and would love to see how an expert Vim user would tackle one of my own, real-world problems. Thanks and have fun!
- Best score: 23
- Best player score: 27
- Position: #62 / 150
- Number of attempts: 4
imports alignment (python) - 700 entries
Align as one import per line.
- Best score: 17
- Best player score: 23
- Position: #114 / 198
- Number of attempts: 1
HTML to Haml - 878 entries
Help convert this HTML page to Haml.
- Best score: 23
- Best player score: 30
- Position: #53 / 204
- Number of attempts: 7
Numbering a List - 1932 entries
Pretty simple, number the list.
- Best score: 13
- Best player score: 19
- Position: #244 / 653
- Number of attempts: 7
Ruby 1.9 hashes - 1244 entries
Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!
- Best score: 12
- Best player score: 18
- Position: #343 / 406
- Number of attempts: 2
Assignment Alignment - 883 entries
line up the operators. Use spaces, not tabs.
- Best score: 18
- Best player score: 26
- Position: #126 / 220
- Number of attempts: 1
Shebangs for all - 1999 entries
We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.
- Best score: 11
- Best player score: 16
- Position: #310 / 516
- Number of attempts: 2
Reverse and count - 473 entries
Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.
- Best score: 18
- Best player score: 24
- Position: #74 / 176
- Number of attempts: 3
Ruby 1.9 compat - 629 entries
Remember when Ruby supported `when <expr> :`? Well, it doesn't in 1.9, so let's make sure we use `then`, without ruining our lovely new hash syntax!
- Best score: 14
- Best player score: 21
- Position: #210 / 234
- Number of attempts: 1
Reverse Simple Deletion - 850 entries
You did the simple deletion, now reverse it.
- Best score: 11
- Best player score: 12
- Position: #271 / 459
- Number of attempts: 3
Sorting paragraphs - 534 entries
Order the paragraphs correctly, per prefixed index
- Best score: 18
- Best player score: 38
- Position: #118 / 163
- Number of attempts: 1
Turn this csv list into queries - 252 entries
Transform each line of this csv file into a MySQL-ready INSERT query.
- Best score: 98
- Best player score: 105
- Position: #20 / 101
- Number of attempts: 2
Context insensitive completion 0 - 577 entries
Buried in the lines you're not supposed to add is the line "Add this line!" Add that line to the top of the file.
- Best score: 6
- Best player score: 8
- Position: #140 / 246
- Number of attempts: 3
Context Insensitive completion 1 - 498 entries
Finish writing this simple Python HTTP server.
- Best score: 18
- Best player score: 18
- Position: #105 / 245
- Number of attempts: 1
Make Fancy Header - 1052 entries
Make the header text stand out with surrounding asterisks
- Best score: 15
- Best player score: 22
- Position: #270 / 344
- Number of attempts: 1
Reverse characters in a line - 771 entries
You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.
- Best score: 12
- Best player score: 14
- Position: #99 / 265
- Number of attempts: 1
Get rid of html tags - 405 entries
Want to read more about Vim's background? Then get rid of those html tags...
- Best score: 12
- Best player score: 17
- Position: #94 / 234
- Number of attempts: 3
Change the content of a string - 1588 entries
This docstring is a complete lie. Fix it.
- Best score: 22
- Best player score: 27
- Position: #465 / 592
- Number of attempts: 1
Sort and add attributes - 1461 entries
Sort the states and add the attribute country to each record.
- Best score: 33
- Best player score: 33
- Position: #157 / 568
- Number of attempts: 5
Reconstruct the Sentence - 1526 entries
Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.
- Best score: 19
- Best player score: 20
- Position: #82 / 416
- Number of attempts: 10
Whitespace, empty lines and tabs - 3687 entries
Convert tabs to spaces, strip empty lines and trailing whitespace.
- Best score: 16
- Best player score: 30
- Position: #538 / 793
- Number of attempts: 1
Simple text editing with Vim - 12841 entries
Make the pairs of lines match up by making each second line same as first
- Best score: 13
- Best player score: 15
- Position: #2049 / 3704
- Number of attempts: 3
Reformat/Refactor a Golfer Class - 7016 entries
A simple case of removing unneeded code and fixing broken indentation.
- Best score: 28
- Best player score: 41
- Position: #886 / 1718
- Number of attempts: 1