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

Rearrange array to one line - 448 entries

Rearrange the array content on only one line, and remove trailing commas

  • Best score: 13
  • Best player score: 35
  • Position: #104 / 116
  • Number of attempts: 1
Quicksort - 1838 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: 24
  • Position: #220 / 403
  • Number of attempts: 5
Populate 3D bone names list - 580 entries

Ran into this at work, excited to see how this gets optimized

  • Best score: 21
  • Best player score: 28
  • Position: #70 / 147
  • Number of attempts: 2
Remove line numbers - 671 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

  • Best score: 10
  • Best player score: 12
  • Position: #9 / 182
  • Number of attempts: 9
Surround the 'z' character with brackets, quotes, and print as formatted string. - 532 entries

Surround the 'z' character with brackets, quotes, and print as formatted string.

  • Best score: 17
  • Best player score: 17
  • Position: #118 / 294
  • Number of attempts: 2
Reformat symbols in list - 1570 entries

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

  • Best score: 24
  • Best player score: 27
  • Position: #154 / 337
  • Number of attempts: 4
Many duplicates - 1420 entries

Quick and easy

  • Best score: 7
  • Best player score: 9
  • Position: #324 / 458
  • Number of attempts: 2
hello-world-vimgolf - 2481 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #282 / 702
  • Number of attempts: 8
Python dataclasses - 1127 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 36
  • Position: #241 / 283
  • Number of attempts: 4
Making 3 line function a one liner. - 324 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #159 / 201
  • Number of attempts: 3
Modernise code - 1386 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 44
  • Position: #179 / 318
  • Number of attempts: 5
Shebangs for all - 1961 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 27
  • Position: #493 / 506
  • Number of attempts: 1
Daniel Apt
Twitter2:

Dutchman in London who likes to run, read and bake bread. Software Development Manager at @Amazon. Opinions are my own and not the views of my employer.

entered into 12 challenges

contributed 0 challenges