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 - 1518 entries

A simple everyday task.

  • Best score: 39
  • Best player score: 46
  • Position: #92 / 353
  • Number of attempts: 3
Reordering properties - 1136 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: #84 / 269
  • Number of attempts: 1
Sort and Tag - 676 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: #63 / 140
  • Number of attempts: 3
Changing date formats - 687 entries

Change the date format to Y/M/D.

  • Best score: 37
  • Best player score: 52
  • Position: #38 / 188
  • Number of attempts: 1
YAML to dotenv - 1459 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 22
  • Position: #117 / 298
  • Number of attempts: 2
Change to ascending order - 485 entries

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

  • Best score: 17
  • Best player score: 49
  • Position: #65 / 119
  • Number of attempts: 1
Swap columns and transform to CSV format - 426 entries

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

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

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

  • Best score: 23
  • Best player score: 25
  • Position: #18 / 35
  • Number of attempts: 4
Quicksort - 2095 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: #301 / 465
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1680 entries

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

  • Best score: 10
  • Best player score: 37
  • Position: #545 / 564
  • Number of attempts: 2
Increment number for every 10 lines - 245 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: #54 / 66
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 1158 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: #233 / 234
  • Number of attempts: 1
Add Go XML to structure tags - 184 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: #40 / 74
  • Number of attempts: 2
Resort and deup a CSV list - 184 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: #34 / 45
  • Number of attempts: 3
Line Zipper - 477 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 13
  • Position: #67 / 216
  • Number of attempts: 4
The holy-grail may help - 391 entries

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

  • Best score: 16
  • Best player score: 16
  • Position: #163 / 216
  • Number of attempts: 2
Reverse and count - 486 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 / 179
  • Number of attempts: 3
ashfinal
Github:

entered into 17 challenges

contributed 0 challenges