Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put [challenge ID]

Played Challenges

Filename Flip - 165 entries

Rearrange the MP3 filenames so that the identifier comes before the name.

  • Best score: 15
  • Best player score: 15
  • Position: #6 / 58
  • Number of attempts: 1
Filling braces - 463 entries

Inspired by a question on CoDidact (https://software.codidact.com/posts/296501), I wondered if Vim could offer a satisfactory ‘solution’ to this problem.

  • Best score: 24
  • Best player score: 24
  • Position: #24 / 151
  • Number of attempts: 1
Even and Odd - 389 entries

separate the even numbers from the odd numbers

  • Best score: 13
  • Best player score: 14
  • Position: #30 / 100
  • Number of attempts: 1
Swap function parameters and delete all comments in python. - 1067 entries

Swap function parameters and delete all comments in python.

  • Best score: 19
  • Best player score: 20
  • Position: #78 / 261
  • Number of attempts: 2
Find the devices that have no revoked time, and extract out the duration left on their leases. - 255 entries

Extract non-revoked devices and the duration of their leases.

  • Best score: 49
  • Best player score: 50
  • Position: #5 / 60
  • Number of attempts: 5
From brakets to parens - 1349 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: 25
  • Position: #69 / 307
  • Number of attempts: 2
Reordering properties - 1385 entries

Arrange the CSS lines for the #topbar selector based on their complete line length, from shortest to longest.

  • Best score: 24
  • Best player score: 25
  • Position: #19 / 302
  • Number of attempts: 1
YAML to dotenv - 1654 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 16
  • Position: #73 / 347
  • Number of attempts: 1
Swap columns and transform to CSV format - 516 entries

Turn this spreadsheet output into a CSV file but first swap the columns

  • Best score: 16
  • Best player score: 17
  • Position: #86 / 184
  • Number of attempts: 2
Generate an entry for each month - 398 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: #7 / 102
  • Number of attempts: 1
Fix the git merge conflicts - 394 entries

Solve the merge conflicts in the Python file

  • Best score: 36
  • Best player score: 38
  • Position: #13 / 111
  • Number of attempts: 1
Change class fields from camel case to snake case - 678 entries

This is the reverse of the previous challenge: https://www.vimgolf.com/challenges/9v006705493c000000000513

  • Best score: 18
  • Best player score: 18
  • Position: #52 / 160
  • Number of attempts: 1
Change class fields from snake case to camel case - 336 entries

Change the class fields in this Scala class from snake case to camel case

  • Best score: 13
  • Best player score: 13
  • Position: #78 / 127
  • Number of attempts: 1
Reorganize Pokémon - 898 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 18
  • Position: #46 / 250
  • Number of attempts: 1
CaN yOuR ViM dO ThAt? #2 - 117 entries

Tsoding's famous "Can your Vim do that?" https://www.youtube.com/watch?v=F4xc4jQO7ck&t=1429s

  • Best score: 49
  • Best player score: 49
  • Position: #9 / 31
  • Number of attempts: 1
CaN yOuR ViM dO ThAt? #1 - 309 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: #26 / 123
  • Number of attempts: 1
Append leading hyphen count to each line - 157 entries

Append the number of leading hyphens to the end of each line.

  • Best score: 23
  • Best player score: 27
  • Position: #29 / 43
  • Number of attempts: 1
Markdown Blog Editing - 488 entries

Convert the given link text in start file to a markdown link list.

  • Best score: 30
  • Best player score: 30
  • Position: #14 / 119
  • Number of attempts: 1
Word completion - 329 entries

Try to complete these options within 20 keystrokes.

  • Best score: 20
  • Best player score: 21
  • Position: #18 / 87
  • Number of attempts: 1
Fix timezone format - 385 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: #41 / 126
  • Number of attempts: 1
Remove adjacent duplicates - 732 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 19
  • Position: #24 / 187
  • Number of attempts: 1
Move to corresponding lines - 335 entries

Move the values to the corresponding lines.

  • Best score: 16
  • Best player score: 18
  • Position: #22 / 77
  • Number of attempts: 1
Rearrange array to single level - 1832 entries

The goal is to flatten the array into a single list and remove any empty elements.

  • Best score: 14
  • Best player score: 16
  • Position: #46 / 308
  • Number of attempts: 1
Rearrange array to one line - 907 entries

Rearrange the array content on only one line, and remove trailing commas

  • Best score: 13
  • Best player score: 13
  • Position: #38 / 209
  • Number of attempts: 1
Copy punctuation - 760 entries

I want to copy the last line’s brackets, quotes, and commas to each line. How?

  • Best score: 19
  • Best player score: 21
  • Position: #28 / 188
  • Number of attempts: 1
Column wise pasting - 282 entries

Make a table from 3 columns

  • Best score: 17
  • Best player score: 25
  • Position: #27 / 63
  • Number of attempts: 1
Hawsqazrit
Github:

entered into 26 challenges

contributed 0 challenges