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 - 1838 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: #295 / 403
  • Number of attempts: 2
Find fix point of cos - 1303 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: #331 / 381
  • Number of attempts: 4
Paste a column after a column - 2477 entries

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

  • Best score: 14
  • Best player score: 39
  • Position: #438 / 535
  • Number of attempts: 1
HS exam question - 1539 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 99
  • Position: #327 / 410
  • Number of attempts: 2
Reformat symbols in list - 1570 entries

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

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

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 45
  • Position: #449 / 587
  • Number of attempts: 1
hello-world-vimgolf - 2481 entries

Simple number generation

  • Best score: 10
  • Best player score: 14
  • Position: #542 / 702
  • Number of attempts: 1
Plotting some variables in python - 1660 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: #261 / 347
  • Number of attempts: 1
simple replacements - 1749 entries

The goal is to see the replacement commands in action.

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

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

  • Best score: 10
  • Best player score: 19
  • Position: #453 / 507
  • Number of attempts: 2
Python dataclasses - 1127 entries

Simple challenge to extract fields from a Python class

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

Modernise and clean up some C++ code.

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

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

  • Best score: 16
  • Best player score: 16
  • Position: #56 / 375
  • Number of attempts: 10
Braces or Brackets? - 957 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: #183 / 306
  • Number of attempts: 5
Whitespace, empty lines and tabs - 3559 entries

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

  • Best score: 16
  • Best player score: 27
  • Position: #452 / 768
  • Number of attempts: 1
Flodder-challenge - 1219 entries

Replace the text the most efficient and win!

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

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

  • Best score: 28
  • Best player score: 47
  • Position: #1269 / 1671
  • Number of attempts: 4
satake0916
Github:

entered into 18 challenges

contributed 0 challenges