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

Filling braces - 124 entries

Inspired by a question on CoDidact (https://software.codidact.com/posts/296501), I wondered if Vim could offer a satisfactory ‘solution’ to this problem.

  • Best score: 24
  • Best player score: 33
  • Position: #34 / 44
  • Number of attempts: 2
Modifying .XCompose - 68 entries

You just wrote some lines in .XCompose, but now you want the compose sequences to be more verbose. Change the compose sequence for each Greek letter to its name.

  • Best score: 33
  • Best player score: 51
  • Position: #17 / 17
  • Number of attempts: 1
hexagram binary tree - 101 entries

generate the binary tree that represents all possible hexagrams found in the book of changes (易经)

  • Best score: 24
  • Best player score: 88
  • Position: #23 / 24
  • Number of attempts: 4
Swap function parameters and delete all comments in python. - 956 entries

Swap function parameters and delete all comments in python.

  • Best score: 19
  • Best player score: 30
  • Position: #154 / 235
  • Number of attempts: 3
Delete the last function argument in python. - 649 entries

Delete the last function argument in this python script.

  • Best score: 6
  • Best player score: 8
  • Position: #181 / 233
  • Number of attempts: 5
Flip All Bits - 401 entries

Perform a bitwise NOT operation on each bit, meaning that bits that are 0 become 1, and those that are 1 become 0.

  • Best score: 26
  • Best player score: 62
  • Position: #108 / 123
  • Number of attempts: 1
Find the devices that have no revoked time, and extract out the duration left on their leases. - 212 entries

Extract non-revoked devices and the duration of their leases.

  • Best score: 50
  • Best player score: 121
  • Position: #49 / 53
  • Number of attempts: 2
Convert list of enums to list of localization terms - 228 entries

While making my game Piloteer, I had a large list of TaskTypes and needed to convert them to an equivalent list of localization terms, to be used when translating the game's text into different languages.

  • Best score: 75
  • Best player score: 117
  • Position: #41 / 69
  • Number of attempts: 3
Create json from a .env file - 1716 entries

A simple everyday task.

  • Best score: 38
  • Best player score: 67
  • Position: #248 / 416
  • Number of attempts: 5
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: 94
  • Position: #207 / 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: 216
  • Position: #144 / 156
  • Number of attempts: 2
YAML to dotenv - 1637 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 72
  • Position: #328 / 342
  • Number of attempts: 3
Generate an entry for each month - 395 entries

The input file contains a URI with a month in it. Generate the URIs for all the other months up to a couple of years

  • Best score: 27
  • Best player score: 65
  • Position: #70 / 100
  • Number of attempts: 2
Simple text editing with Vim - 13644 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 19
  • Position: #2890 / 3906
  • Number of attempts: 4
Nikhil Ivaturi
Github:

entered into 14 challenges

contributed 0 challenges