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

Python dataclasses - 278 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 32
  • Position: #60 / 80
  • Number of attempts: 2
RUST Cargo.toml version to last - 157 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #21 / 51
  • Number of attempts: 4
Put a cross in the square - 58 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 23
  • Position: #25 / 33
  • Number of attempts: 3
Change double quotes to single quotes, but with a twist - 204 entries

Although this challenge is in the context of a Python function, you don't need to know Python to do this challenge. It is to add contexts and interesting constraints. The file contains a function that prints a multi-line string literal. I wrote the string literal with double quotes, but then I decided to use single quotes instead, and that's your challenge. However, interestingly enough, the string itself contains single and double quotes. This means, inside the string literal, the originally escaped double quotes no longer need to be escaped, but the single quotes now need to be escaped. Note that the triple double quotes in the docstring should be left alone.

  • Best score: 22
  • Best player score: 38
  • Position: #32 / 43
  • Number of attempts: 2
Add quotes to ansible playbook - 519 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 8
  • Position: #34 / 172
  • Number of attempts: 5
Multiline to Single Line - 325 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 5
  • Position: #106 / 153
  • Number of attempts: 3
Quote modules (ver.2) - 175 entries

Complete golang import statement.

  • Best score: 22
  • Best player score: 35
  • Position: #45 / 46
  • Number of attempts: 1
Preferably without multi-cursor plugin - 459 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: #29 / 114
  • Number of attempts: 5
Song Transcription Oops - 218 entries

When transcribing vocal music to Canjo Tab you can start by finding the lowest note and assigning that to zero and working your way up from there. However, without fail, I tend to miscount the notes and when I am near done I find a lower note. I mark this with a "z". This means I have to increase all the previous ones by 1. just a sting of numbers :)

  • Best score: 15
  • Best player score: 36
  • Position: #66 / 66
  • Number of attempts: 1
change parenthesis - 235 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 9
  • Position: #78 / 133
  • Number of attempts: 2
Remove quotes after first field - 311 entries

Remove the quotes around each field except for the first field.

  • Best score: 16
  • Best player score: 18
  • Position: #32 / 77
  • Number of attempts: 9
calculations - 244 entries

Complete these (weird) calculations.

  • Best score: 38
  • Best player score: 61
  • Position: #48 / 57
  • Number of attempts: 1
Fake Konto
Twitter:

entered into 12 challenges

contributed 0 challenges