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

Create a diamond comment - 239 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 60
  • Position: #42 / 57
  • Number of attempts: 1
Lowercase first characters - 370 entries

This is the (abridged) input for Day 3 in Advent of Code 2019. The output is a format more suitable for Prolog programming: the two lines of input become two lists of pairs, joined together in a wires functor.

  • Best score: 33
  • Best player score: 36
  • Position: #47 / 133
  • Number of attempts: 3
Make list of numbers from 1 to 30 more compact, but more confusing - 76 entries

Change the naming logic of numbers to end up with less lines.

  • Best score: 75
  • Best player score: 96
  • Position: #8 / 29
  • Number of attempts: 4
Migrated to Postgres! - 219 entries

Celebration completion of this project. https://github.com/igrigorik/vimgolf/pull/322

  • Best score: 26
  • Best player score: 27
  • Position: #21 / 88
  • Number of attempts: 1
Increment number for every 10 lines - 161 entries

The file consists of 2 columns (code and percentage). We need to add 2 more columns with increasing number for 4th column (Xcols) and increment 3rd column (Ycols) only for every 10 lines with reset of 4th column

  • Best score: 25
  • Best player score: 56
  • Position: #31 / 47
  • Number of attempts: 1
Inverting Lines - 1398 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 10
  • Position: #73 / 382
  • Number of attempts: 1
Generate a very basic Python constructor - 279 entries

I actually needed to do this myself, so I look forward to learning how.

  • Best score: 38
  • Best player score: 38
  • Position: #9 / 79
  • Number of attempts: 11
Python dataclasses - 686 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 19
  • Position: #22 / 178
  • Number of attempts: 4
Modernise code - 931 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 41
  • Position: #94 / 208
  • Number of attempts: 3
Enumerate Bullets - 214 entries

We will need to refer to the bullet points in our document explicitly later, so we need to assign them some ID's!

  • Best score: 20
  • Best player score: 54
  • Position: #48 / 56
  • Number of attempts: 1
Put a cross in the square - 128 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 20
  • Position: #1 / 58
  • Number of attempts: 2
HS Final exam vimgolf - 703 entries

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

  • Best score: 21
  • Best player score: 21
  • Position: #18 / 187
  • Number of attempts: 3
Change double quotes to single quotes, but with a twist - 258 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: 26
  • Position: #25 / 49
  • Number of attempts: 3
Simple, Practical, and Common - 32992 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 22
  • Position: #2344 / 7283
  • Number of attempts: 8

Contributed Challenges

Transpose a python matrix - 608 entries

Rotate the matrix in 90 degrees.

Create a diamond comment - 239 entries

Encapsulate the text in a diamond pattern.

Kyle
Twitter:

entered into 14 challenges

contributed 2 challenges