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

Convert list of enums to list of localization terms - 105 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: 179
  • Position: #33 / 35
  • Number of attempts: 3
From brakets to parens - 932 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: 72
  • Position: #203 / 215
  • Number of attempts: 4
Create json from a .env file - 1518 entries

A simple everyday task.

  • Best score: 39
  • Best player score: 77
  • Position: #256 / 353
  • Number of attempts: 2
Reordering properties - 1136 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: 121
  • Position: #230 / 269
  • Number of attempts: 1
Sort and Tag - 676 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: 79
  • Position: #64 / 140
  • Number of attempts: 5
Changing date formats - 687 entries

Change the date format to Y/M/D.

  • Best score: 37
  • Best player score: 189
  • Position: #179 / 188
  • Number of attempts: 1
YAML to dotenv - 1459 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 26
  • Position: #171 / 298
  • Number of attempts: 11
Swap columns and transform to CSV format - 426 entries

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

  • Best score: 16
  • Best player score: 21
  • Position: #110 / 154
  • Number of attempts: 8
Generate an entry for each month - 369 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: 83
  • Position: #77 / 91
  • Number of attempts: 2
The Fibonacci Spacer - 157 entries

Split the words, remove punctuation and add spaces before each line following the Fibonacci sequence (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89)

  • Best score: 25
  • Best player score: 62
  • Position: #32 / 47
  • Number of attempts: 3
Reorganize Pokémon - 772 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 24
  • Position: #157 / 214
  • Number of attempts: 7
Convert plain text into a markdown table - 87 entries

Convert the table to markdown to make it more usable

  • Best score: 56
  • Best player score: 115
  • Position: #19 / 28
  • Number of attempts: 4
extract struct tag in go - 149 entries

Can you extract all struct tags in the fewest keystrokes possible?

  • Best score: 29
  • Best player score: 71
  • Position: #36 / 41
  • 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: 50
  • Position: #86 / 100
  • Number of attempts: 1
Move list of uuids into a SQL query - 227 entries

Take the list of UUIDs and use them as a filter in the where statement of a SQL query

  • Best score: 57
  • Best player score: 77
  • Position: #67 / 73
  • Number of attempts: 9
Search different SQL column with similar where clause - 322 entries

Replace a column in the where clause and convert all numbers from text to numeric, by replacing the leading 0 with the code 359.

  • Best score: 22
  • Best player score: 32
  • Position: #61 / 74
  • Number of attempts: 1
Rearrange array to single level - 1737 entries

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

  • Best score: 14
  • Best player score: 27
  • Position: #159 / 290
  • Number of attempts: 3
Rearrange array to one line - 807 entries

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

  • Best score: 13
  • Best player score: 31
  • Position: #161 / 190
  • Number of attempts: 5
Copy punctuation - 684 entries

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

  • Best score: 19
  • Best player score: 45
  • Position: #114 / 167
  • Number of attempts: 1
Populate 3D bone names list - 652 entries

Ran into this at work, excited to see how this gets optimized

  • Best score: 21
  • Best player score: 38
  • Position: #146 / 168
  • Number of attempts: 2
Find fix point of cos - 1468 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

  • Best score: 14
  • Best player score: 21
  • Position: #338 / 431
  • Number of attempts: 3
Insert column data on Confluence-style table - 500 entries

Add ip addresses into new "IP" column based on the last digits from the "Server" column

  • Best score: 33
  • Best player score: 86
  • Position: #92 / 112
  • Number of attempts: 1
Many duplicates - 1472 entries

Quick and easy

  • Best score: 7
  • Best player score: 16
  • Position: #463 / 480
  • Number of attempts: 2
delete swap - 1834 entries

delete all swap

  • Best score: 5
  • Best player score: 14
  • Position: #525 / 570
  • Number of attempts: 3
Making 3 line function a one liner. - 343 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 8
  • Position: #203 / 211
  • Number of attempts: 2
Alphabet soup - 445 entries

Create a column of all alphabet characters organized in a funky way

  • Best score: 25
  • Best player score: 52
  • Position: #110 / 111
  • Number of attempts: 2
Dani Bengl
Github:

entered into 26 challenges

contributed 0 challenges