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

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 60
  • Position: #58 / 75
  • Number of attempts: 1
Lowercase first characters - 487 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: #66 / 183
  • Number of attempts: 3
Make list of numbers from 1 to 30 more compact, but more confusing - 107 entries

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

  • Best score: 74
  • Best player score: 96
  • Position: #13 / 39
  • Number of attempts: 4
Migrated to Postgres! - 323 entries

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

  • Best score: 26
  • Best player score: 27
  • Position: #23 / 126
  • Number of attempts: 1
Increment number for every 10 lines - 230 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: #39 / 64
  • Number of attempts: 1
Inverting Lines - 1892 entries

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

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

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

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

Simple challenge to extract fields from a Python class

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 41
  • Position: #134 / 322
  • Number of attempts: 3
Enumerate Bullets - 320 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: #71 / 84
  • Number of attempts: 1
Put a cross in the square - 225 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 20
  • Position: #1 / 89
  • Number of attempts: 2
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: 21
  • Position: #18 / 236
  • Number of attempts: 3
Change double quotes to single quotes, but with a twist - 309 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: #31 / 56
  • Number of attempts: 3
Simple, Practical, and Common - 33612 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: #2343 / 7416
  • Number of attempts: 8

Contributed Challenges

Transpose a python matrix - 873 entries

Rotate the matrix in 90 degrees.

Create a diamond comment - 337 entries

Encapsulate the text in a diamond pattern.

Kyle
Twitter:

entered into 14 challenges

contributed 2 challenges