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 - 373 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: 27
  • Position: #42 / 123
  • Number of attempts: 4
Even and Odd - 344 entries

separate the even numbers from the odd numbers

  • Best score: 13
  • Best player score: 19
  • Position: #43 / 82
  • Number of attempts: 2
Modifying .XCompose - 95 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: 39
  • Position: #22 / 24
  • Number of attempts: 2
hexagram binary tree - 127 entries

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

  • Best score: 23
  • Best player score: 47
  • Position: #23 / 29
  • Number of attempts: 2
Swap function parameters and delete all comments in python. - 1021 entries

Swap function parameters and delete all comments in python.

  • Best score: 19
  • Best player score: 24
  • Position: #105 / 250
  • Number of attempts: 2
Delete the last function argument in python. - 699 entries

Delete the last function argument in this python script.

  • Best score: 6
  • Best player score: 7
  • Position: #180 / 249
  • Number of attempts: 1
Flip All Bits - 484 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: 24
  • Best player score: 44
  • Position: #79 / 136
  • Number of attempts: 1
Find the devices that have no revoked time, and extract out the duration left on their leases. - 248 entries

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

  • Best score: 49
  • Best player score: 66
  • Position: #26 / 59
  • Number of attempts: 3
Convert list of enums to list of localization terms - 256 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: 100
  • Position: #23 / 73
  • Number of attempts: 5
From brakets to parens - 1329 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: 36
  • Position: #152 / 302
  • Number of attempts: 2
π - 337 entries

1200 π chars

  • Best score: 16
  • Best player score: 22
  • Position: #50 / 82
  • Number of attempts: 6
Create json from a .env file - 1737 entries

A simple everyday task.

  • Best score: 38
  • Best player score: 62
  • Position: #220 / 421
  • Number of attempts: 1
Reordering properties - 1381 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: 62
  • Position: #115 / 301
  • Number of attempts: 3
pimu96
Github:

entered into 13 challenges

contributed 0 challenges