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

simple replacements - 1662 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 20
  • Position: #98 / 371
  • Number of attempts: 1
Python dataclasses - 1105 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 20
  • Position: #81 / 278
  • Number of attempts: 1
Count to 100 in word form - 107 entries

Write all the numbers from 1 to 100, using their word forms rather than the digit form. Most of the parts you will need are included in the input file. Use hyphens when appropriate.

  • Best score: 53
  • Best player score: 75
  • Position: #13 / 26
  • Number of attempts: 6
RUST Cargo.toml version to last - 320 entries

RUST Cargo.toml version to last. rusty practice on vimgolf

  • Best score: 16
  • Best player score: 17
  • Position: #38 / 95
  • Number of attempts: 2
Modernise code - 1334 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 37
  • Position: #105 / 308
  • Number of attempts: 1
vimtutor, but you can cheat - 15 entries

It's time to revisit vimtutor, but as an experienced Vim user! Your goal is to change the file to appear as if you had gone through the tutorial, but you do NOT need to actually complete the tutorial as written or do anything that doesn't result in changes to the file. You may use whatever you have in your Vim toolbelt that's allowed under VimGolf rules. The whole tutorial is too large to submit, so only the relevant lesson headers and associated practice lines are presented in this challenge. You will have to reference the tutor for the original instructions if you need them: https://raw.githubusercontent.com/vim/vim/4466ad6baa22485abb1147aca3340cced4778a66/runtime/tutor/tutor

  • Best score: 149
  • Best player score: 150
  • Position: #2 / 7
  • Number of attempts: 7
HS Final exam vimgolf - 864 entries

Change the initial file to a single line containing all names comma-separated with numbers inside parentheses.

  • Best score: 21
  • Best player score: 23
  • Position: #91 / 227
  • Number of attempts: 6
Turn the x - 297 entries

Turn the x to a +

  • Best score: 19
  • Best player score: 20
  • Position: #27 / 77
  • Number of attempts: 6
Separate the lines - 175 entries

Every other line is mixed up. Separate them into their original texts.

  • Best score: 11
  • Best player score: 11
  • Position: #51 / 89
  • Number of attempts: 3
Array propagate - 319 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 23
  • Position: #22 / 115
  • Number of attempts: 5
Preferably without multi-cursor plugin - 538 entries

Originally asked as question on reddit by kpthunder: https://www.reddit.com/r/vim/comments/9fvsro/what_is_the_most_efficient_way_to_go_about/

  • Best score: 30
  • Best player score: 31
  • Position: #34 / 127
  • Number of attempts: 6
Line 'em up! - 392 entries

It can be so hard to keep everything neatly lined-up. Somebody clearly hasn't bothered here. Tidy it up, please!

  • Best score: 17
  • Best player score: 18
  • Position: #53 / 110
  • Number of attempts: 4
ASCII-art Histogram - 310 entries

Create an ASCCI-art histogram for the given numbers. Make sure not to leave trailing whitespaces. Thanks to VimGolf I recently discovered a feature of Vim thAT blew my mind. I'm curious to see what real ninjas make of it ;-)

  • Best score: 33
  • Best player score: 35
  • Position: #26 / 55
  • Number of attempts: 6
Reverse and count - 456 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: 19
  • Position: #19 / 172
  • Number of attempts: 3
treb
Twitter:

its treb

entered into 14 challenges

contributed 0 challenges