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

Create json from a .env file - 1716 entries

A simple everyday task.

  • Best score: 38
  • Best player score: 46
  • Position: #104 / 416
  • Number of attempts: 3
Reordering properties - 1372 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: 56
  • Position: #96 / 298
  • Number of attempts: 1
Sort and Tag - 737 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: 79
  • Position: #68 / 156
  • Number of attempts: 3
Changing date formats - 751 entries

Change the date format to Y/M/D.

  • Best score: 36
  • Best player score: 52
  • Position: #41 / 211
  • Number of attempts: 1
YAML to dotenv - 1637 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 22
  • Position: #133 / 342
  • Number of attempts: 2
Change to ascending order - 549 entries

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

  • Best score: 17
  • Best player score: 49
  • Position: #71 / 134
  • Number of attempts: 1
Swap columns and transform to CSV format - 494 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #33 / 177
  • Number of attempts: 1
Append leading hyphen count to each line - 148 entries

Append the number of leading hyphens to the end of each line.

  • Best score: 23
  • Best player score: 25
  • Position: #19 / 41
  • Number of attempts: 4
Quicksort - 2113 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 25
  • Position: #303 / 472
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1688 entries

Goal is to put a newline after every 10 lines in vim.

  • Best score: 10
  • Best player score: 37
  • Position: #548 / 567
  • Number of attempts: 2
Increment number for every 10 lines - 247 entries

The file consists of 2 columns (code and percentage). We need to add 2 more columns with increasing number for 4th column (Xcols) and increment 3rd column (Ycols) only for every 10 lines with reset of 4th column

  • Best score: 25
  • Best player score: 70
  • Position: #55 / 67
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 1161 entries

For each line replace a search pattern (in this case $) with numbers starting at 1 and then increasing by 1 for each replaced match. a$b$c$ -> a0b1c2

  • Best score: 21
  • Best player score: 94
  • Position: #234 / 235
  • Number of attempts: 1
Add Go XML to structure tags - 211 entries

The Go programming language can directly map XML to structure fields. Add the correct XML tag after each field.

  • Best score: 23
  • Best player score: 29
  • Position: #43 / 77
  • Number of attempts: 2
Resort and deup a CSV list - 187 entries

I'm always adding items to a sorted list. There has to be a better way dedup and resort the lists. There are multiple lists with varying lengths to discourage manual sorting. Also Australia's animals are weird.

  • Best score: 44
  • Best player score: 69
  • Position: #35 / 47
  • Number of attempts: 3
Line Zipper - 480 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 13
  • Position: #68 / 217
  • Number of attempts: 4
The holy-grail may help - 405 entries

Can you find it in less than 20 strokes, Arthur?

  • Best score: 16
  • Best player score: 16
  • Position: #163 / 221
  • Number of attempts: 2
Reverse and count - 501 entries

Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.

  • Best score: 18
  • Best player score: 18
  • Position: #19 / 181
  • Number of attempts: 3
ashfinal
Github:

entered into 17 challenges

contributed 0 challenges