Played Challenges
Many duplicates - 1447 entries
Quick and easy
- Best score: 7
- Best player score: 8
- Position: #96 / 470
- Number of attempts: 1
delete swap - 1788 entries
delete all swap
- Best score: 5
- Best player score: 5
- Position: #51 / 557
- Number of attempts: 1
hello-world-vimgolf - 2501 entries
Simple number generation
- Best score: 10
- Best player score: 11
- Position: #346 / 709
- Number of attempts: 2
Making 3 line function a one liner. - 329 entries
Simple challenge for frequent action while programming.
- Best score: 4
- Best player score: 4
- Position: #58 / 206
- Number of attempts: 1
Modernise code - 1400 entries
Modernise and clean up some C++ code.
- Best score: 34
- Best player score: 35
- Position: #85 / 323
- Number of attempts: 3
swap number pairs - 2115 entries
Swap the numbers in a bunch of 2-element arrays.
- Best score: 16
- Best player score: 17
- Position: #95 / 384
- Number of attempts: 4
Python: Def to Lambda - 455 entries
LAMBDA!!!
- Best score: 19
- Best player score: 19
- Position: #42 / 156
- Number of attempts: 4
Rural Post - 4515 entries
Simple challenge to remove all but the post code on each line
- Best score: 9
- Best player score: 10
- Position: #432 / 1106
- Number of attempts: 3
Satisfy the go linter - 2437 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: #190 / 481
- Number of attempts: 7
Add quotes to ansible playbook - 1001 entries
You created an ansible playbook, but forgot to add quotes. Can you fix it?
- Best score: 8
- Best player score: 9
- Position: #166 / 316
- Number of attempts: 4
Multiline to Single Line - 731 entries
Convert a multiline, indented file to a single line with no whitespace
- Best score: 5
- Best player score: 5
- Position: #149 / 310
- Number of attempts: 1
xrandr outputs and dashes - 716 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 / 224
- Number of attempts: 4
From a Thunderlink to a Markdown link - 776 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 / 172
- Number of attempts: 9
Yo To Hello - 1137 entries
Simply Turn Yo To Hello
- Best score: 8
- Best player score: 10
- Position: #330 / 528
- Number of attempts: 4
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: 23
- Position: #2812 / 7442
- Number of attempts: 6
Swap values - 4643 entries
Well, swap the values...
- Best score: 11
- Best player score: 12
- Position: #521 / 1274
- Number of attempts: 5
prepend * to every non-blank line - 6332 entries
Prepend an asterisk to every non-blank line in the input file.
- Best score: 10
- Best player score: 11
- Position: #735 / 1545
- Number of attempts: 3
One number per line - 18755 entries
Just give me the numbers.
- Best score: 14
- Best player score: 14
- Position: #736 / 3870
- Number of attempts: 6
vim = 22 / 7 - 475 entries
pi square vim
- Best score: 20
- Best player score: 21
- Position: #52 / 135
- Number of attempts: 7
Swap values inside brackets - 2511 entries
Easy challenge.
- Best score: 13
- Best player score: 15
- Position: #214 / 583
- Number of attempts: 10
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: #150 / 231
- Number of attempts: 2
V to the i - 4813 entries
Input is 99 V's. Output is 100 i's.
- Best score: 7
- Best player score: 8
- Position: #1482 / 1897
- Number of attempts: 2
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: 13
- Position: #263 / 856
- Number of attempts: 2
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: 20
- Position: #114 / 251
- Number of attempts: 8
Add semicolons - 10881 entries
Simply add a semicolon at the end of each line
- Best score: 10
- Best player score: 11
- Position: #1746 / 3072
- Number of attempts: 3
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: #209 / 530
- Number of attempts: 4
Split line with dots - 2154 entries
This line is too long, split it.
- Best score: 15
- Best player score: 15
- Position: #160 / 635
- Number of attempts: 3
remove lines containing the word "reader" - 3604 entries
easy stuff
- Best score: 9
- Best player score: 10
- Position: #846 / 1169
- Number of attempts: 3
Com(m)a Trouble - 3868 entries
Someone was real stupid when placing his commas. Can you fix it?
- Best score: 12
- Best player score: 13
- Position: #337 / 875
- Number of attempts: 7
Box it - 7916 entries
Create a box around a line.
- Best score: 21
- Best player score: 22
- Position: #551 / 1881
- 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 - 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: #196 / 381
- Number of attempts: 8
From argument to object - 1513 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 / 460
- Number of attempts: 3
Every other line - 2915 entries
AaAaAaA
- Best score: 12
- Best player score: 13
- Position: #265 / 704
- Number of attempts: 6
Copy three lines - 2875 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 / 641
- Number of attempts: 6
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: 14
- Position: #389 / 755
- Number of attempts: 5
Search and Replace 0 - 5004 entries
Replace every instance of 'aaa' with 'xaaax'.
- Best score: 12
- Best player score: 13
- Position: #884 / 1630
- 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 - 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: 10
- Position: #214 / 323
- Number of attempts: 2
Just the middle - 11483 entries
Delete the instructions at the top and bottom.
- Best score: 7
- Best player score: 8
- Position: #3168 / 4209
- Number of attempts: 3
Team names - 1841 entries
The team names are misspelled.
- Best score: 16
- Best player score: 17
- Position: #324 / 589
- 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 - 5683 entries
Renumbering Basic.
- Best score: 11
- Best player score: 12
- Position: #303 / 1269
- Number of attempts: 10
Simple addition - 331 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: #77 / 123
- 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 - 7945 entries
Little role switching.
- Best score: 12
- Best player score: 13
- Position: #854 / 2138
- 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 - 985 entries
There's something special about the input order.
- Best score: 10
- Best player score: 11
- Position: #138 / 260
- 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 - 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: 12
- Position: #106 / 246
- Number of attempts: 10
One to Ten - 2227 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 / 677
- Number of attempts: 3
Line under headers - 2059 entries
Put a line under each header, and remove the other markdown formatting.
- Best score: 24
- Best player score: 27
- Position: #197 / 507
- Number of attempts: 5
Increment each number - 1025 entries
Increment each number individually by one
- Best score: 15
- Best player score: 21
- Position: #180 / 249
- Number of attempts: 1
citizen_hacks_2019_challenge6 - 65 entries
For the Citizen Hacks 2019 Vim competition.
- Best score: 3
- Best player score: 3
- Position: #36 / 51
- 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 - 1182 entries
Change the order so that the groups of fruit come before the vegetables.
- Best score: 14
- Best player score: 15
- Position: #122 / 265
- Number of attempts: 6
Array transposition - 2425 entries
Transpose two arrays into one.
- Best score: 16
- Best player score: 17
- Position: #170 / 449
- Number of attempts: 8
Swap assigned value - 655 entries
Simple problem but looking for interesting solutions.
- Best score: 10
- Best player score: 11
- Position: #191 / 256
- Number of attempts: 6
Collect List - 4305 entries
Convert to comma separated list.
- Best score: 12
- Best player score: 12
- Position: #513 / 1191
- 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 - 1658 entries
Put 3 spaces between adjacent letters.
- Best score: 15
- Best player score: 16
- Position: #135 / 445
- Number of attempts: 6
Line 'em up! - 421 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 / 114
- Number of attempts: 14
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: 13
- Position: #98 / 247
- Number of attempts: 4
I forgot quotes - 16014 entries
Oops.
- Best score: 10
- Best player score: 11
- Position: #1239 / 4188
- 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- - 3216 entries
Put hyphens everywhere.
- Best score: 13
- Best player score: 14
- Position: #425 / 1138
- 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 - 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: 12
- Position: #239 / 586
- 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 ! - 10682 entries
A HAPPY NEW YEAR 2014 !
- Best score: 11
- Best player score: 12
- Position: #2503 / 3689
- Number of attempts: 2
Letter case trickery - 1630 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 / 518
- Number of attempts: 7
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: #346 / 1079
- Number of attempts: 3
Words in parens - 12967 entries
We should all ace this, right?
- Best score: 13
- Best player score: 14
- Position: #1164 / 3969
- Number of attempts: 4
Harder than "abcd > a b c d" - 104 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 / 46
- 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 - 529 entries
Transform the series of words into a list.
- Best score: 19
- Best player score: 20
- Position: #57 / 196
- Number of attempts: 3
The name of the game - 668 entries
End up with the name of the game.
- Best score: 11
- Best player score: 12
- Position: #324 / 361
- 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 - 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: 17
- Position: #36 / 75
- Number of attempts: 3
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: 21
- Position: #126 / 480
- Number of attempts: 8
Let's play some Ivmgolf - 1122 entries
Oops, I spelled that wrong.
- Best score: 7
- Best player score: 9
- Position: #327 / 446
- Number of attempts: 4
Vertical Limit - 2551 entries
transform a succession of one word lines to a an array of strings
- Best score: 21
- Best player score: 22
- Position: #182 / 756
- Number of attempts: 5
Exchanging Quotes - 858 entries
Sometimes you need to exchange a choice of quotes in some code.
- Best score: 30
- Best player score: 31
- Position: #43 / 230
- Number of attempts: 7
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: #222 / 778
- Number of attempts: 7
Switch function arguments - 2140 entries
How to switch two arguments of a function.
- Best score: 11
- Best player score: 12
- Position: #325 / 664
- Number of attempts: 2
Append semicolon after expressions - 1056 entries
Some lines need the semicolon, some don't.
- Best score: 11
- Best player score: 12
- Position: #254 / 419
- Number of attempts: 1
switch variable - 5079 entries
how fast can you switch two variable ?
- Best score: 11
- Best player score: 12
- Position: #1000 / 1749
- Number of attempts: 2
The meaning - 575 entries
Numbers are fun!
- Best score: 5
- Best player score: 5
- Position: #298 / 363
- Number of attempts: 1
Make it more readable - 2009 entries
Insert blank lines to make it more organized and readable
- Best score: 13
- Best player score: 14
- Position: #197 / 652
- Number of attempts: 4
Line Zipper - 477 entries
Zip/pair related lines.
- Best score: 12
- Best player score: 13
- Position: #64 / 216
- Number of attempts: 6
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: 18
- Position: #106 / 336
- 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 - 1935 entries
Pretty simple, number the list.
- Best score: 13
- Best player score: 17
- Position: #115 / 654
- Number of attempts: 5
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: 13
- Position: #186 / 407
- Number of attempts: 4
Shebangs for all - 2016 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: #158 / 518
- Number of attempts: 5
A Simple One - 1057 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 / 667
- Number of attempts: 1
The Cake is a Lie - 1361 entries
Correct the capitalization of each word
- Best score: 9
- Best player score: 10
- Position: #389 / 531
- Number of attempts: 4
Compile C - 430 entries
You might have to get clever to do this one.
- Best score: 19
- Best player score: 20
- Position: #30 / 141
- Number of attempts: 12
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: 35
- Position: #144 / 209
- Number of attempts: 2
Get rid of html tags - 407 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 / 236
- Number of attempts: 2
Change the content of a string - 1591 entries
This docstring is a complete lie. Fix it.
- Best score: 22
- Best player score: 23
- Position: #312 / 593
- 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: 34
- Position: #378 / 575
- Number of attempts: 2
Reconstruct the Sentence - 1589 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: 21
- Position: #244 / 425
- Number of attempts: 5
Simple text editing with Vim - 12971 entries
Make the pairs of lines match up by making each second line same as first
- Best score: 13
- Best player score: 14
- Position: #1907 / 3733
- Number of attempts: 4
Reformat/Refactor a Golfer Class - 7150 entries
A simple case of removing unneeded code and fixing broken indentation.
- Best score: 28
- Best player score: 33
- Position: #269 / 1753
- Number of attempts: 7
Contributed Challenges
Fill in the chess board - 959 entries
Fill in the name of each square using its file (a-h) and rank (1-8).