Played Challenges
Many duplicates - 1443 entries
Quick and easy
- Best score: 7
- Best player score: 8
- Position: #95 / 467
- Number of attempts: 1
delete swap - 1768 entries
delete all swap
- Best score: 5
- Best player score: 5
- Position: #51 / 548
- Number of attempts: 1
hello-world-vimgolf - 2490 entries
Simple number generation
- Best score: 10
- Best player score: 11
- Position: #345 / 705
- Number of attempts: 2
Making 3 line function a one liner. - 325 entries
Simple challenge for frequent action while programming.
- Best score: 4
- Best player score: 4
- Position: #58 / 202
- Number of attempts: 1
Modernise code - 1388 entries
Modernise and clean up some C++ code.
- Best score: 34
- Best player score: 35
- Position: #85 / 319
- Number of attempts: 3
swap number pairs - 2066 entries
Swap the numbers in a bunch of 2-element arrays.
- Best score: 16
- Best player score: 17
- Position: #94 / 377
- Number of attempts: 4
Python: Def to Lambda - 453 entries
LAMBDA!!!
- Best score: 19
- Best player score: 19
- Position: #42 / 155
- Number of attempts: 4
Rural Post - 4462 entries
Simple challenge to remove all but the post code on each line
- Best score: 9
- Best player score: 10
- Position: #428 / 1093
- Number of attempts: 3
Satisfy the go linter - 2374 entries
You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?
- Best score: 20
- Best player score: 21
- Position: #189 / 469
- Number of attempts: 7
Add quotes to ansible playbook - 952 entries
You created an ansible playbook, but forgot to add quotes. Can you fix it?
- Best score: 8
- Best player score: 9
- Position: #164 / 304
- Number of attempts: 4
Multiline to Single Line - 700 entries
Convert a multiline, indented file to a single line with no whitespace
- Best score: 5
- Best player score: 5
- Position: #149 / 302
- Number of attempts: 1
xrandr outputs and dashes - 702 entries
uh oh, different video drivers identify display outputs with more dashes. Quick, need to change this xrandr script!
- Best score: 12
- Best player score: 12
- Position: #117 / 221
- Number of attempts: 4
From a Thunderlink to a Markdown link - 764 entries
ThunderLinks are durable hyperlinks to specific email messages generated from Thunderbird in HTML format. Leverage the power of vim to make them suitable for a markdown-formatted file.
- Best score: 18
- Best player score: 18
- Position: #46 / 169
- Number of attempts: 9
Yo To Hello - 1129 entries
Simply Turn Yo To Hello
- Best score: 10
- Best player score: 10
- Position: #329 / 523
- Number of attempts: 4
Simple, Practical, and Common - 33571 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: 23
- Position: #2804 / 7405
- Number of attempts: 6
Swap values - 4609 entries
Well, swap the values...
- Best score: 11
- Best player score: 12
- Position: #520 / 1266
- Number of attempts: 5
prepend * to every non-blank line - 6297 entries
Prepend an asterisk to every non-blank line in the input file.
- Best score: 10
- Best player score: 11
- Position: #732 / 1534
- Number of attempts: 3
One number per line - 18709 entries
Just give me the numbers.
- Best score: 14
- Best player score: 14
- Position: #736 / 3856
- Number of attempts: 6
vim = 22 / 7 - 472 entries
pi square vim
- Best score: 20
- Best player score: 21
- Position: #52 / 134
- Number of attempts: 7
Swap values inside brackets - 2480 entries
Easy challenge.
- Best score: 14
- Best player score: 15
- Position: #211 / 575
- Number of attempts: 10
Unsemantic linewrapping - 925 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: #150 / 229
- Number of attempts: 2
V to the i - 4796 entries
Input is 99 V's. Output is 100 i's.
- Best score: 7
- Best player score: 8
- Position: #1479 / 1891
- Number of attempts: 2
Applying same text modification in several lines - 2865 entries
Remove identical text at the beginning of several lines and the closing parenthesis.
- Best score: 12
- Best player score: 13
- Position: #262 / 846
- Number of attempts: 2
SCREAMING_SNAKE_CASE to Title Case - 1214 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: 20
- Position: #114 / 249
- Number of attempts: 8
Add semicolons - 10845 entries
Simply add a semicolon at the end of each line
- Best score: 10
- Best player score: 11
- Position: #1742 / 3060
- Number of attempts: 3
Bad Copy Syntax - 2028 entries
Copy should be from right to left, but sometimes you type it wrong.
- Best score: 18
- Best player score: 19
- Position: #209 / 522
- Number of attempts: 4
Split line with dots - 2144 entries
This line is too long, split it.
- Best score: 15
- Best player score: 15
- Position: #160 / 634
- Number of attempts: 3
remove lines containing the word "reader" - 3574 entries
easy stuff
- Best score: 9
- Best player score: 10
- Position: #842 / 1158
- Number of attempts: 3
Com(m)a Trouble - 3780 entries
Someone was real stupid when placing his commas. Can you fix it?
- Best score: 12
- Best player score: 13
- Position: #333 / 855
- Number of attempts: 7
Box it - 7902 entries
Create a box around a line.
- Best score: 21
- Best player score: 22
- Position: #551 / 1874
- Number of attempts: 4
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: 11
- Position: #35 / 47
- Number of attempts: 3
multiple cursor alternative - 1519 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: #196 / 380
- Number of attempts: 8
From argument to object - 1503 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: #142 / 455
- Number of attempts: 3
Every other line - 2910 entries
AaAaAaA
- Best score: 12
- Best player score: 13
- Position: #265 / 703
- Number of attempts: 6
Copy three lines - 2872 entries
If the site is up (by some miracle), make the text under every header identical.
- Best score: 13
- Best player score: 13
- Position: #178 / 640
- Number of attempts: 6
Extract argument from function - 2355 entries
The aim is to see if you can do some refactoring very fast.
- Best score: 13
- Best player score: 14
- Position: #388 / 752
- Number of attempts: 5
Search and Replace 0 - 4964 entries
Replace every instance of 'aaa' with 'xaaax'.
- Best score: 12
- Best player score: 13
- Position: #874 / 1617
- Number of attempts: 5
That hyphen - 2595 entries
"vim vi improved"
- Best score: 9
- Best player score: 10
- Position: #278 / 701
- Number of attempts: 3
comment and uncomment code inline - 1118 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: 10
- Position: #213 / 321
- Number of attempts: 2
Just the middle - 11423 entries
Delete the instructions at the top and bottom.
- Best score: 7
- Best player score: 8
- Position: #3166 / 4185
- Number of attempts: 3
Team names - 1834 entries
The team names are misspelled.
- Best score: 16
- Best player score: 17
- Position: #323 / 587
- Number of attempts: 4
Turn a ninja to case-insensitive [Nn][Ii][Nn][Jj][Aa] regexp! - 67 entries
I bumped into this in a dailywtf code: http://pastebin.com/QApa5ycS I didn't want to translate a string whenever I wanted to be [Ss][Aa][Rr][Cc][Aa][Ss][Tt][Ii][Cc] on slack, so I figured a script (python, sed, whatever) would be helpful. Well, or a few vim keystroke!
- Best score: 18
- Best player score: 19
- Position: #37 / 39
- Number of attempts: 3
Basic renumbering - 5645 entries
Renumbering Basic.
- Best score: 11
- Best player score: 12
- Position: #302 / 1263
- Number of attempts: 10
Simple addition - 324 entries
The right side of the equation is already there. We just need the left one now.
- Best score: 12
- Best player score: 13
- Position: #76 / 121
- Number of attempts: 2
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: 10
- Position: #126 / 140
- Number of attempts: 2
Vice versa - 7898 entries
Little role switching.
- Best score: 12
- Best player score: 13
- Position: #850 / 2124
- Number of attempts: 4
Sort files from hosts - 188 entries
Resume files by host. I hope you enjoy with this challenge
- Best score: 15
- Best player score: 16
- Position: #31 / 76
- Number of attempts: 3
Order and join - 983 entries
There's something special about the input order.
- Best score: 10
- Best player score: 11
- Position: #138 / 259
- Number of attempts: 5
Change attribute to getter - 140 entries
Wrap attributes with a getter method.
- Best score: 24
- Best player score: 25
- Position: #43 / 59
- Number of attempts: 8
Align commas - 1092 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: 12
- Position: #106 / 245
- Number of attempts: 10
One to Ten - 2209 entries
Generate the sequence of numbers from 1 to 10, one number per line. Inspired by this Reddit thread: https://redd.it/ak4it2
- Best score: 12
- Best player score: 12
- Position: #338 / 669
- Number of attempts: 3
Line under headers - 2031 entries
Put a line under each header, and remove the other markdown formatting.
- Best score: 24
- Best player score: 27
- Position: #196 / 500
- Number of attempts: 5
Increment each number - 1023 entries
Increment each number individually by one
- Best score: 15
- Best player score: 21
- Position: #180 / 248
- Number of attempts: 1
citizen_hacks_2019_challenge6 - 64 entries
For the Citizen Hacks 2019 Vim competition.
- Best score: 3
- Best player score: 3
- Position: #36 / 50
- Number of attempts: 1
Join 'em - 251 entries
This shouldn't be too tough
- Best score: 4
- Best player score: 4
- Position: #7 / 151
- Number of attempts: 1
change parenthesis - 296 entries
change the pair of braces into a pair of parentheses
- Best score: 9
- Best player score: 10
- Position: #141 / 161
- Number of attempts: 1
Reorder the groups - 1181 entries
Change the order so that the groups of fruit come before the vegetables.
- Best score: 14
- Best player score: 15
- Position: #122 / 264
- Number of attempts: 6
Array transposition - 2415 entries
Transpose two arrays into one.
- Best score: 16
- Best player score: 17
- Position: #170 / 446
- Number of attempts: 8
Swap assigned value - 643 entries
Simple problem but looking for interesting solutions.
- Best score: 10
- Best player score: 11
- Position: #190 / 253
- Number of attempts: 6
Collect List - 4298 entries
Convert to comma separated list.
- Best score: 12
- Best player score: 12
- Position: #513 / 1190
- Number of attempts: 3
camel riding - 793 entries
add a prefix on some camelCase variables
- Best score: 15
- Best player score: 16
- Position: #149 / 281
- Number of attempts: 3
Space out the alphabet - 1657 entries
Put 3 spaces between adjacent letters.
- Best score: 15
- Best player score: 16
- Position: #135 / 444
- Number of attempts: 6
Line 'em up! - 420 entries
It can be so hard to keep everything neatly lined-up. Somebody clearly hasn't bothered here. Tidy it up, please!
- Best score: 17
- Best player score: 17
- Position: #35 / 113
- Number of attempts: 14
Condensed Cases - 800 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: 13
- Position: #98 / 245
- Number of attempts: 4
I forgot quotes - 15967 entries
Oops.
- Best score: 10
- Best player score: 11
- Position: #1236 / 4174
- Number of attempts: 9
Subtraction - 180 entries
Solve the equations.
- Best score: 18
- Best player score: 19
- Position: #15 / 62
- Number of attempts: 12
-a-b-c- - 3213 entries
Put hyphens everywhere.
- Best score: 13
- Best player score: 14
- Position: #425 / 1137
- Number of attempts: 4
Count both ways - 1022 entries
Right AND down.
- Best score: 13
- Best player score: 14
- Position: #88 / 354
- Number of attempts: 3
Lisp Condense - 460 entries
Reduce 4 cons selection operations down to one function call.
- Best score: 13
- Best player score: 14
- Position: #87 / 158
- Number of attempts: 7
120 Degrees - 493 entries
Rotate that triangle.
- Best score: 14
- Best player score: 14
- Position: #32 / 145
- Number of attempts: 9
Gray area - 747 entries
It's a golf metaphor or something.
- Best score: 11
- Best player score: 12
- Position: #123 / 271
- Number of attempts: 4
Do you demand a shrubbery? - 1158 entries
Use :redir and crush the emacsgolfers.
- Best score: 15
- Best player score: 28
- Position: #208 / 300
- Number of attempts: 4
Don't know what this is - 2014 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: 12
- Position: #239 / 582
- Number of attempts: 3
Two become one - 713 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: 26
- Position: #38 / 208
- Number of attempts: 7
A HAPPY NEW YEAR 2014 ! - 10656 entries
A HAPPY NEW YEAR 2014 !
- Best score: 11
- Best player score: 12
- Position: #2497 / 3679
- Number of attempts: 2
Letter case trickery - 1621 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: 10
- Position: #170 / 516
- Number of attempts: 7
quotes inside quotes - 3154 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: #346 / 1075
- Number of attempts: 3
Words in parens - 12928 entries
We should all ace this, right?
- Best score: 13
- Best player score: 14
- Position: #1160 / 3960
- Number of attempts: 4
Harder than "abcd > a b c d" - 93 entries
Not as easy as the last challenge. This time, just one space between a and b, up to 25 spaces between y and z. (Removed some lines; diff was too long.)
- Best score: 15
- Best player score: 16
- Position: #14 / 42
- Number of attempts: 4
Block Fun 1 - 210 entries
Manipulate the columns to produce desired result.
- Best score: 14
- Best player score: 15
- Position: #19 / 75
- Number of attempts: 13
Circle of Fifths with Sharps - 114 entries
Display a list of the Circle of Fifths with corresponding solfege syllables with sharps. Handling spaces may be tricky.
- Best score: 24
- Best player score: 25
- Position: #17 / 38
- Number of attempts: 7
NATO phonetic alphabet - 526 entries
Transform the series of words into a list.
- Best score: 19
- Best player score: 20
- Position: #57 / 195
- Number of attempts: 3
The name of the game - 665 entries
End up with the name of the game.
- Best score: 11
- Best player score: 12
- Position: #323 / 360
- Number of attempts: 2
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: 9
- Position: #248 / 446
- Number of attempts: 8
Unwrap the text of an email message - 189 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: 17
- Position: #36 / 74
- Number of attempts: 3
Saving the hashes(#) - 2053 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: #126 / 479
- Number of attempts: 8
Let's play some Ivmgolf - 1118 entries
Oops, I spelled that wrong.
- Best score: 7
- Best player score: 9
- Position: #327 / 445
- Number of attempts: 4
Vertical Limit - 2522 entries
transform a succession of one word lines to a an array of strings
- Best score: 21
- Best player score: 22
- Position: #180 / 751
- Number of attempts: 5
Exchanging Quotes - 851 entries
Sometimes you need to exchange a choice of quotes in some code.
- Best score: 30
- Best player score: 31
- Position: #43 / 228
- Number of attempts: 7
replacing each line of a block selection - 2996 entries
replace each line's ../assets/js with /javascripts
- Best score: 18
- Best player score: 19
- Position: #222 / 775
- Number of attempts: 7
Switch function arguments - 2117 entries
How to switch two arguments of a function.
- Best score: 11
- Best player score: 12
- Position: #322 / 657
- Number of attempts: 2
Append semicolon after expressions - 1046 entries
Some lines need the semicolon, some don't.
- Best score: 11
- Best player score: 12
- Position: #254 / 413
- Number of attempts: 1
switch variable - 5065 entries
how fast can you switch two variable ?
- Best score: 11
- Best player score: 12
- Position: #999 / 1745
- Number of attempts: 2
The meaning - 574 entries
Numbers are fun!
- Best score: 5
- Best player score: 5
- Position: #298 / 362
- Number of attempts: 1
Make it more readable - 1986 entries
Insert blank lines to make it more organized and readable
- Best score: 13
- Best player score: 14
- Position: #196 / 646
- Number of attempts: 4
Line Zipper - 471 entries
Zip/pair related lines.
- Best score: 12
- Best player score: 13
- Position: #64 / 213
- Number of attempts: 6
remove dupes from array - 1354 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: 18
- Position: #106 / 335
- Number of attempts: 6
imports alignment (python) - 700 entries
Align as one import per line.
- Best score: 17
- Best player score: 18
- Position: #55 / 198
- Number of attempts: 13
Numbering a List - 1931 entries
Pretty simple, number the list.
- Best score: 13
- Best player score: 17
- Position: #114 / 652
- Number of attempts: 5
Ruby 1.9 hashes - 1236 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: 13
- Position: #185 / 404
- Number of attempts: 4
Shebangs for all - 1975 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: 12
- Position: #157 / 508
- Number of attempts: 5
A Simple One - 1043 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: #520 / 659
- Number of attempts: 1
The Cake is a Lie - 1330 entries
Correct the capitalization of each word
- Best score: 9
- Best player score: 10
- Position: #385 / 523
- Number of attempts: 4
Compile C - 400 entries
You might have to get clever to do this one.
- Best score: 19
- Best player score: 20
- Position: #29 / 137
- Number of attempts: 12
Reformat a C golf submission - 582 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: 35
- Position: #141 / 206
- Number of attempts: 2
Get rid of html tags - 394 entries
Want to read more about Vim's background? Then get rid of those html tags...
- Best score: 12
- Best player score: 16
- Position: #12 / 228
- Number of attempts: 2
Change the content of a string - 1552 entries
This docstring is a complete lie. Fix it.
- Best score: 22
- Best player score: 23
- Position: #305 / 580
- Number of attempts: 3
Sort and add attributes - 1421 entries
Sort the states and add the attribute country to each record.
- Best score: 33
- Best player score: 34
- Position: #367 / 552
- Number of attempts: 2
Reconstruct the Sentence - 1477 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: 21
- Position: #233 / 405
- Number of attempts: 5
Simple text editing with Vim - 12680 entries
Make the pairs of lines match up by making each second line same as first
- Best score: 13
- Best player score: 14
- Position: #1892 / 3665
- Number of attempts: 4
Reformat/Refactor a Golfer Class - 6866 entries
A simple case of removing unneeded code and fixing broken indentation.
- Best score: 28
- Best player score: 33
- Position: #268 / 1681
- Number of attempts: 7
Contributed Challenges
Fill in the chess board - 956 entries
Fill in the name of each square using its file (a-h) and rank (1-8).