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

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 60
  • Position: #28 / 36
  • Number of attempts: 1
Lowercase first characters - 186 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: #24 / 71
  • Number of attempts: 3
Make list of numbers from 1 to 30 more compact, but more confusing - 61 entries

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

  • Best score: 77
  • Best player score: 96
  • Position: #6 / 22
  • Number of attempts: 4
Migrated to Postgres! - 147 entries

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

  • Best score: 26
  • Best player score: 27
  • Position: #18 / 62
  • Number of attempts: 1
Increment number for every 10 lines - 118 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: #26 / 36
  • Number of attempts: 1
Inverting Lines - 969 entries

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

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

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

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

Simple challenge to extract fields from a Python class

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 41
  • Position: #69 / 147
  • Number of attempts: 3
Enumerate Bullets - 137 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: #33 / 35
  • Number of attempts: 1
Put a cross in the square - 78 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 20
  • Position: #1 / 39
  • Number of attempts: 2
HS Final exam vimgolf - 569 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 / 153
  • Number of attempts: 3
Change double quotes to single quotes, but with a twist - 214 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: #22 / 44
  • Number of attempts: 3
Simple, Practical, and Common - 32765 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 / 7241
  • Number of attempts: 8

Contributed Challenges

Transpose a python matrix - 323 entries

Rotate the matrix in 90 degrees.

Create a diamond comment - 133 entries

Encapsulate the text in a diamond pattern.

Kyle
Twitter:

entered into 14 challenges

contributed 2 challenges