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

Quicksort - 1757 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 29
  • Position: #285 / 385
  • Number of attempts: 2
Find fix point of cos - 1204 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

  • Best score: 14
  • Best player score: 36
  • Position: #317 / 365
  • Number of attempts: 4
Paste a column after a column - 2413 entries

This task is very common while using multi-cursor. What is the elegant vim way ?

  • Best score: 14
  • Best player score: 39
  • Position: #428 / 523
  • Number of attempts: 1
HS exam question - 1523 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 99
  • Position: #322 / 404
  • Number of attempts: 2
Reformat symbols in list - 1507 entries

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

  • Best score: 24
  • Best player score: 67
  • Position: #319 / 334
  • Number of attempts: 1
Fix the shell script! - 2431 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 45
  • Position: #435 / 569
  • Number of attempts: 1
hello-world-vimgolf - 2472 entries

Simple number generation

  • Best score: 10
  • Best player score: 14
  • Position: #539 / 699
  • Number of attempts: 1
Plotting some variables in python - 1605 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: 59
  • Position: #259 / 345
  • Number of attempts: 1
simple replacements - 1710 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 19
  • Position: #83 / 378
  • Number of attempts: 10
Inverting Lines - 1870 entries

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

  • Best score: 10
  • Best player score: 19
  • Position: #452 / 505
  • Number of attempts: 2
Python dataclasses - 1121 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 25
  • Position: #150 / 281
  • Number of attempts: 8
Modernise code - 1368 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 34
  • Position: #69 / 316
  • Number of attempts: 8
swap number pairs - 2023 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 16
  • Position: #56 / 373
  • Number of attempts: 10
Braces or Brackets? - 930 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 47
  • Position: #180 / 295
  • Number of attempts: 5
Whitespace, empty lines and tabs - 3508 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 27
  • Position: #447 / 758
  • Number of attempts: 1
Flodder-challenge - 1176 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 27
  • Position: #28 / 321
  • Number of attempts: 12
Simple text editing with Vim - 12491 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #698 / 3626
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 6749 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 31
  • Best player score: 47
  • Position: #1260 / 1652
  • Number of attempts: 4
satake0916
Github:

entered into 18 challenges

contributed 0 challenges