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 - 611 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: #80 / 139
  • Number of attempts: 3
Create json from a .env file - 1303 entries

A simple everyday task.

  • Best score: 39
  • Best player score: 71
  • Position: #203 / 303
  • Number of attempts: 1
Reordering properties - 1042 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: #173 / 240
  • Number of attempts: 1
Changing date formats - 615 entries

Change the date format to Y/M/D.

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

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 26
  • Position: #148 / 262
  • Number of attempts: 7
Change to ascending order - 448 entries

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

  • Best score: 17
  • Best player score: 153
  • Position: #95 / 109
  • Number of attempts: 1
Swap columns and transform to CSV format - 386 entries

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

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

Solve the merge conflicts in the Python file

  • Best score: 36
  • Best player score: 67
  • Position: #58 / 78
  • Number of attempts: 1
Reorganize Pokémon - 691 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 33
  • Position: #173 / 190
  • Number of attempts: 1
Remove adjacent duplicates - 646 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 21
  • Position: #54 / 162
  • Number of attempts: 6
Rearrange array to single level - 1631 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: #220 / 271
  • Number of attempts: 4
Rearrange array to one line - 758 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #58 / 182
  • Number of attempts: 3
Copy punctuation - 655 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: #140 / 158
  • Number of attempts: 1
New teacher - 1419 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 30
  • Position: #224 / 299
  • Number of attempts: 5
months to html list items - 1108 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 38
  • Position: #271 / 300
  • Number of attempts: 2
EDN reformat - 1193 entries

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

  • Best score: 17
  • Best player score: 72
  • Position: #159 / 169
  • Number of attempts: 2
Python dataclasses - 1229 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 36
  • Position: #264 / 308
  • Number of attempts: 5
swap number pairs - 2146 entries

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

  • Best score: 16
  • Best player score: 44
  • Position: #342 / 390
  • Number of attempts: 1
Multiline to Single Line - 747 entries

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

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

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 10
  • Position: #408 / 534
  • 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