Played Challenges
Simple, Practical, and Common - 33236 entries
Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.
- Best score: 22
- Best player score: 24
- Position: #2827 / 7330
- Number of attempts: 1
vim = 22 / 7 - 447 entries
pi square vim
- Best score: 20
- Best player score: 32
- Position: #91 / 131
- Number of attempts: 1
V to the i - 4717 entries
Input is 99 V's. Output is 100 i's.
- Best score: 7
- Best player score: 9
- Position: #1485 / 1874
- Number of attempts: 2
Extract argument from function - 2283 entries
The aim is to see if you can do some refactoring very fast.
- Best score: 13
- Best player score: 14
- Position: #271 / 739
- Number of attempts: 2
Search and Replace 0 - 4766 entries
Replace every instance of 'aaa' with 'xaaax'.
- Best score: 12
- Best player score: 16
- Position: #1123 / 1578
- Number of attempts: 1
Across-Down Flip - 53 entries
Do this instead of the Sunday crossword.
- Best score: 23
- Best player score: 67
- Position: #23 / 24
- Number of attempts: 1
Just the middle - 11318 entries
Delete the instructions at the top and bottom.
- Best score: 7
- Best player score: 8
- Position: #2073 / 4152
- Number of attempts: 1
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: 51
- Position: #337 / 361
- Number of attempts: 1
Return the cow - 71 entries
This cow is too verbose. Give it a lesson.
- Best score: 52
- Best player score: 131
- Position: #26 / 28
- Number of attempts: 1
Create Leading Zeros - 208 entries
Create leading zeros only for id columns. Please use generic approach!
- Best score: 23
- Best player score: 127
- Position: #78 / 78
- Number of attempts: 1
JS notation to Immutable.js notation - 161 entries
Now Immutable.js made its way into many frontends. This challenge consists of a typical refactoring that many of us are facing now.
- Best score: 34
- Best player score: 43
- Position: #43 / 60
- Number of attempts: 3
Vice versa - 7675 entries
Little role switching.
- Best score: 12
- Best player score: 16
- Position: #1176 / 2078
- Number of attempts: 1
Create bison tokens - 34 entries
Create tokens for bison out of a known list of words
- Best score: 85
- Best player score: 103
- Position: #11 / 16
- Number of attempts: 2
Manual SQL - 114 entries
Change select and insert queries to simulate inserting a new record.
- Best score: 49
- Best player score: 74
- Position: #32 / 44
- Number of attempts: 1
Swap assigned value - 593 entries
Simple problem but looking for interesting solutions.
- Best score: 10
- Best player score: 11
- Position: #137 / 242
- Number of attempts: 1
Cartesian product - 218 entries
{1,2,3,4,5} X {1,2,3,4,5}
- Best score: 24
- Best player score: 35
- Position: #58 / 92
- Number of attempts: 1
vim1001 - 275 entries
change number 1001 into a "vim1001 sequence". (My first challenge, hope it is not too bad... )
- Best score: 17
- Best player score: 27
- Position: #88 / 107
- Number of attempts: 1
-a-b-c- - 3160 entries
Put hyphens everywhere.
- Best score: 13
- Best player score: 15
- Position: #444 / 1124
- Number of attempts: 1
Count both ways - 987 entries
Right AND down.
- Best score: 13
- Best player score: 16
- Position: #132 / 348
- Number of attempts: 1
Suffix sort - 244 entries
Sort from the end of the line, as if the letters in each line were reversed.
- Best score: 19
- Best player score: 30
- Position: #54 / 64
- Number of attempts: 3
NBCU Weekly Challenge - Test - 243 entries
Just testing.
- Best score: 18
- Best player score: 20
- Position: #80 / 114
- Number of attempts: 1
Change name of a variable - 169 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: #26 / 132
- Number of attempts: 1
Lisp Condense - 438 entries
Reduce 4 cons selection operations down to one function call.
- Best score: 13
- Best player score: 14
- Position: #60 / 154
- Number of attempts: 1
120 Degrees - 457 entries
Rotate that triangle.
- Best score: 14
- Best player score: 20
- Position: #76 / 142
- Number of attempts: 3
NBCU Weekly Challenge - #0 - 124 entries
One of our favorites lines here at NBCU! p.s. The first version of #0 was deleted due to me copy/pasting a HTML entity. Congrats to the one who figured that out, you are a true ninja warrior!
- Best score: 30
- Best player score: 33
- Position: #30 / 55
- Number of attempts: 1
Refactor static member invocation - 198 entries
Someone used a static method. Refactor the method into a static import while fixing the assertion.
- Best score: 28
- Best player score: 54
- Position: #60 / 63
- Number of attempts: 1
Comparing scores - 94 entries
If Alice and Bob both did the challenge, put their entries together in the top paragraph, so we can compare their scores more easily.
- Best score: 18
- Best player score: 33
- Position: #21 / 33
- Number of attempts: 5
Neither Fizz nor Buzz - 226 entries
Not your regular increment macro! The gaps are tricky.
- Best score: 13
- Best player score: 43
- Position: #96 / 99
- Number of attempts: 2
Do you demand a shrubbery? - 1108 entries
Use :redir and crush the emacsgolfers.
- Best score: 15
- Best player score: 22
- Position: #170 / 293
- Number of attempts: 2
Don't know what this is - 1961 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: 17
- Position: #533 / 576
- Number of attempts: 2
Two become one - 710 entries
We have two c arrays and want to make one two dimensional out of it. Can we do that?
- Best score: 25
- Best player score: 33
- Position: #122 / 205
- Number of attempts: 7
Where should I put the Newline? - 857 entries
Help me put the newline.
- Best score: 7
- Best player score: 8
- Position: #229 / 429
- Number of attempts: 3
Vim tetris - 352 entries
Vim can play tetris too!
- Best score: 21
- Best player score: 32
- Position: #83 / 101
- Number of attempts: 2
Five Pillars - 60 entries
Arrange all words in a table with 5 columns. The minimal space between words in columns is 2 spaces. Columns do have varying width.
- Best score: 41
- Best player score: 88
- Position: #22 / 22
- Number of attempts: 1
Piphilology - 131 entries
Piphilology comprises the creation and use of mnemonic techniques to remember a span of digits of the mathematical constant π. http://en.wikipedia.org/wiki/Piphilology
- Best score: 29
- Best player score: 38
- Position: #27 / 51
- Number of attempts: 3
Mess in revision history - 1157 entries
Help Joe clean up what Steve has cobbled.
- Best score: 17
- Best player score: 38
- Position: #220 / 245
- Number of attempts: 2
Shuffle puzzle - 317 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: 26
- Position: #99 / 101
- Number of attempts: 1
Carriage return - 42 entries
I have some raw data from terminal output which uses carriege return for formatting. Carriage return sets the pointer to the first character on the line, and subsequent characters will overwrite what was there before. The challange is to simulate the terminal behaviour in vim. I'm kind of unsure if I should have skipped lines 9 and 15, since there might be some interesting solutions which are not that generic. Happy Golfing!
- Best score: 22
- Best player score: 45
- Position: #19 / 20
- Number of attempts: 1
HTML formatting: vertical alignment for readability - 63 entries
We did this a VimGolf challenge at work and now that we have finished I want to see if you guys can come up with something even better than we could. Our best solution was 44 keystrokes.
- Best score: 33
- Best player score: 93
- Position: #27 / 33
- Number of attempts: 1
Write Setters and Getters for PHP - 86 entries
Just simple automation of writing Setters and Getters like Doctrine might use.
- Best score: 102
- Best player score: 209
- Position: #31 / 32
- Number of attempts: 1
Going underground.... - 315 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: 34
- Position: #93 / 122
- Number of attempts: 1
Split the words - 356 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: 40
- Position: #78 / 108
- Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10584 entries
A HAPPY NEW YEAR 2014 !
- Best score: 11
- Best player score: 13
- Position: #2502 / 3653
- Number of attempts: 3
attr_aligner - 3408 entries
Two attr keywords. Two separate indentations. Align the colons.
- Best score: 19
- Best player score: 33
- Position: #493 / 689
- Number of attempts: 3
Under the cupola - 45 entries
Taking some liberty about the name and plot of the Stephen King's famous novel (and TV series) to make this challenge. Are you able to recreate graphically the key phrase of the story? (I think is gonna be hard!)
- Best score: 33
- Best player score: 128
- Position: #16 / 17
- Number of attempts: 1
Ninjas Leaderboard - 84 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: 45
- Position: #36 / 38
- Number of attempts: 4
Counting in binary - 447 entries
"a" represents 0; "A" represents 1. Start from zero and count to 15.
- Best score: 16
- Best player score: 43
- Position: #83 / 112
- Number of attempts: 2
Letter case trickery - 1588 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: 13
- Position: #360 / 509
- Number of attempts: 1
quotes inside quotes - 3105 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: 16
- Position: #515 / 1066
- Number of attempts: 2
Hanging Indent for Footnotes - 69 entries
Format this footnote (in kramdown syntax) so that it has hanging indent.
- Best score: 17
- Best player score: 26
- Position: #20 / 28
- Number of attempts: 1
Recursive Cowsay - 58 entries
Convert 'cowsay' statement to recursive output
- Best score: 33
- Best player score: 78
- Position: #15 / 17
- 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: 27
- Position: #35 / 69
- Number of attempts: 3
Number an outline - 246 entries
The indent and words are right, but the numbers are all wrong.
- Best score: 25
- Best player score: 66
- Position: #57 / 74
- Number of attempts: 1
Words in parens - 12821 entries
We should all ace this, right?
- Best score: 13
- Best player score: 17
- Position: #2526 / 3938
- Number of attempts: 2
Pairs of numbers - 349 entries
Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"
- Best score: 26
- Best player score: 39
- Position: #78 / 132
- Number of attempts: 1
Assign list - 169 entries
Assign list elements to matrix
- Best score: 30
- Best player score: 49
- Position: #35 / 59
- Number of attempts: 1
Draw the Go board - 140 entries
which is a 19×19 lines board. Here we use ascii characters only for simplicity. See diff file to get a sense. (See also http://en.wikipedia.org/wiki/Go_(game))
- Best score: 50
- Best player score: 63
- Position: #15 / 48
- Number of attempts: 1
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: 45
- Position: #56 / 57
- Number of attempts: 2
Hole-in-one - 1012 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: 17
- Position: #98 / 302
- Number of attempts: 1
It's a factor - 91 entries
Flaunt your macro prowess by factoring some numbers. Too hard? It takes less than 30 strokes, I promise.
- Best score: 24
- Best player score: 124
- Position: #34 / 36
- Number of attempts: 1
Parsing with CSV: Unify lines and result. - 164 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
- Position: #46 / 72
- Number of attempts: 2
Minimalist Limerick - 514 entries
Reproduce this lovely poem.
- Best score: 31
- Best player score: 56
- Position: #165 / 170
- Number of attempts: 1
XML to JSON - 44 entries
Convert this xml file into json.
- Best score: 75
- Best player score: 185
- Position: #12 / 17
- Number of attempts: 1
Circle in a square - 140 entries
Probably looks more like "Egg in a rectangle" in most fonts, but it's actually 23x23.
- Best score: 23
- Best player score: 101
- Position: #52 / 52
- Number of attempts: 1
NATO phonetic alphabet - 498 entries
Transform the series of words into a list.
- Best score: 19
- Best player score: 22
- Position: #111 / 189
- 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: #101 / 187
- Number of attempts: 3
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: 63
- Position: #39 / 43
- Number of attempts: 1
lamb had a little Mary - 570 entries
"Mary" and "lamb" are swapped. Unswap them. Fast as you can.
- Best score: 16
- Best player score: 40
- Position: #133 / 160
- Number of attempts: 2
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: 14
- Position: #335 / 435
- 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: 65
- Position: #38 / 45
- Number of attempts: 4
Stairs Indenting - 442 entries
Indent each line with <line number> whitespaces.
- Best score: 12
- Best player score: 14
- Position: #105 / 191
- Number of attempts: 1
maximun and minimun - 55 entries
Find the maximum and minimum of the rows.
- Best score: 51
- Best player score: 133
- Position: #23 / 23
- Number of attempts: 2
Saving the hashes(#) - 1977 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: 31
- Position: #397 / 470
- Number of attempts: 1
Let's play some Ivmgolf - 1066 entries
Oops, I spelled that wrong.
- Best score: 7
- Best player score: 14
- Position: #413 / 436
- Number of attempts: 1
Vertical Limit - 2399 entries
transform a succession of one word lines to a an array of strings
- Best score: 21
- Best player score: 28
- Position: #552 / 727
- 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: 37
- Position: #125 / 221
- Number of attempts: 1
replacing each line of a block selection - 2901 entries
replace each line's ../assets/js with /javascripts
- Best score: 18
- Best player score: 28
- Position: #584 / 759
- Number of attempts: 1
Append semicolon after expressions - 986 entries
Some lines need the semicolon, some don't.
- Best score: 11
- Best player score: 12
- Position: #188 / 397
- Number of attempts: 3
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: 17
- Position: #207 / 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: 9
- Position: #227 / 253
- Number of attempts: 1
switch variable - 5012 entries
how fast can you switch two variable ?
- Best score: 11
- Best player score: 11
- Position: #222 / 1728
- Number of attempts: 3
The meaning - 543 entries
Numbers are fun!
- Best score: 5
- Best player score: 5
- Position: #187 / 350
- Number of attempts: 1
Ugly spreadsheet copy/paste to CSV - 953 entries
convert an ugly spreadsheet copy/paste into a CSV format.
- Best score: 19
- Best player score: 55
- Position: #163 / 184
- Number of attempts: 1
Replacing some words - 418 entries
How fast could it be?
- Best score: 17
- Best player score: 17
- Position: #24 / 147
- Number of attempts: 7
Make it more readable - 1930 entries
Insert blank lines to make it more organized and readable
- Best score: 13
- Best player score: 17
- Position: #441 / 636
- Number of attempts: 1
Line Zipper - 449 entries
Zip/pair related lines.
- Best score: 12
- Best player score: 22
- Position: #202 / 209
- Number of attempts: 1
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: 32
- Position: #76 / 146
- 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: 242
- Position: #9 / 22
- Number of attempts: 2
Before there was Farmville... - 95 entries
There was old MacDonald. For my toddler. The first Vim sing-a-long?
- Best score: 156
- Best player score: 257
- Position: #40 / 46
- Number of attempts: 2
Numbering a List - 1849 entries
Pretty simple, number the list.
- Best score: 13
- Best player score: 21
- Position: #376 / 636
- Number of attempts: 2
The Universal Declaration of Human Rights, Article 1 - 145 entries
Somebody's got this slightly muddled up. See how quickly you can fix it. (I made this to experiment with buffers. I'm not actually sure whether this is faster with buffers or without.)
- Best score: 24
- Best player score: 29
- Position: #56 / 68
- Number of attempts: 1
The holy-grail may help - 339 entries
Can you find it in less than 20 strokes, Arthur?
- Best score: 16
- Best player score: 25
- Position: #194 / 204
- Number of attempts: 2
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: 16
- Position: #295 / 486
- Number of attempts: 1
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: 126
- Position: #59 / 138
- Number of attempts: 1
Indentation - 492 entries
Indent each line according to the right number of spaces it needs.
- Best score: 21
- Best player score: 27
- Position: #78 / 167
- Number of attempts: 2
Hatsuyume - 442 entries
http://en.wikipedia.org/wiki/Hatsuyume
- Best score: 16
- Best player score: 26
- Position: #88 / 173
- Number of attempts: 5
The Cake is a Lie - 1266 entries
Correct the capitalization of each word
- Best score: 9
- Best player score: 28
- Position: #503 / 506
- Number of attempts: 1
Compile C - 362 entries
You might have to get clever to do this one.
- Best score: 19
- Best player score: 23
- Position: #94 / 131
- Number of attempts: 1
Make Fancy Header - 996 entries
Make the header text stand out with surrounding asterisks
- Best score: 16
- Best player score: 30
- Position: #322 / 335
- 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: #94 / 213
- Number of attempts: 1
Change the content of a string - 1425 entries
This docstring is a complete lie. Fix it.
- Best score: 22
- Best player score: 23
- Position: #249 / 542
- Number of attempts: 2
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: 25
- Position: #304 / 366
- Number of attempts: 1
Braces or Brackets? - 779 entries
Someone forgot whether to use braces or brackets and you have to clean up their code!
- Best score: 34
- Best player score: 40
- Position: #74 / 268
- Number of attempts: 1
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: 16
- Position: #2062 / 3502
- Number of attempts: 2
Reformat/Refactor a Golfer Class - 6336 entries
A simple case of removing unneeded code and fixing broken indentation.
- Best score: 32
- Best player score: 35
- Position: #338 / 1561
- Number of attempts: 4