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

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 60
  • Position: #56 / 72
  • Number of attempts: 1
Lowercase first characters - 467 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: #62 / 175
  • Number of attempts: 3
Make list of numbers from 1 to 30 more compact, but more confusing - 90 entries

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

  • Best score: 74
  • Best player score: 96
  • Position: #11 / 36
  • Number of attempts: 4
Migrated to Postgres! - 312 entries

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

  • Best score: 26
  • Best player score: 27
  • Position: #22 / 122
  • Number of attempts: 1
Increment number for every 10 lines - 219 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: #37 / 61
  • Number of attempts: 1
Inverting Lines - 1837 entries

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

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

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

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

Simple challenge to extract fields from a Python class

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 41
  • Position: #127 / 308
  • Number of attempts: 3
Enumerate Bullets - 292 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: #68 / 80
  • Number of attempts: 1
Put a cross in the square - 203 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 20
  • Position: #1 / 84
  • Number of attempts: 2
HS Final exam vimgolf - 864 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 / 227
  • Number of attempts: 3
Change double quotes to single quotes, but with a twist - 281 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: #28 / 53
  • Number of attempts: 3
Simple, Practical, and Common - 33385 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 / 7364
  • Number of attempts: 8

Contributed Challenges

Transpose a python matrix - 845 entries

Rotate the matrix in 90 degrees.

Create a diamond comment - 314 entries

Encapsulate the text in a diamond pattern.

Kyle
Twitter:

entered into 14 challenges

contributed 2 challenges