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 - 1290 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: 25
  • Position: #57 / 290
  • Number of attempts: 5
Create json from a .env file - 1682 entries

A simple everyday task.

  • Best score: 38
  • Best player score: 39
  • Position: #37 / 411
  • Number of attempts: 5
Reordering properties - 1368 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: 24
  • Position: #15 / 296
  • Number of attempts: 19
Sort and Tag - 731 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: 61
  • Position: #54 / 154
  • Number of attempts: 3
Changing date formats - 749 entries

Change the date format to Y/M/D.

  • Best score: 36
  • Best player score: 55
  • Position: #54 / 210
  • Number of attempts: 1
YAML to dotenv - 1617 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 21
  • Position: #125 / 339
  • Number of attempts: 5
Reorganize Pokémon - 875 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 18
  • Position: #43 / 240
  • Number of attempts: 6
Remove adjacent duplicates - 727 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 19
  • Position: #22 / 182
  • Number of attempts: 7
Rearrange array to single level - 1829 entries

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

  • Best score: 14
  • Best player score: 28
  • Position: #177 / 307
  • Number of attempts: 1
Rearrange array to one line - 889 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #32 / 205
  • Number of attempts: 8
Copy punctuation - 739 entries

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

  • Best score: 19
  • Best player score: 19
  • Position: #20 / 181
  • Number of attempts: 9
Reformat/Refactor a Golfer Class - 7681 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 7
  • Best player score: 50
  • Position: #1497 / 1889
  • Number of attempts: 1
Alastair
Github:

entered into 12 challenges

contributed 0 challenges