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

A simple everyday task.

  • Best score: 38
  • Best player score: 39
  • Position: #37 / 390
  • Number of attempts: 5
Reordering properties - 1275 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 / 286
  • Number of attempts: 19
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: 61
  • Position: #52 / 146
  • Number of attempts: 3
Changing date formats - 713 entries

Change the date format to Y/M/D.

  • Best score: 37
  • Best player score: 55
  • Position: #52 / 198
  • Number of attempts: 1
YAML to dotenv - 1557 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 21
  • Position: #119 / 322
  • Number of attempts: 5
Reorganize Pokémon - 837 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 18
  • Position: #43 / 230
  • 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: 19
  • Position: #22 / 175
  • Number of attempts: 7
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: 28
  • Position: #175 / 303
  • Number of attempts: 1
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: 13
  • Position: #32 / 201
  • Number of attempts: 8
Copy punctuation - 723 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 / 176
  • Number of attempts: 9
Reformat/Refactor a Golfer Class - 7579 entries

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

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

entered into 12 challenges

contributed 0 challenges