Played Challenges
Simple, Practical, and Common - 34012 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: 22
- Position: #1052 / 7513
- Number of attempts: 6
Swap values - 4705 entries
Well, swap the values...
- Best score: 11
- Best player score: 11
- Position: #200 / 1293
- Number of attempts: 5
One number per line - 18903 entries
Just give me the numbers.
- Best score: 14
- Best player score: 16
- Position: #870 / 3904
- Number of attempts: 8
Split line with dots - 2175 entries
This line is too long, split it.
- Best score: 15
- Best player score: 19
- Position: #348 / 639
- Number of attempts: 3
Wrap the text of an email message to 79 characters - 868 entries
You're replying to an email with silly long lines. Clean them up.
- Best score: 5
- Best player score: 5
- Position: #229 / 451
- Number of attempts: 2
multiple cursor alternative - 1591 entries
from: https://www.reddit.com/r/vim/comments/6w5pfa/crosspost_from_remacs_how_would_you_do_this_in_vim/
- Best score: 19
- Best player score: 20
- Position: #135 / 388
- Number of attempts: 6
From argument to object - 1566 entries
This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?
- Best score: 17
- Best player score: 17
- Position: #67 / 471
- Number of attempts: 2
Every other line - 2951 entries
AaAaAaA
- Best score: 12
- Best player score: 13
- Position: #217 / 712
- Number of attempts: 6
Copy three lines - 2923 entries
If the site is up (by some miracle), make the text under every header identical.
- Best score: 13
- Best player score: 13
- Position: #78 / 647
- Number of attempts: 10
Array propagate - 354 entries
Complete the array with the keys as part of the value
- Best score: 23
- Best player score: 24
- Position: #36 / 125
- Number of attempts: 4
Extract argument from function - 2427 entries
The aim is to see if you can do some refactoring very fast.
- Best score: 13
- Best player score: 13
- Position: #193 / 772
- Number of attempts: 5
Search and Replace 0 - 5159 entries
Replace every instance of 'aaa' with 'xaaax'.
- Best score: 12
- Best player score: 12
- Position: #505 / 1674
- Number of attempts: 4
That hyphen - 2646 entries
"vim vi improved"
- Best score: 9
- Best player score: 9
- Position: #171 / 711
- Number of attempts: 4
comment and uncomment code inline - 1182 entries
It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.
- Best score: 9
- Best player score: 9
- Position: #76 / 332
- Number of attempts: 3
Just the middle - 11616 entries
Delete the instructions at the top and bottom.
- Best score: 7
- Best player score: 7
- Position: #1028 / 4255
- Number of attempts: 3
Team names - 1861 entries
The team names are misspelled.
- Best score: 16
- Best player score: 16
- Position: #61 / 596
- Number of attempts: 4
Interweave two blocks of text - 692 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: 15
- Position: #19 / 217
- Number of attempts: 5
Missing Library and a Typo - 954 entries
I forgot to add a c library, please add it for me. Also I'm bad at typing so fix my typo too.
- Best score: 14
- Best player score: 16
- Position: #71 / 223
- Number of attempts: 3
Basic renumbering - 5733 entries
Renumbering Basic.
- Best score: 11
- Best player score: 20
- Position: #822 / 1279
- Number of attempts: 4
Interactive git rebase changing commands - 201 entries
How to change the action of some commits in git rebase dialog.
- Best score: 14
- Best player score: 15
- Position: #47 / 83
- Number of attempts: 2
Fiddle percentages into real numbers - 886 entries
Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.
- Best score: 13
- Best player score: 13
- Position: #99 / 297
- Number of attempts: 4
Add to end of each line... kinda - 350 entries
Visual-block mode can be used to add something to the end of each line, even if they are of differing lengths. However, what if it's not quite at the end?
- Best score: 12
- Best player score: 12
- Position: #89 / 180
- Number of attempts: 1
Wrap text in quotes - 378 entries
All the blocks of text should be wrapped in quotation marks.
- Best score: 16
- Best player score: 16
- Position: #34 / 124
- Number of attempts: 4
Vice versa - 8019 entries
Little role switching.
- Best score: 12
- Best player score: 15
- Position: #1077 / 2157
- Number of attempts: 3
Order and join - 1032 entries
There's something special about the input order.
- Best score: 10
- Best player score: 10
- Position: #43 / 265
- Number of attempts: 5
comments galore - 1100 entries
Basic comment reformatting
- Best score: 10
- Best player score: 10
- Position: #238 / 433
- Number of attempts: 2
Scrambled numbers - 830 entries
Four is NOT 1. One is 1.
- Best score: 18
- Best player score: 18
- Position: #31 / 187
- Number of attempts: 7
Hello ${world} - 350 entries
Migrate a JavaScript String from concatenation to ES6 interpolation.
- Best score: 24
- Best player score: 24
- Position: #21 / 104
- Number of attempts: 5
Array transposition - 2481 entries
Transpose two arrays into one.
- Best score: 16
- Best player score: 17
- Position: #94 / 461
- Number of attempts: 10
Swap assigned value - 694 entries
Simple problem but looking for interesting solutions.
- Best score: 10
- Best player score: 10
- Position: #87 / 263
- Number of attempts: 3
Collect List - 4341 entries
Convert to comma separated list.
- Best score: 12
- Best player score: 12
- Position: #342 / 1200
- Number of attempts: 6
readability - 340 entries
Make the code readable by adding some spaces
- Best score: 18
- Best player score: 18
- Position: #72 / 155
- Number of attempts: 2
Logging with key - 343 entries
Sometimes it is better to log with meaningful key
- Best score: 21
- Best player score: 21
- Position: #20 / 90
- Number of attempts: 6
Space out the alphabet - 1692 entries
Put 3 spaces between adjacent letters.
- Best score: 15
- Best player score: 15
- Position: #79 / 456
- Number of attempts: 9
Condensed Cases - 827 entries
Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.
- Best score: 12
- Best player score: 12
- Position: #50 / 254
- Number of attempts: 6
Happy TvvO - 439 entries
Don’t forget the past, learn from it. Happy New Year.
- Best score: 12
- Best player score: 12
- Position: #126 / 211
- Number of attempts: 1
I forgot quotes - 16237 entries
Oops.
- Best score: 10
- Best player score: 10
- Position: #669 / 4224
- Number of attempts: 7
Lisp Condense - 484 entries
Reduce 4 cons selection operations down to one function call.
- Best score: 13
- Best player score: 13
- Position: #45 / 162
- Number of attempts: 3
Gray area - 763 entries
It's a golf metaphor or something.
- Best score: 11
- Best player score: 12
- Position: #106 / 276
- Number of attempts: 4
Don't know what this is - 2066 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: #89 / 594
- Number of attempts: 6
Where should I put the Newline? - 911 entries
Help me put the newline.
- Best score: 7
- Best player score: 7
- Position: #195 / 450
- Number of attempts: 2
Mess in revision history - 1233 entries
Help Joe clean up what Steve has cobbled.
- Best score: 17
- Best player score: 17
- Position: #48 / 258
- Number of attempts: 7
Shuffle puzzle - 377 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: #17 / 108
- Number of attempts: 6
Going underground.... - 376 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: 27
- Position: #25 / 130
- Number of attempts: 5
A HAPPY NEW YEAR 2014 ! - 10755 entries
A HAPPY NEW YEAR 2014 !
- Best score: 11
- Best player score: 11
- Position: #1171 / 3715
- Number of attempts: 3
Letter case trickery - 1686 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: 9
- Position: #15 / 525
- Number of attempts: 5
Words in parens - 13053 entries
We should all ace this, right?
- Best score: 13
- Best player score: 14
- Position: #827 / 3991
- Number of attempts: 4
Hole-in-one - 1040 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: 16
- Position: #90 / 307
- Number of attempts: 7
NATO phonetic alphabet - 547 entries
Transform the series of words into a list.
- Best score: 19
- Best player score: 19
- Position: #33 / 199
- Number of attempts: 6
A simple change - 484 entries
Just change the numbers in the most efficient way ...
- Best score: 12
- Best player score: 12
- Position: #37 / 199
- Number of attempts: 3
The name of the game - 696 entries
End up with the name of the game.
- Best score: 11
- Best player score: 11
- Position: #227 / 369
- Number of attempts: 1
lamb had a little Mary - 659 entries
"Mary" and "lamb" are swapped. Unswap them. Fast as you can.
- Best score: 16
- Best player score: 16
- Position: #16 / 179
- Number of attempts: 8
SFD-ROC: vimvimvim - 1642 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: #93 / 457
- Number of attempts: 6
Stairs Indenting - 502 entries
Indent each line with <line number> whitespaces.
- Best score: 12
- Best player score: 12
- Position: #18 / 202
- Number of attempts: 5
Saving the hashes(#) - 2116 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: #120 / 488
- Number of attempts: 6
Let's play some Ivmgolf - 1162 entries
Oops, I spelled that wrong.
- Best score: 7
- Best player score: 7
- Position: #112 / 459
- Number of attempts: 3
Switch function arguments - 2229 entries
How to switch two arguments of a function.
- Best score: 11
- Best player score: 11
- Position: #145 / 684
- Number of attempts: 5
Append semicolon after expressions - 1086 entries
Some lines need the semicolon, some don't.
- Best score: 11
- Best player score: 11
- Position: #113 / 426
- Number of attempts: 3
Reverse and double space - 511 entries
Reverse the order of the given lines and double space everything
- Best score: 14
- Best player score: 14
- Position: #60 / 202
- Number of attempts: 4
Remove noise from HTTP log - 758 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: #114 / 281
- Number of attempts: 2
Remove semicolons after expressions - 685 entries
A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.
- Best score: 6
- Best player score: 6
- Position: #96 / 270
- Number of attempts: 2
switch variable - 5128 entries
how fast can you switch two variable ?
- Best score: 11
- Best player score: 11
- Position: #490 / 1764
- Number of attempts: 4
The meaning - 588 entries
Numbers are fun!
- Best score: 5
- Best player score: 5
- Position: #272 / 368
- Number of attempts: 1
Replacing some words - 445 entries
How fast could it be?
- Best score: 17
- Best player score: 17
- Position: #27 / 152
- Number of attempts: 8
Make it more readable - 2039 entries
Insert blank lines to make it more organized and readable
- Best score: 13
- Best player score: 13
- Position: #86 / 658
- Number of attempts: 6
remove dupes from array - 1377 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: 17
- Position: #72 / 341
- Number of attempts: 10
imports alignment (python) - 721 entries
Align as one import per line.
- Best score: 17
- Best player score: 17
- Position: #45 / 202
- Number of attempts: 9
Numbering a List - 1969 entries
Pretty simple, number the list.
- Best score: 13
- Best player score: 13
- Position: #26 / 661
- Number of attempts: 9
Assignment Alignment - 909 entries
line up the operators. Use spaces, not tabs.
- Best score: 18
- Best player score: 18
- Position: #46 / 226
- Number of attempts: 10
Shebangs for all - 2103 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: #48 / 533
- Number of attempts: 7
Ruby 1.9 compat - 661 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: #58 / 241
- Number of attempts: 6
The Cake is a Lie - 1418 entries
Correct the capitalization of each word
- Best score: 8
- Best player score: 9
- Position: #239 / 543
- Number of attempts: 3
Make Fancy Header - 1108 entries
Make the header text stand out with surrounding asterisks
- Best score: 15
- Best player score: 16
- Position: #110 / 356
- Number of attempts: 4
Reverse characters in a line - 844 entries
You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.
- Best score: 8
- Best player score: 13
- Position: #81 / 282
- Number of attempts: 6
Change the content of a string - 1799 entries
This docstring is a complete lie. Fix it.
- Best score: 22
- Best player score: 22
- Position: #172 / 655
- Number of attempts: 5
Reconstruct the Sentence - 1745 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: #120 / 457
- Number of attempts: 5
Simple text editing with Vim - 13626 entries
Make the pairs of lines match up by making each second line same as first
- Best score: 13
- Best player score: 13
- Position: #495 / 3902
- Number of attempts: 3
VimGolf