Played Challenges
Wrap the text of an email message to 79 characters - 664 entries
You're replying to an email with silly long lines. Clean them up.
- Best score: 5
- Best player score: 5
- Position: #183 / 379
- Number of attempts: 1
Search and Replace 0 - 4771 entries
Replace every instance of 'aaa' with 'xaaax'.
- Best score: 12
- Best player score: 16
- Position: #1126 / 1581
- Number of attempts: 2
Interweave two blocks of text - 615 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: #120 / 210
- Number of attempts: 3
Python Hello World! Reformatting - 930 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: #156 / 361
- Number of attempts: 1
Swap assigned value - 600 entries
Simple problem but looking for interesting solutions.
- Best score: 10
- Best player score: 12
- Position: #193 / 244
- Number of attempts: 5
VimGolfNight - 524 entries
Based on "The name of the game".
- Best score: 12
- Best player score: 13
- Position: #295 / 339
- Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10607 entries
A HAPPY NEW YEAR 2014 !
- Best score: 11
- Best player score: 11
- Position: #280 / 3659
- Number of attempts: 3
Hanging Indent for Footnotes - 69 entries
Format this footnote (in kramdown syntax) so that it has hanging indent.
- Best score: 17
- Best player score: 21
- Position: #11 / 28
- Number of attempts: 2
Top X - 191 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: #20 / 69
- Number of attempts: 1
Words in parens - 12824 entries
We should all ace this, right?
- Best score: 13
- Best player score: 23
- Position: #3606 / 3939
- Number of attempts: 2
Assign list - 169 entries
Assign list elements to matrix
- Best score: 30
- Best player score: 31
- Position: #5 / 59
- Number of attempts: 5
paste indent correction - JS - 102 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 / 57
- Number of attempts: 3
Delete unwanted lines - 392 entries
Delete all lines which does not end in "o.."
- Best score: 9
- Best player score: 11
- Position: #203 / 224
- Number of attempts: 1
Word frequency alignment - 273 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 / 156
- Number of attempts: 2
XML to JSON - 44 entries
Convert this xml file into json.
- Best score: 75
- Best player score: 99
- Position: #7 / 17
- Number of attempts: 4
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: 18
- Position: #40 / 61
- Number of attempts: 3
Enumerate words - 242 entries
Enumerate the unique words in order.
- Best score: 23
- Best player score: 27
- Position: #59 / 87
- Number of attempts: 2
Execute immediate SQL - 85 entries
Sql string tranformation ...
- Best score: 60
- Best player score: 70
- Position: #11 / 30
- Number of attempts: 2
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: #40 / 88
- Number of attempts: 1
Refactor arguments into object argument - 160 entries
A relatively common Javascript refactoring.
- Best score: 48
- Best player score: 71
- Position: #39 / 64
- 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: 30
- Position: #67 / 91
- Number of attempts: 1
Dehamlizing - 177 entries
Change this piece of HAML code back into erb
- Best score: 32
- Best player score: 43
- Position: #45 / 68
- 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: 27
- Position: #55 / 57
- Number of attempts: 1
NATO phonetic alphabet - 498 entries
Transform the series of words into a list.
- Best score: 19
- Best player score: 24
- Position: #149 / 189
- Number of attempts: 3
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: 11
- Position: #119 / 186
- Number of attempts: 1
The name of the game - 643 entries
End up with the name of the game.
- Best score: 11
- Best player score: 11
- Position: #110 / 353
- Number of attempts: 1
SFD-ROC: vimvimvim - 1550 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: #392 / 435
- Number of attempts: 2
Stairs Indenting - 442 entries
Indent each line with <line number> whitespaces.
- Best score: 12
- Best player score: 15
- Position: #142 / 191
- Number of attempts: 3
Saving the hashes(#) - 1978 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: #145 / 471
- Number of attempts: 6
you're stuck on jQuery < 1.7 - 335 entries
replace calls to jQuery 1.7+'s `on` with calls to pre 1.7 `bind`
- Best score: 25
- Best player score: 29
- Position: #55 / 110
- Number of attempts: 4
Vertical Limit - 2409 entries
transform a succession of one word lines to a an array of strings
- Best score: 21
- Best player score: 28
- Position: #553 / 730
- Number of attempts: 1
replacing each line of a block selection - 2912 entries
replace each line's ../assets/js with /javascripts
- Best score: 18
- Best player score: 32
- Position: #682 / 761
- Number of attempts: 1
Switch function arguments - 2035 entries
How to switch two arguments of a function.
- Best score: 11
- Best player score: 12
- Position: #228 / 641
- Number of attempts: 4
Append semicolon after expressions - 995 entries
Some lines need the semicolon, some don't.
- Best score: 11
- Best player score: 13
- Position: #301 / 399
- 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: 19
- Position: #170 / 191
- Number of attempts: 1
Remove noise from HTTP log - 677 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: #163 / 267
- Number of attempts: 4
Ugly spreadsheet copy/paste to CSV - 953 entries
convert an ugly spreadsheet copy/paste into a CSV format.
- Best score: 19
- Best player score: 24
- Position: #71 / 184
- Number of attempts: 6
Replacing some words - 418 entries
How fast could it be?
- Best score: 17
- Best player score: 20
- Position: #62 / 147
- Number of attempts: 2
Make it more readable - 1940 entries
Insert blank lines to make it more organized and readable
- Best score: 13
- Best player score: 19
- Position: #549 / 637
- Number of attempts: 1
Line Zipper - 450 entries
Zip/pair related lines.
- Best score: 12
- Best player score: 16
- Position: #175 / 210
- 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: 27
- Position: #268 / 328
- Number of attempts: 2
PHP <--> Java class conversion Part 2 - 95 entries
Same class but reverse!
- Best score: 80
- Best player score: 106
- Position: #15 / 37
- Number of attempts: 2
PHP Array Syntax -> MailChimp Merge Syntax - 506 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: #60 / 147
- Number of attempts: 4
imports alignment (python) - 657 entries
Align as one import per line.
- Best score: 17
- Best player score: 23
- Position: #112 / 194
- Number of attempts: 1
HTML to Haml - 838 entries
Help convert this HTML page to Haml.
- Best score: 23
- Best player score: 30
- Position: #51 / 201
- Number of attempts: 7
Numbering a List - 1849 entries
Pretty simple, number the list.
- Best score: 13
- Best player score: 19
- Position: #233 / 636
- Number of attempts: 7
Ruby 1.9 hashes - 1203 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: #334 / 395
- Number of attempts: 2
Assignment Alignment - 824 entries
line up the operators. Use spaces, not tabs.
- Best score: 18
- Best player score: 26
- Position: #122 / 215
- Number of attempts: 1
Shebangs for all - 1860 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: #297 / 488
- Number of attempts: 2
Reverse and count - 435 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: #69 / 169
- Number of attempts: 3
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: 21
- Position: #205 / 229
- Number of attempts: 1
Reverse Simple Deletion - 825 entries
You did the simple deletion, now reverse it.
- Best score: 11
- Best player score: 12
- Position: #270 / 451
- Number of attempts: 3
Sorting paragraphs - 503 entries
Order the paragraphs correctly, per prefixed index
- Best score: 18
- Best player score: 38
- Position: #113 / 156
- Number of attempts: 1
Turn this csv list into queries - 203 entries
Transform each line of this csv file into a MySQL-ready INSERT query.
- Best score: 98
- Best player score: 105
- Position: #17 / 94
- Number of attempts: 2
Context insensitive completion 0 - 500 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: #129 / 231
- Number of attempts: 3
Context Insensitive completion 1 - 451 entries
Finish writing this simple Python HTTP server.
- Best score: 18
- Best player score: 18
- Position: #105 / 229
- Number of attempts: 1
Make Fancy Header - 998 entries
Make the header text stand out with surrounding asterisks
- Best score: 16
- Best player score: 22
- Position: #264 / 336
- Number of attempts: 1
Reverse characters in a line - 701 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: #89 / 248
- Number of attempts: 1
Get rid of html tags - 356 entries
Want to read more about Vim's background? Then get rid of those html tags...
- Best score: 15
- Best player score: 17
- Position: #84 / 213
- Number of attempts: 3
Change the content of a string - 1442 entries
This docstring is a complete lie. Fix it.
- Best score: 22
- Best player score: 27
- Position: #431 / 546
- Number of attempts: 1
Sort and add attributes - 1287 entries
Sort the states and add the attribute country to each record.
- Best score: 33
- Best player score: 33
- Position: #157 / 515
- Number of attempts: 5
Reconstruct the Sentence - 1281 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: 20
- Position: #81 / 367
- Number of attempts: 10
Whitespace, empty lines and tabs - 3206 entries
Convert tabs to spaces, strip empty lines and trailing whitespace.
- Best score: 16
- Best player score: 30
- Position: #481 / 710
- Number of attempts: 1
Simple text editing with Vim - 12050 entries
Make the pairs of lines match up by making each second line same as first
- Best score: 13
- Best player score: 15
- Position: #1945 / 3530
- Number of attempts: 3
Reformat/Refactor a Golfer Class - 6374 entries
A simple case of removing unneeded code and fixing broken indentation.
- Best score: 32
- Best player score: 41
- Position: #838 / 1573
- Number of attempts: 1