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 - 2113 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: #344 / 472
  • Number of attempts: 2
Find fix point of cos - 1485 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: #382 / 434
  • Number of attempts: 4
Paste a column after a column - 2668 entries

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

  • Best score: 14
  • Best player score: 39
  • Position: #477 / 578
  • Number of attempts: 1
HS exam question - 1613 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 99
  • Position: #340 / 422
  • Number of attempts: 2
Reformat symbols in list - 1658 entries

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

  • Best score: 24
  • Best player score: 67
  • Position: #340 / 357
  • Number of attempts: 1
Fix the shell script! - 2681 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 45
  • Position: #479 / 624
  • Number of attempts: 1
hello-world-vimgolf - 2533 entries

Simple number generation

  • Best score: 10
  • Best player score: 14
  • Position: #559 / 726
  • Number of attempts: 1
Plotting some variables in python - 1691 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: #268 / 354
  • Number of attempts: 1
simple replacements - 1884 entries

The goal is to see the replacement commands in action.

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

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

  • Best score: 10
  • Best player score: 19
  • Position: #467 / 526
  • Number of attempts: 2
Python dataclasses - 1253 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 25
  • Position: #169 / 313
  • Number of attempts: 8
Modernise code - 1439 entries

Modernise and clean up some C++ code.

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

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

  • Best score: 16
  • Best player score: 16
  • Position: #56 / 394
  • Number of attempts: 10
Braces or Brackets? - 1201 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: #209 / 362
  • Number of attempts: 5
Whitespace, empty lines and tabs - 4044 entries

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

  • Best score: 16
  • Best player score: 27
  • Position: #506 / 862
  • Number of attempts: 1
Flodder-challenge - 1500 entries

Replace the text the most efficient and win!

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

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

  • Best score: 7
  • Best player score: 47
  • Position: #1374 / 1889
  • Number of attempts: 4
satake0916
Github:

entered into 18 challenges

contributed 0 challenges