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

Plotting some variables in python - 1264 entries

4 sets of (x,y) variables to plot. Just increment the numbers! Well, let's change the colors of the lines as well. Oh and we meant to plot the absolute values of course.

  • Best score: 34
  • Best player score: 56
  • Position: #182 / 268
  • Number of attempts: 1
Transpose a python matrix - 629 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 62
  • Position: #75 / 112
  • Number of attempts: 3
Lowercase first characters - 387 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: 43
  • Position: #86 / 142
  • Number of attempts: 3
Migrated to Postgres! - 244 entries

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

  • Best score: 26
  • Best player score: 30
  • Position: #64 / 96
  • Number of attempts: 3
Increment number for every 10 lines - 173 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: 70
  • Position: #38 / 50
  • Number of attempts: 1
simple replacements - 1177 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 20
  • Position: #85 / 262
  • Number of attempts: 6
Inverting Lines - 1436 entries

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

  • Best score: 10
  • Best player score: 14
  • Position: #280 / 395
  • Number of attempts: 2
Python dataclasses - 710 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 26
  • Position: #94 / 183
  • Number of attempts: 3
Modernise code - 983 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 43
  • Position: #112 / 223
  • Number of attempts: 1
HS Final exam vimgolf - 745 entries

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

  • Best score: 21
  • Best player score: 39
  • Position: #163 / 200
  • Number of attempts: 1
Extend shell script - 90 entries

Just add some more stuff

  • Best score: 37
  • Best player score: 66
  • Position: #27 / 37
  • Number of attempts: 1
Format the CSS - 102 entries

You just copied some CSS color names from the web and need to add them to your python module. Create the COLORS variable and assign a dict() with the names as keys and hex-colors as values. BEWARE OF THE TABS!!

  • Best score: 41
  • Best player score: 58
  • Position: #37 / 39
  • Number of attempts: 2
Rural Post - 4156 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 9
  • Position: #164 / 1030
  • Number of attempts: 7
Multiline to Single Line - 552 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #140 / 248
  • Number of attempts: 1
Yo To Hello - 1066 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #317 / 489
  • Number of attempts: 1
Get mail address from outlook format - 600 entries

Create a mail list space separated of mail list formatted by outlook

  • Best score: 15
  • Best player score: 18
  • Position: #132 / 188
  • Number of attempts: 3
prepend * to every non-blank line - 6061 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 10
  • Position: #406 / 1481
  • Number of attempts: 7
Python Hello World! Reformatting - 910 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 43
  • Position: #179 / 355
  • Number of attempts: 4
underscore_to_camelCase - 154 entries

Pointy haired boss decided we need to switch to camelCase. Let's get this over with.

  • Best score: 14
  • Best player score: 16
  • Position: #64 / 77
  • Number of attempts: 2
Triangle of arrows - 144 entries

I made this by accident when working on another challenge. How would you go about making this?

  • Best score: 14
  • Best player score: 22
  • Position: #21 / 35
  • Number of attempts: 7
Sorting paragraphs - 495 entries

Order the paragraphs correctly, per prefixed index

  • Best score: 18
  • Best player score: 31
  • Position: #82 / 153
  • Number of attempts: 1
Simple text editing with Vim - 11746 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 14
  • Position: #1845 / 3444
  • Number of attempts: 4
Patrick Martin
Twitter:

entered into 22 challenges

contributed 0 challenges