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

From brakets to parens - 802 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: 37
  • Position: #102 / 182
  • Number of attempts: 3
Create json from a .env file - 1456 entries

A simple everyday task.

  • Best score: 39
  • Best player score: 71
  • Position: #225 / 339
  • Number of attempts: 1
Reordering properties - 1110 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: 101
  • Position: #187 / 260
  • Number of attempts: 1
Changing date formats - 680 entries

Change the date format to Y/M/D.

  • Best score: 37
  • Best player score: 1135
  • Position: #185 / 185
  • Number of attempts: 1
YAML to dotenv - 1345 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 26
  • Position: #159 / 281
  • Number of attempts: 7
Change to ascending order - 483 entries

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

  • Best score: 17
  • Best player score: 153
  • Position: #101 / 117
  • Number of attempts: 1
Swap columns and transform to CSV format - 407 entries

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

  • Best score: 16
  • Best player score: 317
  • Position: #150 / 150
  • Number of attempts: 1
Generate an entry for each month - 360 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: 138
  • Position: #84 / 88
  • Number of attempts: 2
Fix the git merge conflicts - 308 entries

Solve the merge conflicts in the Python file

  • Best score: 36
  • Best player score: 67
  • Position: #62 / 85
  • Number of attempts: 1
Reorganize Pokémon - 736 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 33
  • Position: #185 / 204
  • Number of attempts: 1
Remove adjacent duplicates - 658 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 21
  • Position: #55 / 164
  • Number of attempts: 6
Rearrange array to single level - 1684 entries

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

  • Best score: 14
  • Best player score: 40
  • Position: #229 / 281
  • Number of attempts: 4
Rearrange array to one line - 799 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #61 / 187
  • Number of attempts: 3
Copy punctuation - 679 entries

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

  • Best score: 19
  • Best player score: 82
  • Position: #145 / 164
  • Number of attempts: 1
New teacher - 1453 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 30
  • Position: #228 / 304
  • Number of attempts: 5
months to html list items - 1119 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 38
  • Position: #273 / 303
  • Number of attempts: 2
EDN reformat - 1209 entries

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

  • Best score: 17
  • Best player score: 72
  • Position: #160 / 170
  • Number of attempts: 2
Python dataclasses - 1237 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 36
  • Position: #265 / 309
  • Number of attempts: 5
swap number pairs - 2162 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 44
  • Position: #343 / 391
  • Number of attempts: 1
Multiline to Single Line - 750 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 5
  • Position: #261 / 319
  • Number of attempts: 4
Yo To Hello - 1154 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 10
  • Position: #408 / 535
  • Number of attempts: 2
prepend * to every non-blank line - 6366 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 12
  • Position: #816 / 1555
  • Number of attempts: 6
Add semicolons - 10916 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 12
  • Position: #1968 / 3085
  • Number of attempts: 3
Collect List - 4317 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 18
  • Position: #1097 / 1194
  • Number of attempts: 3
lovebigwei
Github:

entered into 24 challenges

contributed 0 challenges