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 - 1753 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 20
  • Position: #102 / 380
  • Number of attempts: 1
Python dataclasses - 1136 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 20
  • Position: #84 / 284
  • Number of attempts: 1
Count to 100 in word form - 138 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: #16 / 29
  • Number of attempts: 6
RUST Cargo.toml version to last - 355 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #40 / 100
  • Number of attempts: 2
Modernise code - 1400 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 37
  • Position: #111 / 323
  • Number of attempts: 1
vimtutor, but you can cheat - 21 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: #3 / 10
  • Number of attempts: 7
HS Final exam vimgolf - 897 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: #95 / 236
  • Number of attempts: 6
Turn the x - 328 entries

Turn the x to a +

  • Best score: 19
  • Best player score: 20
  • Position: #30 / 82
  • Number of attempts: 6
Separate the lines - 182 entries

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

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

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 23
  • Position: #22 / 119
  • Number of attempts: 5
Preferably without multi-cursor plugin - 540 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: #35 / 129
  • Number of attempts: 6
Line 'em up! - 421 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: #55 / 114
  • Number of attempts: 4
ASCII-art Histogram - 320 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: #28 / 57
  • Number of attempts: 6
Reverse and count - 473 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: #20 / 176
  • Number of attempts: 3
treb
Twitter:

its treb

entered into 14 challenges

contributed 0 challenges