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

Sort and Tag - 136 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: #23 / 35
  • Number of attempts: 3
Changing date formats - 187 entries

Change the date format to Y/M/D.

  • Best score: 37
  • Best player score: 52
  • Position: #17 / 59
  • Number of attempts: 1
YAML to dotenv - 291 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 22
  • Position: #35 / 74
  • Number of attempts: 2
Change to ascending order - 198 entries

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

  • Best score: 17
  • Best player score: 49
  • Position: #33 / 55
  • Number of attempts: 1
Swap columns and transform to CSV format - 147 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #31 / 56
  • Number of attempts: 1
Append leading hyphen count to each line - 54 entries

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

  • Best score: 23
  • Best player score: 25
  • Position: #10 / 16
  • Number of attempts: 4
Put a newline after every 10 lines in vim - 1660 entries

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

  • Best score: 10
  • Best player score: 37
  • Position: #539 / 558
  • 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 - 1148 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: #230 / 231
  • Number of attempts: 1
Add Go XML to structure tags - 172 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: #39 / 70
  • 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 - 372 entries

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

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

entered into 14 challenges

contributed 0 challenges