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 - 1156 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 / 251
  • Number of attempts: 5
Create json from a .env file - 1593 entries

A simple everyday task.

  • Best score: 39
  • Best player score: 39
  • Position: #36 / 381
  • Number of attempts: 5
Reordering properties - 1257 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 / 281
  • 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 - 710 entries

Change the date format to Y/M/D.

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

Convert this YAML config file to a .env file.

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

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 18
  • Position: #43 / 227
  • 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 - 1797 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: #174 / 301
  • Number of attempts: 1
Rearrange array to one line - 852 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #32 / 199
  • Number of attempts: 8
Copy punctuation - 719 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 / 174
  • Number of attempts: 9
Reformat/Refactor a Golfer Class - 7573 entries

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

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

entered into 12 challenges

contributed 0 challenges