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 - 196 entries

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

  • Best score: 15
  • Best player score: 16
  • Position: #23 / 70
  • Number of attempts: 3
Filling braces - 481 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: 21
  • Best player score: 24
  • Position: #13 / 157
  • Number of attempts: 6
Even and Odd - 393 entries

separate the even numbers from the odd numbers

  • Best score: 13
  • Best player score: 14
  • Position: #22 / 101
  • Number of attempts: 3
Modifying .XCompose - 104 entries

You just wrote some lines in .XCompose, but now you want the compose sequences to be more verbose. Change the compose sequence for each Greek letter to its name.

  • Best score: 33
  • Best player score: 35
  • Position: #11 / 28
  • Number of attempts: 6
hexagram binary tree - 128 entries

generate the binary tree that represents all possible hexagrams found in the book of changes (易经)

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

Swap function parameters and delete all comments in python.

  • Best score: 19
  • Best player score: 19
  • Position: #33 / 263
  • Number of attempts: 9
Delete the last function argument in python. - 729 entries

Delete the last function argument in this python script.

  • Best score: 6
  • Best player score: 6
  • Position: #108 / 261
  • Number of attempts: 2
Flip All Bits - 503 entries

Perform a bitwise NOT operation on each bit, meaning that bits that are 0 become 1, and those that are 1 become 0.

  • Best score: 24
  • Best player score: 42
  • Position: #73 / 144
  • Number of attempts: 4
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: 59
  • Position: #18 / 60
  • Number of attempts: 8
Convert list of enums to list of localization terms - 262 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: 97
  • Position: #17 / 74
  • Number of attempts: 15
From brakets to parens - 1356 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: 26
  • Position: #79 / 309
  • Number of attempts: 5
π - 344 entries

1200 π chars

  • Best score: 16
  • Best player score: 16
  • Position: #16 / 84
  • Number of attempts: 9
Create json from a .env file - 1773 entries

A simple everyday task.

  • Best score: 38
  • Best player score: 44
  • Position: #95 / 431
  • Number of attempts: 7
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: 48
  • Position: #80 / 302
  • Number of attempts: 8
Sort and Tag - 738 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: 84
  • Position: #75 / 157
  • Number of attempts: 3
Changing date formats - 774 entries

Change the date format to Y/M/D.

  • Best score: 36
  • Best player score: 78
  • Position: #102 / 213
  • Number of attempts: 11
YAML to dotenv - 1654 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 22
  • Position: #151 / 347
  • Number of attempts: 7
Change to ascending order - 566 entries

Change each line of numbers consistently from descending to ascending order.

  • Best score: 17
  • Best player score: 44
  • Position: #63 / 138
  • Number of attempts: 2
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: #81 / 184
  • Number of attempts: 4
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: 59
  • Position: #68 / 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: 58
  • Position: #62 / 111
  • Number of attempts: 6
Replace markdown sections with numbering - 348 entries

Replace each section and subsection with their respective numbers

  • Best score: 29
  • Best player score: 49
  • Position: #28 / 93
  • Number of attempts: 5
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: #48 / 160
  • Number of attempts: 6
Replace csv column if it's not empty - 317 entries

Replace the credit_score_percentile column with the value 0.0 but leave the empty ones untouched

  • Best score: 15
  • Best player score: 15
  • Position: #42 / 103
  • Number of attempts: 8
Convert plain text into a markdown table - 117 entries

Convert the table to markdown to make it more usable

  • Best score: 56
  • Best player score: 132
  • Position: #24 / 35
  • Number of attempts: 3
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: 69
  • Position: #17 / 31
  • Number of attempts: 9
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: 19
  • Position: #80 / 308
  • Number of attempts: 17
New teacher - 1534 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 21
  • Position: #67 / 322
  • Number of attempts: 7
EDN reformat - 1233 entries

The goal is to make the code more readable and concise while maintaining its functionality.

  • Best score: 17
  • Best player score: 41
  • Position: #146 / 174
  • Number of attempts: 8
MartinDanesh
Github:

entered into 29 challenges

contributed 0 challenges