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: 22
- Position: #1966 / 7330
- Number of attempts: 6
Swap values - 4513 entries
Well, swap the values...
- Best score: 11
- Best player score: 12
- Position: #424 / 1250
- Number of attempts: 5
One number per line - 18559 entries
Just give me the numbers.
- Best score: 14
- Best player score: 17
- Position: #1265 / 3830
- Number of attempts: 12
citizen_hacks_2019_challenge2 - 187 entries
For the Citizen Hacks 2019 Vim competition.
- Best score: 6
- Best player score: 6
- Position: #34 / 97
- Number of attempts: 1
Unsemantic linewrapping - 873 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: #123 / 221
- Number of attempts: 6
V to the i - 4717 entries
Input is 99 V's. Output is 100 i's.
- Best score: 7
- Best player score: 7
- Position: #489 / 1874
- Number of attempts: 8
Applying same text modification in several lines - 2820 entries
Remove identical text at the beginning of several lines and the closing parenthesis.
- Best score: 12
- Best player score: 14
- Position: #409 / 834
- Number of attempts: 4
Add string initializers to an enum - 850 entries
Change Typescript enum so that it has string initializers.
- Best score: 21
- Best player score: 21
- Position: #30 / 250
- Number of attempts: 5
SCREAMING_SNAKE_CASE to Title Case - 1133 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 / 237
- Number of attempts: 5
Add semicolons - 10744 entries
Simply add a semicolon at the end of each line
- Best score: 10
- Best player score: 10
- Position: #275 / 3030
- Number of attempts: 5
Bad Copy Syntax - 1966 entries
Copy should be from right to left, but sometimes you type it wrong.
- Best score: 18
- Best player score: 19
- Position: #130 / 506
- Number of attempts: 10
Split line with dots - 2113 entries
This line is too long, split it.
- Best score: 15
- Best player score: 19
- Position: #350 / 625
- Number of attempts: 6
remove lines containing the word "reader" - 3502 entries
easy stuff
- Best score: 9
- Best player score: 10
- Position: #671 / 1134
- Number of attempts: 4
Com(m)a Trouble - 3552 entries
Someone was real stupid when placing his commas. Can you fix it?
- Best score: 12
- Best player score: 15
- Position: #405 / 798
- Number of attempts: 6
Box it - 7782 entries
Create a box around a line.
- Best score: 21
- Best player score: 21
- Position: #220 / 1853
- Number of attempts: 8
Tables, Functions, Sprocs - 123 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 / 43
- Number of attempts: 4
multiple cursor alternative - 1460 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: #175 / 374
- Number of attempts: 6
Two pairs of cluster of letters creates word - 729 entries
Clean and group.
- Best score: 17
- Best player score: 17
- Position: #40 / 172
- Number of attempts: 11
Every other line - 2869 entries
AaAaAaA
- Best score: 12
- Best player score: 14
- Position: #267 / 695
- Number of attempts: 9
Convert Application Output to CSV - 184 entries
Change the application output to comma-separated values
- Best score: 17
- Best player score: 17
- Position: #28 / 51
- Number of attempts: 9
Array propagate - 318 entries
Complete the array with the keys as part of the value
- Best score: 23
- Best player score: 23
- Position: #18 / 114
- Number of attempts: 9
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: 13
- Position: #186 / 739
- Number of attempts: 9
Search and Replace 0 - 4766 entries
Replace every instance of 'aaa' with 'xaaax'.
- Best score: 12
- Best player score: 12
- Position: #487 / 1578
- Number of attempts: 6
Preferably without multi-cursor plugin - 530 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: #62 / 125
- Number of attempts: 8
Number Sort - 300 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 / 160
- Number of attempts: 2
That hyphen - 2530 entries
"vim vi improved"
- Best score: 9
- Best player score: 9
- Position: #156 / 690
- Number of attempts: 8
comment and uncomment code inline - 1039 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 / 306
- Number of attempts: 5
Flip the bit - 118 entries
Change the specific 0 to a 1.
- Best score: 8
- Best player score: 10
- Position: #64 / 69
- Number of attempts: 2
Just the middle - 11318 entries
Delete the instructions at the top and bottom.
- Best score: 7
- Best player score: 7
- Position: #904 / 4152
- Number of attempts: 5
Todo list specification - 375 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: #145 / 171
- Number of attempts: 2
Stairstep digits - 366 entries
Remove the evens. Double the odds.
- Best score: 9
- Best player score: 13
- Position: #67 / 137
- Number of attempts: 2
Missing Library and a Typo - 838 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: 15
- Best player score: 16
- Position: #90 / 206
- Number of attempts: 9
Adam's challenge - 928 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 / 261
- Number of attempts: 8
Fiddle percentages into real numbers - 832 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 / 283
- Number of attempts: 5
Nesting SASS - 257 entries
Move a block inside another block and indent it
- Best score: 9
- Best player score: 17
- Position: #71 / 91
- Number of attempts: 1
Combines all items - 298 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 / 134
- Number of attempts: 1
Vice versa - 7675 entries
Little role switching.
- Best score: 12
- Best player score: 12
- Position: #282 / 2078
- Number of attempts: 5
Order and join - 913 entries
There's something special about the input order.
- Best score: 10
- Best player score: 10
- Position: #33 / 248
- Number of attempts: 6
Paragraph breaks - 497 entries
Swap the blank lines and the aaa lines.
- Best score: 10
- Best player score: 10
- Position: #27 / 163
- Number of attempts: 7
comments galore - 982 entries
Basic comment reformatting
- Best score: 10
- Best player score: 10
- Position: #225 / 414
- Number of attempts: 4
Scrambled numbers - 775 entries
Four is NOT 1. One is 1.
- Best score: 18
- Best player score: 18
- Position: #24 / 181
- Number of attempts: 7
Align commas - 1049 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 / 241
- Number of attempts: 7
citizen_hacks_2019_challenge4 - 85 entries
For the Citizen Hacks 2019 Vim competition.
- Best score: 5
- Best player score: 5
- Position: #30 / 59
- Number of attempts: 1
Generate a list of numbers - 282 entries
Please generate list of numbers from 1 to 20.
- Best score: 14
- Best player score: 14
- Position: #55 / 135
- Number of attempts: 3
Python challenge - 146 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: #38 / 43
- Number of attempts: 2
Change part of a function name in multiple occurrences - 627 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 / 200
- Number of attempts: 10
citizen_hacks_2019_challenge5 - 132 entries
For the Citizen Hacks 2019 Vim competition.
- Best score: 6
- Best player score: 6
- Position: #23 / 71
- Number of attempts: 2
Line under headers - 1959 entries
Put a line under each header, and remove the other markdown formatting.
- Best score: 24
- Best player score: 26
- Position: #48 / 483
- Number of attempts: 4
Build a six - 268 entries
Just enjoy building "a" floors...
- Best score: 22
- Best player score: 22
- Position: #50 / 90
- Number of attempts: 4
Increment each number - 970 entries
Increment each number individually by one
- Best score: 15
- Best player score: 15
- Position: #41 / 240
- Number of attempts: 6
citizen_hacks_2019_challenge6 - 56 entries
For the Citizen Hacks 2019 Vim competition.
- Best score: 3
- Best player score: 3
- Position: #26 / 45
- Number of attempts: 1
Join 'em - 243 entries
This shouldn't be too tough
- Best score: 4
- Best player score: 5
- Position: #113 / 144
- Number of attempts: 2
Delete to the end of the current line - 729 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 / 359
- Number of attempts: 2
Song Transcription Oops - 229 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 / 73
- Number of attempts: 5
change parenthesis - 276 entries
change the pair of braces into a pair of parentheses
- Best score: 9
- Best player score: 9
- Position: #60 / 155
- Number of attempts: 1
Remove quotes after first field - 340 entries
Remove the quotes around each field except for the first field.
- Best score: 16
- Best player score: 20
- Position: #43 / 85
- Number of attempts: 4
convert yml into java pojo field - 829 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 / 223
- Number of attempts: 6
unknown command - 154 entries
I want change 5 words
- Best score: 7
- Best player score: 7
- Position: #50 / 80
- Number of attempts: 3
From A to B - 562 entries
Mirror and change this text block
- Best score: 16
- Best player score: 16
- Position: #50 / 154
- Number of attempts: 8
Collect List - 4228 entries
Convert to comma separated list.
- Best score: 12
- Best player score: 12
- Position: #305 / 1179
- Number of attempts: 7
VimGolfNight - 524 entries
Based on "The name of the game".
- Best score: 12
- Best player score: 12
- Position: #268 / 339
- Number of attempts: 5
Space out the alphabet - 1610 entries
Put 3 spaces between adjacent letters.
- Best score: 15
- Best player score: 15
- Position: #74 / 438
- Number of attempts: 12
Fix the XML - 962 entries
The challenge consists in having a valid xml from an incomplete source.
- Best score: 18
- Best player score: 19
- Position: #64 / 280
- Number of attempts: 10
Condensed Cases - 777 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 / 240
- Number of attempts: 3
I forgot quotes - 15880 entries
Oops.
- Best score: 10
- Best player score: 10
- Position: #578 / 4146
- Number of attempts: 12
learn vim in short time - 225 entries
so happy to learn vim.because vim is awesome
- Best score: 8
- Best player score: 8
- Position: #97 / 155
- Number of attempts: 1
-a-b-c- - 3160 entries
Put hyphens everywhere.
- Best score: 13
- Best player score: 13
- Position: #207 / 1124
- Number of attempts: 12
Count both ways - 987 entries
Right AND down.
- Best score: 13
- Best player score: 15
- Position: #124 / 348
- Number of attempts: 2
Lisp Condense - 438 entries
Reduce 4 cons selection operations down to one function call.
- Best score: 13
- Best player score: 13
- Position: #51 / 154
- Number of attempts: 4
Gray area - 713 entries
It's a golf metaphor or something.
- Best score: 11
- Best player score: 12
- Position: #116 / 265
- Number of attempts: 3
Do you demand a shrubbery? - 1108 entries
Use :redir and crush the emacsgolfers.
- Best score: 15
- Best player score: 32
- Position: #284 / 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: 11
- Position: #84 / 576
- Number of attempts: 10
Where should I put the Newline? - 857 entries
Help me put the newline.
- Best score: 7
- Best player score: 7
- Position: #207 / 429
- Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10584 entries
A HAPPY NEW YEAR 2014 !
- Best score: 11
- Best player score: 11
- Position: #1132 / 3653
- Number of attempts: 6
attr_aligner - 3408 entries
Two attr keywords. Two separate indentations. Align the colons.
- Best score: 19
- Best player score: 19
- Position: #135 / 689
- Number of attempts: 9
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: 14
- Position: #268 / 1066
- Number of attempts: 4
Words in parens - 12821 entries
We should all ace this, right?
- Best score: 13
- Best player score: 15
- Position: #1751 / 3938
- Number of attempts: 5
Unwrap the text of an email message - 182 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 / 72
- Number of attempts: 8
Array Transposition - 171 entries
Transpose four arrays into two.
- Best score: 27
- Best player score: 46
- Position: #37 / 52
- Number of attempts: 1
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: 33
- Position: #420 / 470
- Number of attempts: 2
Let's play some Ivmgolf - 1066 entries
Oops, I spelled that wrong.
- Best score: 7
- Best player score: 9
- Position: #314 / 436
- Number of attempts: 10
citizen_hacks_2019_challenge1 - 46 entries
For the Citizen Hacks 2019 Vim competition
- Best score: 5
- Best player score: 5
- Position: #17 / 40
- 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: 21
- Position: #60 / 727
- Number of attempts: 12
replacing each line of a block selection - 2901 entries
replace each line's ../assets/js with /javascripts
- Best score: 18
- Best player score: 19
- Position: #211 / 759
- Number of attempts: 6
Switch function arguments - 2019 entries
How to switch two arguments of a function.
- Best score: 11
- Best player score: 11
- Position: #170 / 637
- Number of attempts: 6
Append semicolon after expressions - 986 entries
Some lines need the semicolon, some don't.
- Best score: 11
- Best player score: 11
- Position: #122 / 397
- Number of attempts: 5
switch variable - 5012 entries
how fast can you switch two variable ?
- Best score: 11
- Best player score: 11
- Position: #470 / 1728
- Number of attempts: 4
Line Zipper - 449 entries
Zip/pair related lines.
- Best score: 12
- Best player score: 14
- Position: #81 / 209
- Number of attempts: 3
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: 17
- Position: #77 / 328
- Number of attempts: 15
Ruby 1.9 hashes - 1202 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 / 394
- Number of attempts: 6
Assignment Alignment - 824 entries
line up the operators. Use spaces, not tabs.
- Best score: 18
- Best player score: 33
- Position: #187 / 215
- Number of attempts: 3
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: 11
- Position: #57 / 486
- Number of attempts: 16
Reverse and count - 432 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: #147 / 168
- Number of attempts: 1
Hatsuyume - 442 entries
http://en.wikipedia.org/wiki/Hatsuyume
- Best score: 16
- Best player score: 16
- Position: #3 / 173
- Number of attempts: 10
The Cake is a Lie - 1266 entries
Correct the capitalization of each word
- Best score: 9
- Best player score: 9
- Position: #253 / 506
- Number of attempts: 3
Reformat a C golf submission - 547 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: #19 / 198
- Number of attempts: 5
Change the content of a string - 1425 entries
This docstring is a complete lie. Fix it.
- Best score: 22
- Best player score: 22
- Position: #186 / 542
- Number of attempts: 3
Sort and add attributes - 1273 entries
Sort the states and add the attribute country to each record.
- Best score: 33
- Best player score: 33
- Position: #227 / 510
- Number of attempts: 3