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

Find the devices that have no revoked time, and extract out the duration left on their leases. - 142 entries

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

  • Best score: 50
  • Best player score: 84
  • Position: #29 / 39
  • Number of attempts: 4
From brakets to parens - 1181 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: 35
  • Position: #118 / 258
  • Number of attempts: 5
Create json from a .env file - 1607 entries

A simple everyday task.

  • Best score: 38
  • Best player score: 51
  • Position: #122 / 390
  • Number of attempts: 5
Reordering properties - 1266 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: 97
  • Position: #202 / 286
  • Number of attempts: 2
Sort and Tag - 688 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: 131
  • Position: #118 / 146
  • Number of attempts: 1
YAML to dotenv - 1557 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 25
  • Position: #172 / 322
  • Number of attempts: 8
Swap columns and transform to CSV format - 452 entries

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

  • Best score: 16
  • Best player score: 27
  • Position: #141 / 164
  • Number of attempts: 2
Generate an entry for each month - 374 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: 77
  • Position: #75 / 93
  • Number of attempts: 4
Replace markdown sections with numbering - 314 entries

Replace each section and subsection with their respective numbers

  • Best score: 29
  • Best player score: 65
  • Position: #46 / 86
  • Number of attempts: 4
Fix the Scala Method - 341 entries

Fix the missing semicolons and the Int type, ensure the floating point division, and remove the unnecessary return.

  • Best score: 2
  • Best player score: 29
  • Position: #82 / 114
  • Number of attempts: 2
Change class fields from snake case to camel case - 315 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #23 / 118
  • Number of attempts: 1
Reorganize Pokémon - 837 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 19
  • Position: #50 / 230
  • Number of attempts: 4
Replace csv column if it's not empty - 276 entries

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

  • Best score: 15
  • Best player score: 19
  • Position: #75 / 94
  • Number of attempts: 3
extract struct tag in go - 155 entries

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

  • Best score: 29
  • Best player score: 33
  • Position: #7 / 46
  • Number of attempts: 3
Append leading hyphen count to each line - 134 entries

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

  • Best score: 23
  • Best player score: 25
  • Position: #21 / 37
  • Number of attempts: 2
Move list of uuids into a SQL query - 236 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: 72
  • Position: #57 / 78
  • Number of attempts: 2
Word completion - 296 entries

Try to complete these options within 20 keystrokes.

  • Best score: 20
  • Best player score: 23
  • Position: #30 / 78
  • Number of attempts: 3
Fix timezone format - 335 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: 15
  • Position: #4 / 110
  • Number of attempts: 7
Search different SQL column with similar where clause - 343 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: 23
  • Position: #21 / 83
  • Number of attempts: 6
Remove adjacent duplicates - 705 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 33
  • Position: #108 / 175
  • Number of attempts: 2
Rearrange array to single level - 1802 entries

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

  • Best score: 14
  • Best player score: 25
  • Position: #138 / 303
  • Number of attempts: 3
Rearrange array to one line - 855 entries

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

  • Best score: 13
  • Best player score: 22
  • Position: #129 / 201
  • Number of attempts: 2
months to html list items - 1135 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 36
  • Position: #266 / 307
  • 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: 37
  • Position: #136 / 168
  • Number of attempts: 2
Remove line numbers - 779 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: 43
  • Position: #179 / 206
  • Number of attempts: 1
Surround the 'z' character with brackets, quotes, and print as formatted string. - 580 entries

Surround the 'z' character with brackets, quotes, and print as formatted string.

  • Best score: 17
  • Best player score: 17
  • Position: #224 / 326
  • 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: 43
  • Position: #488 / 576
  • Number of attempts: 1
Many duplicates - 1481 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #318 / 481
  • Number of attempts: 3

Contributed Challenges

Markdown Blog Editing - 471 entries

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

ak@developer
Github:

entered into 28 challenges

contributed 1 challenges