Played Challenges
Search and Replace 0 - 4766 entries
Replace every instance of 'aaa' with 'xaaax'.
- Best score: 12
- Best player score: 12
- Position: #152 / 1578
- Number of attempts: 2
Sierpinski's Triangle - 82 entries
Build the famous fractal, Sierpinski's Triangle.
- Best score: 25
- Best player score: 36
- Position: #18 / 24
- Number of attempts: 1
Swap assigned value - 593 entries
Simple problem but looking for interesting solutions.
- Best score: 10
- Best player score: 11
- Position: #120 / 242
- Number of attempts: 2
REDRUM - 149 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: 15
- Position: #24 / 61
- Number of attempts: 3
Groups magic - 146 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: #31 / 88
- Number of attempts: 2
Sort by your own sum - 69 entries
Same numbers as last time, but you'll have to add them yourself.
- Best score: 25
- Best player score: 32
- Position: #7 / 27
- Number of attempts: 1
Sort by sum of numbers in a line(?) - 55 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
- Position: #18 / 35
- Number of attempts: 1
Readable Rubyhash - 243 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: 25
- Position: #13 / 91
- Number of attempts: 3
Dehamlizing - 177 entries
Change this piece of HAML code back into erb
- Best score: 32
- Best player score: 45
- Position: #54 / 68
- Number of attempts: 1
Changing URL path in CSS - 123 entries
What's the quickest way to swap out all the URLs in a CSS file? Is it wasted keystrokes using look-behinds and look-aheads? (I'm sorry for the delete/report--I made a mistake with the last one requiring an ugly search for graphic to replace with images. I just intended this to be a simple search and replace that might possibly generate some macros or normals solutions that are quicker)
- Best score: 40
- Best player score: 45
- Position: #33 / 57
- Number of attempts: 1
Checkerboard case pattern - 144 entries
All the squares are white. Make some of them black. But only the right ones.
- Best score: 15
- Best player score: 17
- Position: #20 / 57
- Number of attempts: 3
NATO phonetic alphabet - 498 entries
Transform the series of words into a list.
- Best score: 19
- Best player score: 24
- Position: #141 / 189
- Number of attempts: 1
Shuffle and Sort - 201 entries
The values where sorted incorrectly. Get them back to how they are supposed to be
- Best score: 17
- Best player score: 27
- Position: #44 / 63
- Number of attempts: 1
Printable ASCII characters - 120 entries
From a blank input, print all 95 printing ASCII characters one per line, from space to tilde.
- Best score: 22
- Best player score: 36
- Position: #22 / 40
- Number of attempts: 1
A simple change - 434 entries
Just change the numbers in the most efficient way ...
- Best score: 12
- Best player score: 14
- Position: #61 / 187
- Number of attempts: 1
Extract text from xml - 106 entries
Extract text from xml file (ignoring commented out elements) and create a one line regex.
- Best score: 28
- Best player score: 35
- Position: #13 / 43
- Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 398 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: 10
- Position: #29 / 186
- Number of attempts: 2
The name of the game - 643 entries
End up with the name of the game.
- Best score: 11
- Best player score: 11
- Position: #21 / 353
- Number of attempts: 1
Chucking wood - 103 entries
An exercise in compressing repetitive text. For this challenge, any entry that uses keys outside the main row (such as arrow keys, Home, End, Delete, etc.) will be removed. (Esc is OK, though you should be using C-[ anyway.)
- Best score: 51
- Best player score: 54
- Position: #11 / 45
- Number of attempts: 2
Stairs Indenting - 442 entries
Indent each line with <line number> whitespaces.
- Best score: 12
- Best player score: 13
- Position: #26 / 191
- Number of attempts: 4
Unwrap the text of an email message - 182 entries
Reverse of "Wrap the text of an email message to 79 characters". gq and gw are great for wrapping paragraphs. But sometimes other programs choke on your wrapped lines. What's the best way to un-gq?
- Best score: 16
- Best player score: 24
- Position: #40 / 72
- Number of attempts: 1
Flip the chessboard - 77 entries
White's turn is over. Flip the board to black's perspective. I added coordinates to frustrate you.
- Best score: 18
- Best player score: 21
- Position: #10 / 29
- Number of attempts: 2
Make the circuit grid! - 83 entries
Copy this command for a circuit layout program to create 10 total smd commands. Increment the number in quotes to name each pad, and add 0.7 to each of the (X Y) coordinates at the end of each line.
- Best score: 26
- Best player score: 29
- Position: #36 / 46
- Number of attempts: 1
Exchanging Quotes - 801 entries
Sometimes you need to exchange a choice of quotes in some code.
- Best score: 30
- Best player score: 32
- Position: #56 / 221
- Number of attempts: 4
replacing each line of a block selection - 2901 entries
replace each line's ../assets/js with /javascripts
- Best score: 18
- Best player score: 21
- Position: #293 / 759
- Number of attempts: 2
Switch function arguments - 2019 entries
How to switch two arguments of a function.
- Best score: 11
- Best player score: 12
- Position: #202 / 637
- Number of attempts: 3
Append semicolon after expressions - 986 entries
Some lines need the semicolon, some don't.
- Best score: 11
- Best player score: 11
- Position: #12 / 397
- Number of attempts: 1
Reverse and double space - 475 entries
Reverse the order of the given lines and double space everything
- Best score: 14
- Best player score: 14
- Position: #24 / 191
- Number of attempts: 2
Remove noise from HTTP log - 675 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: #150 / 266
- Number of attempts: 1
Remove semicolons after expressions - 602 entries
A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.
- Best score: 6
- Best player score: 8
- Position: #167 / 253
- Number of attempts: 1
switch variable - 5012 entries
how fast can you switch two variable ?
- Best score: 11
- Best player score: 11
- Position: #13 / 1728
- Number of attempts: 2
Ugly spreadsheet copy/paste to CSV - 953 entries
convert an ugly spreadsheet copy/paste into a CSV format.
- Best score: 19
- Best player score: 35
- Position: #101 / 184
- Number of attempts: 2
Replacing some words - 418 entries
How fast could it be?
- Best score: 17
- Best player score: 21
- Position: #66 / 147
- Number of attempts: 1
Sort the cardinal numbers - 284 entries
Maybe a simple challenge.
- Best score: 12
- Best player score: 12
- Position: #19 / 143
- Number of attempts: 2
formatted text to markdown - 181 entries
You're converting some posts from an old blog to markdown. The formatted text is far closer to the finished product than the html markup, so it seems like a good place to start. Word wrapping seems to be the main area for optimization.
- Best score: 70
- Best player score: 79
- Position: #39 / 66
- Number of attempts: 2
Make it more readable - 1930 entries
Insert blank lines to make it more organized and readable
- Best score: 13
- Best player score: 16
- Position: #317 / 636
- Number of attempts: 2
Line Zipper - 449 entries
Zip/pair related lines.
- Best score: 12
- Best player score: 16
- Position: #150 / 209
- Number of attempts: 1
remove dupes from array - 1324 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: 18
- Position: #88 / 328
- Number of attempts: 5
Alphabetize the directory - 281 entries
Put the contacts and their information in alphabetical order.
- Best score: 30
- Best player score: 32
- Position: #33 / 98
- Number of attempts: 3
PHP Array Syntax -> MailChimp Merge Syntax - 505 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: 24
- Position: #31 / 146
- Number of attempts: 2
Sort entries based on date - 359 entries
Sort some entries in a Ledger-file based on date.
- Best score: 11
- Best player score: 12
- Position: #51 / 113
- Number of attempts: 1
Refactor to Helpers - 45 entries
This Rails partial is almost all template escapes. Put it into a helper, and refactor each case to methods so we can build out the controls for each. (I've converted to tabs - fighting with Vimgolf's default config shouldn't be part of the challenge.)
- Best score: 147
- Best player score: 286
- Position: #11 / 22
- Number of attempts: 1
imports alignment (python) - 657 entries
Align as one import per line.
- Best score: 17
- Best player score: 20
- Position: #83 / 194
- Number of attempts: 4
HTML to Haml - 838 entries
Help convert this HTML page to Haml.
- Best score: 23
- Best player score: 33
- Position: #82 / 201
- Number of attempts: 2
Reformat long lines - 336 entries
Rearrange this ruby method call to put each parameter on its own line. Could become a useful macro.
- Best score: 15
- Best player score: 17
- Position: #63 / 130
- Number of attempts: 4
Ruby 1.9 hashes - 1202 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: 14
- Position: #208 / 394
- Number of attempts: 4
Assignment Alignment - 824 entries
line up the operators. Use spaces, not tabs.
- Best score: 18
- Best player score: 18
- Position: #23 / 215
- Number of attempts: 5
Shebangs for all - 1846 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: 12
- Position: #118 / 486
- Number of attempts: 2
82 bottles of beer on the wall - 296 entries
Take them down. (sorry, only 82 bottles because the problem size is limited!)
- Best score: 107
- Best player score: 121
- Position: #41 / 138
- Number of attempts: 2
Table Reshuffle - 366 entries
Fix the column order in this table... also append the new 'username' column.
- Best score: 22
- Best player score: 29
- Position: #59 / 132
- Number of attempts: 3
Reverse and count - 432 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: 22
- Position: #34 / 168
- Number of attempts: 5
Ruby 1.9 compat - 608 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: 14
- Position: #27 / 229
- Number of attempts: 2
Reverse Simple Deletion - 824 entries
You did the simple deletion, now reverse it.
- Best score: 11
- Best player score: 12
- Position: #218 / 450
- Number of attempts: 1
Increment, increment, increment.... - 626 entries
Vim likes macros
- Best score: 10
- Best player score: 12
- Position: #207 / 393
- Number of attempts: 1
The Cake is a Lie - 1266 entries
Correct the capitalization of each word
- Best score: 9
- Best player score: 10
- Position: #322 / 506
- Number of attempts: 1
Context insensitive completion 0 - 493 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: 7
- Position: #63 / 230
- Number of attempts: 2
Sort and add attributes - 1273 entries
Sort the states and add the attribute country to each record.
- Best score: 33
- Best player score: 33
- Position: #99 / 510
- Number of attempts: 1
Reconstruct the Sentence - 1265 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: 21
- Position: #166 / 366
- Number of attempts: 1
Whitespace, empty lines and tabs - 3136 entries
Convert tabs to spaces, strip empty lines and trailing whitespace.
- Best score: 16
- Best player score: 17
- Position: #35 / 699
- Number of attempts: 7
Simple text editing with Vim - 11962 entries
Make the pairs of lines match up by making each second line same as first
- Best score: 13
- Best player score: 14
- Position: #877 / 3502
- Number of attempts: 1