Played Challenges
Find the devices that have no revoked time, and extract out the duration left on their leases. - 31 entries
Extract non-revoked devices and the duration of their leases.
- Best score: 50
- Best player score: 63
- Position: #5 / 15
- Number of attempts: 1
Convert list of enums to list of localization terms - 88 entries
While making my game Piloteer, I had a large list of TaskTypes and needed to convert them to an equivalent list of localization terms, to be used when translating the game's text into different languages.
- Best score: 75
- Best player score: 99
- Position: #8 / 30
- Number of attempts: 5
From brakets to parens - 885 entries
This is one of the most common problem when you wrap an array for error handling. Vim is useful when you convert foo[i][j][k] into foo(i, j, k) for many times.
- Best score: 24
- Best player score: 40
- Position: #132 / 207
- Number of attempts: 1
Create json from a .env file - 1490 entries
A simple everyday task.
- Best score: 39
- Best player score: 48
- Position: #104 / 348
- Number of attempts: 3
Sort and Tag - 675 entries
The goal is to sort these lines alphabetically, assign a unique identifier to each line in the format "[01]", "[02]", etc., and then restore the original order of the lines while preserving the assigned identifiers.
- Best score: 36
- Best player score: 71
- Position: #55 / 139
- Number of attempts: 4
Changing date formats - 686 entries
Change the date format to Y/M/D.
- Best score: 37
- Best player score: 91
- Position: #119 / 187
- Number of attempts: 4
YAML to dotenv - 1436 entries
Convert this YAML config file to a .env file.
- Best score: 16
- Best player score: 22
- Position: #128 / 296
- Number of attempts: 2
Swap columns and transform to CSV format - 411 entries
Turn this spreadsheet output into a CSV file but first swap the columns
- Best score: 16
- Best player score: 17
- Position: #70 / 152
- Number of attempts: 4
Generate an entry for each month - 364 entries
The input file contains a URI with a month in it. Generate the URIs for all the other months up to a couple of years
- Best score: 27
- Best player score: 31
- Position: #5 / 90
- Number of attempts: 4
Fix the git merge conflicts - 311 entries
Solve the merge conflicts in the Python file
- Best score: 36
- Best player score: 53
- Position: #33 / 88
- Number of attempts: 2
CaN yOuR ViM dO ThAt? #1 - 256 entries
Tsoding's famous "Can your Vim do that?" https://youtu.be/Bafo3hhheHU?si=DfcT4sUEMTSAevnx&t=1091
- Best score: 41
- Best player score: 41
- Position: #24 / 100
- Number of attempts: 3
Fix timezone format - 324 entries
Add the missing T and Z in the datetime field. There should be a T instead of the space, and a Z at the end of the datetime. `2024-08-31 18:32:00;` -> `2024-08-31T18:32:00Z;`
- Best score: 15
- Best player score: 16
- Position: #37 / 104
- Number of attempts: 3
Rearrange array to single level - 1714 entries
The goal is to flatten the array into a single list and remove any empty elements.
- Best score: 14
- Best player score: 14
- Position: #20 / 287
- Number of attempts: 11
Rearrange array to one line - 805 entries
Rearrange the array content on only one line, and remove trailing commas
- Best score: 13
- Best player score: 13
- Position: #30 / 189
- Number of attempts: 10
Count words - 112 entries
Merge duplicates and count each word.
- Best score: 39
- Best player score: 42
- Position: #8 / 25
- Number of attempts: 9
Format a long line - 125 entries
Reformat long lines (gq), textwidth=78, no trailing spaces.
- Best score: 17
- Best player score: 24
- Position: #18 / 34
- Number of attempts: 6
Find anomalies - 163 entries
There is one special character per line
- Best score: 30
- Best player score: 70
- Position: #36 / 44
- Number of attempts: 2
Pick and sort servers from mirror list - 458 entries
Retrieve the primary server for each country from a mirror list file and organize them alphabetically by country name. Given a mirror list file containing server information for various countries, the objective is to extract the primary server from each country and then arrange these servers in alphabetical order based on the respective country names.
- Best score: 28
- Best player score: 29
- Position: #25 / 91
- Number of attempts: 7
Remove line numbers - 778 entries
From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.
- Best score: 8
- Best player score: 12
- Position: #85 / 205
- Number of attempts: 5
Surround the 'z' character with brackets, quotes, and print as formatted string. - 575 entries
Surround the 'z' character with brackets, quotes, and print as formatted string.
- Best score: 17
- Best player score: 17
- Position: #247 / 323
- Number of attempts: 1
Paste a column after a column - 2662 entries
This task is very common while using multi-cursor. What is the elegant vim way ?
- Best score: 14
- Best player score: 14
- Position: #116 / 576
- Number of attempts: 8
Reformat symbols in list - 1648 entries
Saw this in some lecture, easy reformatting using multiple cursor in VS Code
- Best score: 24
- Best player score: 27
- Position: #172 / 354
- Number of attempts: 2
delete swap - 1834 entries
delete all swap
- Best score: 5
- Best player score: 5
- Position: #393 / 570
- Number of attempts: 5
Fix the shell script! - 2663 entries
Fix the shell script with the fewest keystrokes!
- Best score: 26
- Best player score: 31
- Position: #286 / 619
- Number of attempts: 1
Put a newline after every 10 lines in vim - 1678 entries
Goal is to put a newline after every 10 lines in vim.
- Best score: 10
- Best player score: 12
- Position: #249 / 563
- Number of attempts: 3
Wikitext headings to markdown - 1029 entries
Convert the wikitext headings to markdown.
- Best score: 20
- Best player score: 20
- Position: #54 / 213
- Number of attempts: 3
hello-world-vimgolf - 2523 entries
Simple number generation
- Best score: 10
- Best player score: 10
- Position: #350 / 722
- Number of attempts: 3
Simple, Practical, and Common - 33927 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: #2428 / 7488
- Number of attempts: 7
Swap values - 4667 entries
Well, swap the values...
- Best score: 11
- Best player score: 12
- Position: #531 / 1284
- Number of attempts: 4
Wget failed to download redirections - 213 entries
Output of a wget session, where 302 where not properly handled due to certificate problems, has been saved to a file. Keep the correct URLs to start again downloading.
- Best score: 15
- Best player score: 15
- Position: #14 / 68
- Number of attempts: 7
Com(m)a Trouble - 3960 entries
Someone was real stupid when placing his commas. Can you fix it?
- Best score: 12
- Best player score: 12
- Position: #187 / 900
- Number of attempts: 1
Wrap the text of an email message to 79 characters - 851 entries
You're replying to an email with silly long lines. Clean them up.
- Best score: 5
- Best player score: 5
- Position: #343 / 440
- Number of attempts: 1
Search and Replace 0 - 5042 entries
Replace every instance of 'aaa' with 'xaaax'.
- Best score: 12
- Best player score: 12
- Position: #757 / 1643
- Number of attempts: 2
Just the middle - 11555 entries
Delete the instructions at the top and bottom.
- Best score: 7
- Best player score: 8
- Position: #3240 / 4234
- Number of attempts: 1
Python Hello World! Reformatting - 1011 entries
A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.
- Best score: 39
- Best player score: 44
- Position: #264 / 387
- Number of attempts: 1
Free hyphen! - 182 entries
Just like "Inner hyphens", but I'm giving you a free hyphen to play with. Will your solution be any different?
- Best score: 9
- Best player score: 9
- Position: #38 / 92
- Number of attempts: 2
comments galore - 1074 entries
Basic comment reformatting
- Best score: 10
- Best player score: 10
- Position: #312 / 430
- Number of attempts: 1
Separating firstname & lastname - 172 entries
Seperate named with equal tabs.
- Best score: 19
- Best player score: 20
- Position: #14 / 60
- Number of attempts: 6
Mute the second method of this script - 456 entries
prepend a # infront of every line of the second method
- Best score: 8
- Best player score: 9
- Position: #151 / 240
- Number of attempts: 1
I forgot quotes - 16127 entries
Oops.
- Best score: 10
- Best player score: 14
- Position: #2061 / 4208
- Number of attempts: 2
Execute immediate SQL - 92 entries
Sql string tranformation ...
- Best score: 58
- Best player score: 75
- Position: #23 / 33
- Number of attempts: 2
Changing URL path in CSS - 144 entries
What's the quickest way to swap out all the URLs in a CSS file? Is it wasted keystrokes using look-behinds and look-aheads? (I'm sorry for the delete/report--I made a mistake with the last one requiring an ugly search for graphic to replace with images. I just intended this to be a simple search and replace that might possibly generate some macros or normals solutions that are quicker)
- Best score: 40
- Best player score: 56
- Position: #54 / 65
- Number of attempts: 1
Cleanining up 80 column concatenated text - 207 entries
1. Put the whole query on one line, remove the concatenation operators 2. Remove the double spaces that appear a few times in the query 3. Use string-interpolated variable statementPid rather than the ugly concatenation
- Best score: 31
- Best player score: 48
- Position: #62 / 81
- Number of attempts: 1
Convert pandoc unordered list to a numbered list - 168 entries
I know it's possible to use #. in pandoc to auto-generate numbered lists, but then it's not easy to tell how many items there are when reading it in Markdown. How fast can you make the switch?
- Best score: 20
- Best player score: 22
- Position: #12 / 58
- Number of attempts: 2
Vertical Limit - 2608 entries
transform a succession of one word lines to a an array of strings
- Best score: 21
- Best player score: 26
- Position: #517 / 770
- Number of attempts: 1
Aligning function arguments to match a specific coding style - 265 entries
Most projects have specific coding style guidelines. In this case, the argument list must be broken into a new line for each argument, with the argument names right aligned, taking into account pointers.
- Best score: 16
- Best player score: 18
- Position: #40 / 73
- Number of attempts: 6
replacing each line of a block selection - 3026 entries
replace each line's ../assets/js with /javascripts
- Best score: 18
- Best player score: 19
- Position: #236 / 783
- Number of attempts: 5
Remove noise from HTTP log - 732 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: 16
- Position: #203 / 278
- Number of attempts: 1
Remove semicolons after expressions - 669 entries
A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.
- Best score: 6
- Best player score: 6
- Position: #140 / 265
- Number of attempts: 6
switch variable - 5101 entries
how fast can you switch two variable ?
- Best score: 11
- Best player score: 12
- Position: #1014 / 1756
- Number of attempts: 1
Ugly spreadsheet copy/paste to CSV - 1015 entries
convert an ugly spreadsheet copy/paste into a CSV format.
- Best score: 19
- Best player score: 26
- Position: #80 / 195
- Number of attempts: 4
Make it more readable - 2015 entries
Insert blank lines to make it more organized and readable
- Best score: 13
- Best player score: 14
- Position: #207 / 654
- Number of attempts: 2
PHP Array Syntax -> MailChimp Merge Syntax - 550 entries
I recently needed to send an e-mail to our marketing department listing allowed merge tags for our MailChimp campaigns. The allowed merge tags were determined from a PHP array in one of our PHP classes. I transformed the PHP class to MailChimp's syntax and sent the e-mail. It was, however, a long, laborious process. I'm still fairly new to Vim and would love to see how an expert Vim user would tackle one of my own, real-world problems. Thanks and have fun!
- Best score: 23
- Best player score: 24
- Position: #48 / 151
- Number of attempts: 5
Case preserving word replacement - 463 entries
Half way through my project, my people turned into dogs. Now I have to change everything in my source.
- Best score: 19
- Best player score: 20
- Position: #83 / 182
- Number of attempts: 7
imports alignment (python) - 704 entries
Align as one import per line.
- Best score: 17
- Best player score: 29
- Position: #150 / 200
- Number of attempts: 1
HTML to Haml - 883 entries
Help convert this HTML page to Haml.
- Best score: 23
- Best player score: 32
- Position: #80 / 206
- Number of attempts: 2
Numbering a List - 1941 entries
Pretty simple, number the list.
- Best score: 13
- Best player score: 13
- Position: #91 / 657
- Number of attempts: 1
The holy-grail may help - 391 entries
Can you find it in less than 20 strokes, Arthur?
- Best score: 16
- Best player score: 16
- Position: #168 / 216
- Number of attempts: 2
Assignment Alignment - 897 entries
line up the operators. Use spaces, not tabs.
- Best score: 18
- Best player score: 19
- Position: #77 / 223
- Number of attempts: 9
Sorting paragraphs - 556 entries
Order the paragraphs correctly, per prefixed index
- Best score: 18
- Best player score: 25
- Position: #60 / 166
- Number of attempts: 4
Context insensitive completion 0 - 594 entries
Buried in the lines you're not supposed to add is the line "Add this line!" Add that line to the top of the file.
- Best score: 6
- Best player score: 7
- Position: #135 / 251
- Number of attempts: 2
Reformat some Python - 635 entries
Fix some very bizarrely laid-out code.
- Best score: 34
- Best player score: 42
- Position: #126 / 242
- Number of attempts: 3
Reformat a C golf submission - 629 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: 28
- Position: #73 / 214
- Number of attempts: 2
Reformat most common surnames - 794 entries
Reformat copy-pasted table into a list of the most common surnames
- Best score: 23
- Best player score: 27
- Position: #99 / 229
- Number of attempts: 5
Get rid of html tags - 440 entries
Want to read more about Vim's background? Then get rid of those html tags...
- Best score: 12
- Best player score: 16
- Position: #31 / 251
- Number of attempts: 2
Change the content of a string - 1736 entries
This docstring is a complete lie. Fix it.
- Best score: 22
- Best player score: 22
- Position: #260 / 635
- Number of attempts: 3
Sort and add attributes - 1552 entries
Sort the states and add the attribute country to each record.
- Best score: 33
- Best player score: 35
- Position: #442 / 599
- Number of attempts: 2
Reconstruct the Sentence - 1690 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: #269 / 444
- Number of attempts: 3
Flodder-challenge - 1436 entries
Replace the text the most efficient and win!
- Best score: 27
- Best player score: 36
- Position: #199 / 366
- Number of attempts: 1
Simple text editing with Vim - 13371 entries
Make the pairs of lines match up by making each second line same as first
- Best score: 13
- Best player score: 16
- Position: #2395 / 3835
- Number of attempts: 3
Reformat/Refactor a Golfer Class - 7480 entries
A simple case of removing unneeded code and fixing broken indentation.
- Best score: 7
- Best player score: 41
- Position: #979 / 1841
- Number of attempts: 4
VimGolf