Played Challenges
Simple, Practical, and Common - 33722 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: #1966 / 7442
- Number of attempts: 6
Swap values - 4643 entries
Well, swap the values...
- Best score: 11
- Best player score: 12
- Position: #429 / 1274
- Number of attempts: 5
One number per line - 18755 entries
Just give me the numbers.
- Best score: 14
- Best player score: 17
- Position: #1276 / 3870
- Number of attempts: 12
citizen_hacks_2019_challenge2 - 195 entries
For the Citizen Hacks 2019 Vim competition.
- Best score: 6
- Best player score: 6
- Position: #34 / 102
- Number of attempts: 1
Unsemantic linewrapping - 928 entries
[Inspired by a blog post I read: https://scott.mn/2014/02/21/semantic_linewrapping/. Text adapted.] Sometimes when editing a Markdown file, I wrap the lines semantically. Instead of inserting a newline at 70 columns (or whatever), or making paragraphs one long line, I put in newlines at a point that seems logical to me. This may seem silly, but it produces better diffs. Semantic linewrapping also makes editing snappier. I can delete, edit or insert sentences easily using linewise operations. Code-oriented text editors like Vim and [REDACTED] are really good at this kind of manipulation. Editing text that hasn't been wrapped semantically is a pain, though:
- Best score: 9
- Best player score: 10
- Position: #127 / 231
- Number of attempts: 6
V to the i - 4813 entries
Input is 99 V's. Output is 100 i's.
- Best score: 7
- Best player score: 7
- Position: #489 / 1897
- Number of attempts: 8
Applying same text modification in several lines - 2893 entries
Remove identical text at the beginning of several lines and the closing parenthesis.
- Best score: 12
- Best player score: 14
- Position: #420 / 856
- Number of attempts: 4
Add string initializers to an enum - 873 entries
Change Typescript enum so that it has string initializers.
- Best score: 21
- Best player score: 21
- Position: #30 / 259
- Number of attempts: 5
SCREAMING_SNAKE_CASE to Title Case - 1216 entries
Convert strings in SCREAMING_SNAKE_CASE to Title Case. Examples: EMPLOYEE_NAME -> Employee Name REVENUE_YEAR_TO_DATE -> Revenue Year To Date SALARY -> Salary
- Best score: 19
- Best player score: 19
- Position: #23 / 251
- Number of attempts: 5
Add semicolons - 10881 entries
Simply add a semicolon at the end of each line
- Best score: 10
- Best player score: 10
- Position: #275 / 3072
- Number of attempts: 5
Bad Copy Syntax - 2044 entries
Copy should be from right to left, but sometimes you type it wrong.
- Best score: 18
- Best player score: 19
- Position: #136 / 530
- Number of attempts: 10
Split line with dots - 2154 entries
This line is too long, split it.
- Best score: 15
- Best player score: 19
- Position: #352 / 635
- Number of attempts: 6
remove lines containing the word "reader" - 3604 entries
easy stuff
- Best score: 9
- Best player score: 10
- Position: #686 / 1169
- Number of attempts: 4
Com(m)a Trouble - 3875 entries
Someone was real stupid when placing his commas. Can you fix it?
- Best score: 12
- Best player score: 15
- Position: #439 / 876
- Number of attempts: 6
Box it - 7916 entries
Create a box around a line.
- Best score: 21
- Best player score: 21
- Position: #220 / 1881
- Number of attempts: 8
Tables, Functions, Sprocs - 135 entries
In order to load some scripts into my database in the correct order I need to load tables first (t_), then functions (fn_), then stored procedures (sp_). The order of the t_ lines and the order of the sp_ lines should also match. Reorder the lines so they will load correctly.
- Best score: 10
- Best player score: 10
- Position: #15 / 47
- Number of attempts: 4
multiple cursor alternative - 1521 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: #178 / 381
- Number of attempts: 6
Two pairs of cluster of letters creates word - 749 entries
Clean and group.
- Best score: 17
- Best player score: 17
- Position: #40 / 178
- Number of attempts: 11
Every other line - 2915 entries
AaAaAaA
- Best score: 12
- Best player score: 14
- Position: #272 / 704
- Number of attempts: 9
Convert Application Output to CSV - 203 entries
Change the application output to comma-separated values
- Best score: 17
- Best player score: 17
- Position: #28 / 56
- Number of attempts: 9
Array propagate - 338 entries
Complete the array with the keys as part of the value
- Best score: 23
- Best player score: 23
- Position: #18 / 119
- Number of attempts: 9
Extract argument from function - 2364 entries
The aim is to see if you can do some refactoring very fast.
- Best score: 13
- Best player score: 13
- Position: #186 / 755
- Number of attempts: 9
Search and Replace 0 - 5004 entries
Replace every instance of 'aaa' with 'xaaax'.
- Best score: 12
- Best player score: 12
- Position: #487 / 1630
- Number of attempts: 6
Preferably without multi-cursor plugin - 540 entries
Originally asked as question on reddit by kpthunder: https://www.reddit.com/r/vim/comments/9fvsro/what_is_the_most_efficient_way_to_go_about/
- Best score: 30
- Best player score: 35
- Position: #65 / 129
- Number of attempts: 8
Number Sort - 314 entries
sort the list of newline-separated numbers incrementally. Numbers are in the range 1 to 1000, with 500 missing
- Best score: 9
- Best player score: 9
- Position: #111 / 166
- Number of attempts: 2
That hyphen - 2595 entries
"vim vi improved"
- Best score: 9
- Best player score: 9
- Position: #156 / 701
- Number of attempts: 8
comment and uncomment code inline - 1124 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: #2 / 323
- Number of attempts: 5
Flip the bit - 129 entries
Change the specific 0 to a 1.
- Best score: 8
- Best player score: 10
- Position: #69 / 74
- Number of attempts: 2
Just the middle - 11483 entries
Delete the instructions at the top and bottom.
- Best score: 7
- Best player score: 7
- Position: #904 / 4209
- Number of attempts: 5
Todo list specification - 399 entries
The every item on the todo list must be done today. Modify the list to reflect that.
- Best score: 37
- Best player score: 39
- Position: #150 / 179
- Number of attempts: 2
Stairstep digits - 398 entries
Remove the evens. Double the odds.
- Best score: 9
- Best player score: 13
- Position: #68 / 146
- Number of attempts: 2
Missing Library and a Typo - 893 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: #93 / 214
- Number of attempts: 9
Adam's challenge - 987 entries
Change both normal to bold and 4 by 2. Adam Wathan challenge this on twitter . He did it in 11 keystrokes on Sublime.
- Best score: 18
- Best player score: 18
- Position: #19 / 271
- Number of attempts: 8
Fiddle percentages into real numbers - 867 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: #72 / 292
- Number of attempts: 5
Nesting SASS - 266 entries
Move a block inside another block and indent it
- Best score: 9
- Best player score: 17
- Position: #74 / 96
- Number of attempts: 1
Combines all items - 313 entries
For each line that starts with the same number I want to combine its contents
- Best score: 9
- Best player score: 9
- Position: #58 / 140
- Number of attempts: 1
Vice versa - 7945 entries
Little role switching.
- Best score: 12
- Best player score: 12
- Position: #282 / 2138
- Number of attempts: 5
Order and join - 985 entries
There's something special about the input order.
- Best score: 10
- Best player score: 10
- Position: #33 / 260
- Number of attempts: 6
Paragraph breaks - 522 entries
Swap the blank lines and the aaa lines.
- Best score: 10
- Best player score: 10
- Position: #27 / 167
- Number of attempts: 7
comments galore - 1048 entries
Basic comment reformatting
- Best score: 10
- Best player score: 10
- Position: #225 / 425
- Number of attempts: 4
Scrambled numbers - 807 entries
Four is NOT 1. One is 1.
- Best score: 18
- Best player score: 18
- Position: #24 / 184
- Number of attempts: 7
Align commas - 1095 entries
There are 15,000 aligning challenges on vimgolf.com, and they're all exactly the same. I hope this one is a little different.
- Best score: 11
- Best player score: 11
- Position: #60 / 246
- Number of attempts: 7
citizen_hacks_2019_challenge4 - 95 entries
For the Citizen Hacks 2019 Vim competition.
- Best score: 5
- Best player score: 5
- Position: #30 / 65
- Number of attempts: 1
Generate a list of numbers - 295 entries
Please generate list of numbers from 1 to 20.
- Best score: 14
- Best player score: 14
- Position: #55 / 140
- Number of attempts: 3
Python challenge - 172 entries
Change the types of the variables in the list from str to float, while keeping the truncation.
- Best score: 31
- Best player score: 64
- Position: #41 / 46
- Number of attempts: 2
Change part of a function name in multiple occurrences - 662 entries
Change the middle part of the function name in multiple places, preferably using the next and dot commands.
- Best score: 14
- Best player score: 14
- Position: #48 / 208
- Number of attempts: 10
citizen_hacks_2019_challenge5 - 147 entries
For the Citizen Hacks 2019 Vim competition.
- Best score: 6
- Best player score: 6
- Position: #23 / 77
- Number of attempts: 2
Line under headers - 2059 entries
Put a line under each header, and remove the other markdown formatting.
- Best score: 24
- Best player score: 26
- Position: #55 / 507
- Number of attempts: 4
Build a six - 294 entries
Just enjoy building "a" floors...
- Best score: 22
- Best player score: 22
- Position: #50 / 95
- Number of attempts: 4
Increment each number - 1025 entries
Increment each number individually by one
- Best score: 15
- Best player score: 15
- Position: #41 / 249
- Number of attempts: 6
citizen_hacks_2019_challenge6 - 65 entries
For the Citizen Hacks 2019 Vim competition.
- Best score: 3
- Best player score: 3
- Position: #26 / 51
- Number of attempts: 1
Join 'em - 251 entries
This shouldn't be too tough
- Best score: 4
- Best player score: 5
- Position: #120 / 151
- Number of attempts: 2
Delete to the end of the current line - 829 entries
Delete to the end of the current line, but keep the character under the cursor.
- Best score: 5
- Best player score: 5
- Position: #185 / 400
- Number of attempts: 2
Song Transcription Oops - 243 entries
When transcribing vocal music to Canjo Tab you can start by finding the lowest note and assigning that to zero and working your way up from there. However, without fail, I tend to miscount the notes and when I am near done I find a lower note. I mark this with a "z". This means I have to increase all the previous ones by 1. just a sting of numbers :)
- Best score: 15
- Best player score: 15
- Position: #39 / 78
- Number of attempts: 5
change parenthesis - 296 entries
change the pair of braces into a pair of parentheses
- Best score: 9
- Best player score: 9
- Position: #60 / 161
- Number of attempts: 1
Remove quotes after first field - 380 entries
Remove the quotes around each field except for the first field.
- Best score: 16
- Best player score: 20
- Position: #48 / 91
- Number of attempts: 4
convert yml into java pojo field - 857 entries
How fast vim can create fields for java pojo i.e class declaration referring to a (simple) yml file
- Best score: 29
- Best player score: 29
- Position: #77 / 227
- Number of attempts: 6
unknown command - 167 entries
I want change 5 words
- Best score: 7
- Best player score: 7
- Position: #50 / 87
- Number of attempts: 3
From A to B - 591 entries
Mirror and change this text block
- Best score: 16
- Best player score: 16
- Position: #50 / 159
- Number of attempts: 8
Collect List - 4305 entries
Convert to comma separated list.
- Best score: 12
- Best player score: 12
- Position: #305 / 1191
- Number of attempts: 7
VimGolfNight - 560 entries
Based on "The name of the game".
- Best score: 12
- Best player score: 12
- Position: #268 / 347
- Number of attempts: 5
Space out the alphabet - 1658 entries
Put 3 spaces between adjacent letters.
- Best score: 15
- Best player score: 15
- Position: #74 / 445
- Number of attempts: 12
Fix the XML - 1039 entries
The challenge consists in having a valid xml from an incomplete source.
- Best score: 18
- Best player score: 19
- Position: #69 / 290
- Number of attempts: 10
Condensed Cases - 804 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: #57 / 247
- Number of attempts: 3
I forgot quotes - 16022 entries
Oops.
- Best score: 10
- Best player score: 10
- Position: #578 / 4189
- Number of attempts: 12
learn vim in short time - 240 entries
so happy to learn vim.because vim is awesome
- Best score: 8
- Best player score: 8
- Position: #97 / 161
- Number of attempts: 1
-a-b-c- - 3216 entries
Put hyphens everywhere.
- Best score: 13
- Best player score: 13
- Position: #207 / 1138
- Number of attempts: 12
Count both ways - 1022 entries
Right AND down.
- Best score: 13
- Best player score: 15
- Position: #127 / 354
- Number of attempts: 2
Lisp Condense - 460 entries
Reduce 4 cons selection operations down to one function call.
- Best score: 13
- Best player score: 13
- Position: #51 / 158
- Number of attempts: 4
Gray area - 747 entries
It's a golf metaphor or something.
- Best score: 11
- Best player score: 12
- Position: #118 / 271
- Number of attempts: 3
Do you demand a shrubbery? - 1158 entries
Use :redir and crush the emacsgolfers.
- Best score: 15
- Best player score: 32
- Position: #289 / 300
- Number of attempts: 2
Don't know what this is - 2024 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: #84 / 586
- Number of attempts: 10
Where should I put the Newline? - 881 entries
Help me put the newline.
- Best score: 7
- Best player score: 7
- Position: #207 / 437
- Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10682 entries
A HAPPY NEW YEAR 2014 !
- Best score: 11
- Best player score: 11
- Position: #1132 / 3689
- Number of attempts: 6
attr_aligner - 3522 entries
Two attr keywords. Two separate indentations. Align the colons.
- Best score: 19
- Best player score: 19
- Position: #135 / 703
- Number of attempts: 9
quotes inside quotes - 3165 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: 14
- Position: #268 / 1079
- Number of attempts: 4
Words in parens - 12967 entries
We should all ace this, right?
- Best score: 13
- Best player score: 15
- Position: #1767 / 3969
- Number of attempts: 5
Unwrap the text of an email message - 192 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: 16
- Position: #26 / 75
- Number of attempts: 8
Array Transposition - 201 entries
Transpose four arrays into two.
- Best score: 27
- Best player score: 46
- Position: #41 / 56
- Number of attempts: 1
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: 33
- Position: #428 / 480
- Number of attempts: 2
Let's play some Ivmgolf - 1122 entries
Oops, I spelled that wrong.
- Best score: 7
- Best player score: 9
- Position: #321 / 446
- Number of attempts: 10
citizen_hacks_2019_challenge1 - 51 entries
For the Citizen Hacks 2019 Vim competition
- Best score: 5
- Best player score: 5
- Position: #17 / 45
- Number of attempts: 1
Vertical Limit - 2552 entries
transform a succession of one word lines to a an array of strings
- Best score: 21
- Best player score: 21
- Position: #60 / 757
- Number of attempts: 12
replacing each line of a block selection - 3001 entries
replace each line's ../assets/js with /javascripts
- Best score: 18
- Best player score: 19
- Position: #216 / 778
- Number of attempts: 6
Switch function arguments - 2140 entries
How to switch two arguments of a function.
- Best score: 11
- Best player score: 11
- Position: #170 / 664
- Number of attempts: 6
Append semicolon after expressions - 1056 entries
Some lines need the semicolon, some don't.
- Best score: 11
- Best player score: 11
- Position: #122 / 419
- Number of attempts: 5
switch variable - 5079 entries
how fast can you switch two variable ?
- Best score: 11
- Best player score: 11
- Position: #470 / 1749
- Number of attempts: 4
Line Zipper - 477 entries
Zip/pair related lines.
- Best score: 12
- Best player score: 14
- Position: #85 / 216
- Number of attempts: 3
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: 17
- Position: #77 / 336
- Number of attempts: 15
Ruby 1.9 hashes - 1249 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: 12
- Position: #96 / 407
- Number of attempts: 6
Assignment Alignment - 885 entries
line up the operators. Use spaces, not tabs.
- Best score: 18
- Best player score: 33
- Position: #192 / 221
- Number of attempts: 3
Shebangs for all - 2018 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: #57 / 519
- Number of attempts: 16
Reverse and count - 480 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: 33
- Position: #153 / 178
- Number of attempts: 1
Hatsuyume - 540 entries
http://en.wikipedia.org/wiki/Hatsuyume
- Best score: 15
- Best player score: 16
- Position: #4 / 187
- Number of attempts: 10
The Cake is a Lie - 1361 entries
Correct the capitalization of each word
- Best score: 9
- Best player score: 9
- Position: #253 / 531
- Number of attempts: 3
Reformat a C golf submission - 612 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: #21 / 209
- Number of attempts: 5
Change the content of a string - 1593 entries
This docstring is a complete lie. Fix it.
- Best score: 22
- Best player score: 22
- Position: #186 / 594
- Number of attempts: 3
Sort and add attributes - 1477 entries
Sort the states and add the attribute country to each record.
- Best score: 33
- Best player score: 33
- Position: #227 / 575
- Number of attempts: 3