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 - 1306 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: 30
  • Position: #106 / 295
  • Number of attempts: 2
π - 327 entries

1200 π chars

  • Best score: 16
  • Best player score: 17
  • Position: #21 / 80
  • Number of attempts: 4
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: 76
  • Position: #152 / 298
  • Number of attempts: 3
Changing date formats - 751 entries

Change the date format to Y/M/D.

  • Best score: 36
  • Best player score: 79
  • Position: #102 / 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: 34
  • Position: #260 / 342
  • Number of attempts: 1
Change to ascending order - 548 entries

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

  • Best score: 17
  • Best player score: 39
  • Position: #45 / 134
  • Number of attempts: 1
Swap columns and transform to CSV format - 491 entries

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

  • Best score: 16
  • Best player score: 21
  • Position: #129 / 176
  • Number of attempts: 2
Nested JSON Flattener - 137 entries

Transform a deeply nested JSON structure into a flattened key-value format where each path is represented by dot notation

  • Best score: 44
  • Best player score: 69
  • Position: #17 / 32
  • Number of attempts: 4
Replace markdown sections with numbering - 323 entries

Replace each section and subsection with their respective numbers

  • Best score: 29
  • Best player score: 124
  • Position: #84 / 90
  • Number of attempts: 3
Change class fields from camel case to snake case - 669 entries

This is the reverse of the previous challenge: https://www.vimgolf.com/challenges/9v006705493c000000000513

  • Best score: 18
  • Best player score: 32
  • Position: #110 / 154
  • Number of attempts: 2
Move list of uuids into a SQL query - 245 entries

Take the list of UUIDs and use them as a filter in the where statement of a SQL query

  • Best score: 57
  • Best player score: 80
  • Position: #75 / 82
  • Number of attempts: 1
Word completion - 310 entries

Try to complete these options within 20 keystrokes.

  • Best score: 20
  • Best player score: 22
  • Position: #22 / 84
  • Number of attempts: 4
Copy punctuation - 747 entries

I want to copy the last line’s brackets, quotes, and commas to each line. How?

  • Best score: 19
  • Best player score: 30
  • Position: #63 / 183
  • Number of attempts: 2
Column wise pasting - 268 entries

Make a table from 3 columns

  • Best score: 17
  • Best player score: 37
  • Position: #40 / 58
  • Number of attempts: 2
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: 38
  • Position: #412 / 472
  • Number of attempts: 1
Align commas - 1134 entries

There are 15,000 aligning challenges on vimgolf.com, and they're all exactly the same. I hope this one is a little different.

  • Best score: 11
  • Best player score: 26
  • Position: #241 / 250
  • Number of attempts: 2
Entries sort - 111 entries

It cames to my mind a weird idea : sorting parts of my .vimrc. Take few minutes to sort out this, it's easy !

  • Best score: 14
  • Best player score: 19
  • Position: #42 / 45
  • Number of attempts: 3
Shuffle and Sort - 244 entries

The values where sorted incorrectly. Get them back to how they are supposed to be

  • Best score: 17
  • Best player score: 30
  • Position: #64 / 70
  • Number of attempts: 2
Ming
Github:

entered into 18 challenges

contributed 0 challenges