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

A simple everyday task.

  • Best score: 39
  • Best player score: 46
  • Position: #81 / 303
  • Number of attempts: 3
Reordering properties - 1042 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: #75 / 240
  • Number of attempts: 1
Sort and Tag - 614 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: #58 / 126
  • Number of attempts: 3
Changing date formats - 615 entries

Change the date format to Y/M/D.

  • Best score: 37
  • Best player score: 52
  • Position: #35 / 170
  • Number of attempts: 1
YAML to dotenv - 1226 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 22
  • Position: #103 / 262
  • Number of attempts: 2
Change to ascending order - 448 entries

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

  • Best score: 17
  • Best player score: 49
  • Position: #62 / 109
  • Number of attempts: 1
Swap columns and transform to CSV format - 386 entries

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

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

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

  • Best score: 23
  • Best player score: 25
  • Position: #16 / 31
  • Number of attempts: 4
Quicksort - 2058 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: #297 / 457
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1668 entries

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

  • Best score: 10
  • Best player score: 37
  • Position: #542 / 561
  • Number of attempts: 2
Increment number for every 10 lines - 231 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: #53 / 65
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 1151 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: #232 / 233
  • 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 - 170 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: #33 / 44
  • 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 - 389 entries

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

  • Best score: 16
  • Best player score: 16
  • Position: #163 / 215
  • 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