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 - 1559 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: #251 / 344
  • Number of attempts: 2
Find fix point of cos - 1125 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: #292 / 337
  • Number of attempts: 4
Paste a column after a column - 2253 entries

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

  • Best score: 14
  • Best player score: 39
  • Position: #398 / 488
  • Number of attempts: 1
HS exam question - 1504 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 99
  • Position: #316 / 395
  • Number of attempts: 2
Reformat symbols in list - 1466 entries

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

  • Best score: 24
  • Best player score: 67
  • Position: #308 / 322
  • Number of attempts: 1
Fix the shell script! - 2339 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 45
  • Position: #416 / 541
  • Number of attempts: 1
hello-world-vimgolf - 2358 entries

Simple number generation

  • Best score: 10
  • Best player score: 14
  • Position: #516 / 666
  • Number of attempts: 1
Plotting some variables in python - 1558 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: #250 / 333
  • Number of attempts: 1
simple replacements - 1658 entries

The goal is to see the replacement commands in action.

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

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

  • Best score: 10
  • Best player score: 19
  • Position: #444 / 497
  • Number of attempts: 2
Python dataclasses - 1104 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 25
  • Position: #148 / 277
  • Number of attempts: 8
Modernise code - 1333 entries

Modernise and clean up some C++ code.

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

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

  • Best score: 16
  • Best player score: 16
  • Position: #56 / 370
  • Number of attempts: 10
Braces or Brackets? - 884 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: #175 / 288
  • Number of attempts: 5
Whitespace, empty lines and tabs - 3339 entries

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

  • Best score: 16
  • Best player score: 27
  • Position: #433 / 736
  • Number of attempts: 1
Flodder-challenge - 1117 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 27
  • Position: #28 / 311
  • Number of attempts: 12
Simple text editing with Vim - 12283 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 / 3580
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 6557 entries

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

  • Best score: 32
  • Best player score: 47
  • Position: #1234 / 1614
  • Number of attempts: 4
satake0916
Github:

entered into 18 challenges

contributed 0 challenges