Played Challenges
vim = 22 / 7 - 475 entries
pi square vim
- Best score: 20
- Best player score: 20
- Position: #19 / 135
- Number of attempts: 13
Wrap the text of an email message to 79 characters - 766 entries
You're replying to an email with silly long lines. Clean them up.
- Best score: 5
- Best player score: 5
- Position: #160 / 410
- Number of attempts: 1
Extract argument from function - 2357 entries
The aim is to see if you can do some refactoring very fast.
- Best score: 13
- Best player score: 13
- Position: #2 / 753
- Number of attempts: 6
Search and Replace 0 - 4989 entries
Replace every instance of 'aaa' with 'xaaax'.
- Best score: 12
- Best player score: 12
- Position: #190 / 1624
- Number of attempts: 6
Just the middle - 11454 entries
Delete the instructions at the top and bottom.
- Best score: 7
- Best player score: 7
- Position: #139 / 4197
- Number of attempts: 4
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: #161 / 380
- Number of attempts: 1
Create Leading Zeros - 241 entries
Create leading zeros only for id columns. Please use generic approach!
- Best score: 23
- Best player score: 23
- Position: #5 / 82
- Number of attempts: 6
O Christmas Tree - 109 entries
Design a macro that makes trees grow (or ASCII triangles, if that's too hard).
- Best score: 22
- Best player score: 31
- Position: #33 / 43
- Number of attempts: 2
Swap assigned value - 647 entries
Simple problem but looking for interesting solutions.
- Best score: 10
- Best player score: 10
- Position: #58 / 254
- Number of attempts: 6
Change your calendar - 392 entries
Happy New Year!
- Best score: 18
- Best player score: 46
- Position: #83 / 87
- Number of attempts: 3
VimGolfNight - 560 entries
Based on "The name of the game".
- Best score: 12
- Best player score: 12
- Position: #6 / 347
- Number of attempts: 3
camel riding - 793 entries
add a prefix on some camelCase variables
- Best score: 15
- Best player score: 18
- Position: #200 / 281
- Number of attempts: 1
readability - 327 entries
Make the code readable by adding some spaces
- Best score: 18
- Best player score: 24
- Position: #147 / 152
- Number of attempts: 6
Logging with key - 328 entries
Sometimes it is better to log with meaningful key
- Best score: 21
- Best player score: 21
- Position: #11 / 88
- Number of attempts: 13
Space out the alphabet - 1657 entries
Put 3 spaces between adjacent letters.
- Best score: 15
- Best player score: 15
- Position: #5 / 444
- Number of attempts: 8
Not enough Ps - 67 entries
Different type of code
- Best score: 13
- Best player score: 13
- Position: #11 / 36
- Number of attempts: 2
Fix the XML - 1039 entries
The challenge consists in having a valid xml from an incomplete source.
- Best score: 18
- Best player score: 18
- Position: #13 / 290
- Number of attempts: 7
Mute the second method of this script - 455 entries
prepend a # infront of every line of the second method
- Best score: 8
- Best player score: 9
- Position: #35 / 239
- Number of attempts: 8
Sorting database text output - 223 entries
Sometimes it is nice to be able to quickly take column-formatted text output from the SQL command line and turn it into a list of useful data. In this case we want a unique, sorted list of the values from the second column combined into one comma-separated list. What is the fewest strokes you can do this in?
- Best score: 24
- Best player score: 24
- Position: #15 / 83
- Number of attempts: 6
Happy TvvO - 427 entries
Don’t forget the past, learn from it. Happy New Year.
- Best score: 12
- Best player score: 12
- Position: #67 / 206
- Number of attempts: 4
I forgot quotes - 15983 entries
Oops.
- Best score: 10
- Best player score: 10
- Position: #98 / 4180
- Number of attempts: 6
-a-b-c- - 3213 entries
Put hyphens everywhere.
- Best score: 13
- Best player score: 13
- Position: #72 / 1137
- Number of attempts: 4
NBCU Weekly Challenge - Test - 253 entries
Just testing.
- Best score: 18
- Best player score: 20
- Position: #78 / 116
- Number of attempts: 2
Change name of a variable - 179 entries
Replace the name of the $variable with the fastest move possible. The challenge is having a command that allow you to easily change the variable name even if its indented.
- Best score: 9
- Best player score: 9
- Position: #21 / 137
- Number of attempts: 1
Neither Fizz nor Buzz - 253 entries
Not your regular increment macro! The gaps are tricky.
- Best score: 13
- Best player score: 20
- Position: #52 / 103
- Number of attempts: 4
Don't know what this is - 2022 entries
Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.
- Best score: 11
- Best player score: 11
- Position: #4 / 585
- Number of attempts: 9
Mess in revision history - 1184 entries
Help Joe clean up what Steve has cobbled.
- Best score: 17
- Best player score: 18
- Position: #80 / 250
- Number of attempts: 13
Shuffle puzzle - 346 entries
Sort the lines in each indent group, and sort the groups. That's the pattern. Or just move lines around manually to get a better score.
- Best score: 13
- Best player score: 13
- Position: #7 / 104
- Number of attempts: 10
Going underground.... - 356 entries
Simple reformatting: in this case changing from the format London underground supplies its customers with, to the format that Google Calendar likes...
- Best score: 22
- Best player score: 28
- Position: #37 / 128
- Number of attempts: 1
Split the words - 368 entries
Add the spaces manually if you must, but if you use Vim's spell checking feature wisely, I think you'll save a LARGE number of strokes.
- Best score: 18
- Best player score: 42
- Position: #95 / 111
- Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 10663 entries
A HAPPY NEW YEAR 2014 !
- Best score: 11
- Best player score: 12
- Position: #1626 / 3683
- Number of attempts: 4
attr_aligner - 3520 entries
Two attr keywords. Two separate indentations. Align the colons.
- Best score: 19
- Best player score: 34
- Position: #544 / 702
- Number of attempts: 2
Ninjas Leaderboard - 99 entries
The two lines in "Start file" has an obfuscated email address. Second line give an index (from 1 to 30) to the chars list of the first line, for example, the first char of email (n) is in position 25, second char (i) is in position 19 and s.o.
- Best score: 25
- Best player score: 35
- Position: #29 / 41
- Number of attempts: 1
Counting in binary - 526 entries
"a" represents 0; "A" represents 1. Start from zero and count to 15.
- Best score: 16
- Best player score: 38
- Position: #71 / 117
- Number of attempts: 5
Letter case trickery - 1630 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: #190 / 518
- Number of attempts: 4
quotes inside quotes - 3159 entries
taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)
- Best score: 14
- Best player score: 15
- Position: #402 / 1078
- Number of attempts: 5
Sort the VimGolf challenges by popularity - 348 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: 15
- Position: #17 / 107
- Number of attempts: 8
Words in parens - 12935 entries
We should all ace this, right?
- Best score: 13
- Best player score: 14
- Position: #219 / 3963
- Number of attempts: 7
Hole-in-one - 1018 entries
Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.
- Best score: 15
- Best player score: 21
- Position: #210 / 304
- Number of attempts: 7
Delete unwanted lines - 413 entries
Delete all lines which does not end in "o.."
- Best score: 9
- Best player score: 9
- Position: #109 / 229
- Number of attempts: 2
Minimalist Limerick - 520 entries
Reproduce this lovely poem.
- Best score: 30
- Best player score: 34
- Position: #55 / 174
- Number of attempts: 8
XML to JSON - 47 entries
Convert this xml file into json.
- Best score: 75
- Best player score: 141
- Position: #10 / 20
- Number of attempts: 4
Coordinates placeholder - 73 entries
Place coordinates instead of target search.
- Best score: 22
- Best player score: 26
- Position: #30 / 38
- Number of attempts: 1
Define to require - 127 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: 79
- Position: #24 / 50
- Number of attempts: 2
Enumerate words - 254 entries
Enumerate the unique words in order.
- Best score: 23
- Best player score: 26
- Position: #42 / 91
- Number of attempts: 5
Execute immediate SQL - 90 entries
Sql string tranformation ...
- Best score: 58
- Best player score: 70
- Position: #11 / 32
- Number of attempts: 4
Circle in a square - 152 entries
Probably looks more like "Egg in a rectangle" in most fonts, but it's actually 23x23.
- Best score: 23
- Best player score: 69
- Position: #42 / 54
- Number of attempts: 3
Groups magic - 158 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: #32 / 93
- Number of attempts: 4
Prefixes and suffixes - 635 entries
Generate all prefixes of "vimchallenge", then all suffixes.
- Best score: 17
- Best player score: 23
- Position: #48 / 201
- Number of attempts: 5
abcd > a b c d - 291 entries
transform the single spaces into 4 spaces repeat for each line
- Best score: 15
- Best player score: 15
- Position: #70 / 222
- Number of attempts: 1
Python: Lots of function arguments - 119 entries
The function definition is too long for one line. The modeline helps you with some typical Python indent settings.
- Best score: 6
- Best player score: 16
- Position: #37 / 50
- Number of attempts: 3
Dehamlizing - 185 entries
Change this piece of HAML code back into erb
- Best score: 32
- Best player score: 42
- Position: #43 / 72
- Number of attempts: 5
NATO phonetic alphabet - 529 entries
Transform the series of words into a list.
- Best score: 19
- Best player score: 21
- Position: #81 / 196
- Number of attempts: 2
Create a pandoc compatible table - 214 entries
In [this vimcast][1], a featured gist from Tim Pope shows how to quickly make a simple table structure. How fast can you convert it to pandoc's markdown style? [1]: http://vimcasts.org/episodes/aligning-text-with-tabular-vim/
- Best score: 32
- Best player score: 50
- Position: #41 / 56
- Number of attempts: 4
A simple change - 461 entries
Just change the numbers in the most efficient way ...
- Best score: 12
- Best player score: 12
- Position: #17 / 191
- Number of attempts: 5
SFD-ROC: Tic-Tac-Toe - 159 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: 35
- Position: #33 / 54
- Number of attempts: 5
Extract text from xml - 127 entries
Extract text from xml file (ignoring commented out elements) and create a one line regex.
- Best score: 28
- Best player score: 35
- Position: #18 / 46
- Number of attempts: 3
The Quick Brown Fox Jumps Over The Lazy Vim - 420 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: #66 / 192
- Number of attempts: 2
The name of the game - 665 entries
End up with the name of the game.
- Best score: 11
- Best player score: 11
- Position: #83 / 360
- Number of attempts: 2
lamb had a little Mary - 609 entries
"Mary" and "lamb" are swapped. Unswap them. Fast as you can.
- Best score: 16
- Best player score: 16
- Position: #4 / 168
- Number of attempts: 7
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: 8
- Position: #18 / 446
- Number of attempts: 11
Stairs Indenting - 473 entries
Indent each line with <line number> whitespaces.
- Best score: 12
- Best player score: 12
- Position: #7 / 197
- Number of attempts: 8
Python to Ruby - 204 entries
Convert this Python code to Ruby. NOTE: This program likely won't run.
- Best score: 24
- Best player score: 27
- Position: #26 / 61
- Number of attempts: 8
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: 21
- Position: #89 / 480
- Number of attempts: 7
Convert pandoc unordered list to a numbered list - 166 entries
I know it's possible to use #. in pandoc to auto-generate numbered lists, but then it's not easy to tell how many items there are when reading it in Markdown. How fast can you make the switch?
- Best score: 20
- Best player score: 43
- Position: #48 / 57
- Number of attempts: 5
Let's play some Ivmgolf - 1118 entries
Oops, I spelled that wrong.
- Best score: 7
- Best player score: 7
- Position: #53 / 445
- 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: 25
- Position: #10 / 113
- Number of attempts: 8
Vertical Limit - 2538 entries
transform a succession of one word lines to a an array of strings
- Best score: 21
- Best player score: 23
- Position: #210 / 754
- Number of attempts: 8
Exchanging Quotes - 858 entries
Sometimes you need to exchange a choice of quotes in some code.
- Best score: 30
- Best player score: 35
- Position: #97 / 230
- Number of attempts: 5
replacing each line of a block selection - 2999 entries
replace each line's ../assets/js with /javascripts
- Best score: 18
- Best player score: 20
- Position: #247 / 777
- Number of attempts: 6
Switch function arguments - 2139 entries
How to switch two arguments of a function.
- Best score: 11
- Best player score: 11
- Position: #51 / 663
- Number of attempts: 5
Append semicolon after expressions - 1056 entries
Some lines need the semicolon, some don't.
- Best score: 11
- Best player score: 11
- Position: #36 / 419
- Number of attempts: 4
Reverse and double space - 500 entries
Reverse the order of the given lines and double space everything
- Best score: 14
- Best player score: 14
- Position: #41 / 199
- Number of attempts: 6
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: 15
- Position: #56 / 273
- Number of attempts: 3
Remove semicolons after expressions - 654 entries
A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.
- Best score: 6
- Best player score: 6
- Position: #48 / 263
- Number of attempts: 3
The meaning - 575 entries
Numbers are fun!
- Best score: 5
- Best player score: 5
- Position: #167 / 363
- Number of attempts: 3
Calculate the table totals - 146 entries
Go ahead... commit the treachery of using vim as a spreadsheet.
- Best score: 33
- Best player score: 65
- Position: #32 / 45
- Number of attempts: 1
Replacing some words - 428 entries
How fast could it be?
- Best score: 17
- Best player score: 20
- Position: #62 / 151
- Number of attempts: 4
PHP <--> Java class conversion Part 1 - 254 entries
Convert this tiny php class to adequate java one.
- Best score: 65
- Best player score: 84
- Position: #22 / 63
- Number of attempts: 4
Sort the cardinal numbers - 310 entries
Maybe a simple challenge.
- Best score: 12
- Best player score: 46
- Position: #143 / 148
- Number of attempts: 3
Make it more readable - 2005 entries
Insert blank lines to make it more organized and readable
- Best score: 13
- Best player score: 14
- Position: #149 / 650
- Number of attempts: 5
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: 21
- Position: #149 / 336
- Number of attempts: 6
imports alignment (python) - 700 entries
Align as one import per line.
- Best score: 17
- Best player score: 19
- Position: #64 / 198
- Number of attempts: 9
expand a list comprehension (python) - 333 entries
Please show your way to convert a list comprehension in python to an ordinary for-loop expression!
- Best score: 42
- Best player score: 50
- Position: #42 / 109
- Number of attempts: 4
Insert a Markdown link - 439 entries
Put a link in a markdown document, using the after-the-paragraph format.
- Best score: 22
- Best player score: 24
- Position: #63 / 147
- Number of attempts: 10
Numbering a List - 1931 entries
Pretty simple, number the list.
- Best score: 13
- Best player score: 18
- Position: #120 / 652
- Number of attempts: 7
Java Array2List - 233 entries
Convert an java array initializer into a list.
- Best score: 67
- Best player score: 112
- Position: #58 / 87
- Number of attempts: 3
Assignment Alignment - 883 entries
line up the operators. Use spaces, not tabs.
- Best score: 18
- Best player score: 20
- Position: #85 / 220
- Number of attempts: 5
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: 11
- Position: #16 / 516
- Number of attempts: 10
A Simple One - 1050 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: #306 / 664
- Number of attempts: 1
Table Reshuffle - 429 entries
Fix the column order in this table... also append the new 'username' column.
- Best score: 22
- Best player score: 24
- Position: #37 / 139
- Number of attempts: 6
Another Mixed-Up Haiku - 265 entries
VimGolf ... a perfect evening?
- Best score: 21
- Best player score: 21
- Position: #28 / 90
- 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: 16
- Position: #136 / 234
- Number of attempts: 3
Increment, increment, increment.... - 688 entries
Vim likes macros
- Best score: 10
- Best player score: 12
- Position: #250 / 408
- Number of attempts: 2
Sorting paragraphs - 534 entries
Order the paragraphs correctly, per prefixed index
- Best score: 18
- Best player score: 27
- Position: #68 / 163
- Number of attempts: 8
Indentation - 542 entries
Indent each line according to the right number of spaces it needs.
- Best score: 20
- Best player score: 24
- Position: #44 / 178
- Number of attempts: 6
Hatsuyume - 532 entries
http://en.wikipedia.org/wiki/Hatsuyume
- Best score: 15
- Best player score: 31
- Position: #140 / 186
- Number of attempts: 2
The Cake is a Lie - 1346 entries
Correct the capitalization of each word
- Best score: 9
- Best player score: 9
- Position: #135 / 527
- Number of attempts: 7
Fix the Haiku - 308 entries
Change this slightly scrambled haiku to its unscrambled form and fix the capitalisation and punctuation along the way.
- Best score: 28
- Best player score: 40
- Position: #58 / 113
- Number of attempts: 3
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: 7
- Position: #79 / 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: #97 / 245
- Number of attempts: 1
Almost encrypted - 204 entries
Convert the first paragraph to be even less readable.
- Best score: 5
- Best player score: 5
- Position: #101 / 146
- Number of attempts: 1
Make Fancy Header - 1052 entries
Make the header text stand out with surrounding asterisks
- Best score: 15
- Best player score: 16
- Position: #80 / 344
- Number of attempts: 5
Reformat a C golf submission - 604 entries
Take this C golf submission (for the "tiny but standards-compliant Hello World program" category, naturally), and turn it into formatted C code.
- Best score: 22
- Best player score: 25
- Position: #17 / 208
- Number of attempts: 9
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: 15
- Position: #135 / 265
- Number of attempts: 3
Reformat most common surnames - 717 entries
Reformat copy-pasted table into a list of the most common surnames
- Best score: 23
- Best player score: 26
- Position: #77 / 210
- Number of attempts: 5
Change the content of a string - 1580 entries
This docstring is a complete lie. Fix it.
- Best score: 22
- Best player score: 22
- Position: #93 / 588
- Number of attempts: 3
Sort and add attributes - 1451 entries
Sort the states and add the attribute country to each record.
- Best score: 33
- Best player score: 33
- Position: #136 / 563
- Number of attempts: 3
Add fold markers to a .c file - 625 entries
Fold markers can make it easier to navigate source code. Add them to this .c file.
- Best score: 30
- Best player score: 34
- Position: #75 / 183
- Number of attempts: 4
Reconstruct the Sentence - 1507 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: #67 / 412
- Number of attempts: 10
Braces or Brackets? - 1015 entries
Someone forgot whether to use braces or brackets and you have to clean up their code!
- Best score: 34
- Best player score: 34
- Position: #13 / 315
- Number of attempts: 8
Whitespace, empty lines and tabs - 3665 entries
Convert tabs to spaces, strip empty lines and trailing whitespace.
- Best score: 16
- Best player score: 17
- Position: #83 / 787
- Number of attempts: 9
Flodder-challenge - 1262 entries
Replace the text the most efficient and win!
- Best score: 27
- Best player score: 33
- Position: #112 / 335
- Number of attempts: 13
Simple text editing with Vim - 12811 entries
Make the pairs of lines match up by making each second line same as first
- Best score: 13
- Best player score: 13
- Position: #122 / 3694
- Number of attempts: 12
Reformat/Refactor a Golfer Class - 6982 entries
A simple case of removing unneeded code and fixing broken indentation.
- Best score: 28
- Best player score: 33
- Position: #223 / 1706
- Number of attempts: 6
Contributed Challenges
readability - 327 entries
Make the code readable by adding some spaces
camel riding - 793 entries
add a prefix on some camelCase variables
Yann Moisan
Twitter: @YannMoisan
Scala enthusiast. Software craftsman. NoSQL.