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

Find fix point of cos - 1116 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: 15
  • Position: #78 / 334
  • Number of attempts: 1
Surround the 'z' character with brackets, quotes, and print as formatted string. - 485 entries

Surround the 'z' character with brackets, quotes, and print as formatted string.

  • Best score: 17
  • Best player score: 17
  • Position: #67 / 271
  • Number of attempts: 2
Easier Align - 344 entries

Align the columns of a markdown table

  • Best score: 51
  • Best player score: 151
  • Position: #39 / 89
  • Number of attempts: 9
Paste a column after a column - 2243 entries

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

  • Best score: 14
  • Best player score: 14
  • Position: #53 / 487
  • Number of attempts: 9
Tabbed Table to Python Array - 643 entries

Not payed by the hour? So make it fast ;-) The table contains the relative occurencies of bigrams (two consecutive letters) in 1/100,000 in the german language, copy-pasted from http://www.mathe.tu-freiberg.de/~hebisch/cafe/kryptographie/bigramme.html

  • Best score: 50
  • Best player score: 70
  • Position: #131 / 166
  • Number of attempts: 2
HS exam question - 1497 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 123
  • Position: #357 / 393
  • Number of attempts: 1
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: 27
  • Position: #130 / 322
  • Number of attempts: 4
Fizzbuzz - 504 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 47
  • Best player score: 425
  • Position: #153 / 156
  • Number of attempts: 2
Poorly indented Python comments - 1160 entries

Fix the alignment of some Python comments as quickly as possible.

  • Best score: 15
  • Best player score: 37
  • Position: #130 / 202
  • Number of attempts: 5
Put a newline after every 10 lines in vim - 1574 entries

Goal is to put a newline after every 10 lines in vim.

  • Best score: 10
  • Best player score: 11
  • Position: #173 / 523
  • Number of attempts: 3
Simple, Practical, and Common - 33379 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 22
  • Position: #2381 / 7363
  • Number of attempts: 10
Shebangs for all - 1912 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 14
  • Position: #232 / 500
  • Number of attempts: 13
The Cake is a Lie - 1286 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #277 / 512
  • Number of attempts: 6
Change the content of a string - 1475 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #205 / 557
  • Number of attempts: 8
Sort and add attributes - 1327 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 33
  • Position: #260 / 529
  • Number of attempts: 7
Reconstruct the Sentence - 1363 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 20
  • Best player score: 20
  • Position: #125 / 383
  • Number of attempts: 15
Simple text editing with Vim - 12281 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1925 / 3580
  • Number of attempts: 7
Reformat/Refactor a Golfer Class - 6557 entries

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

  • Best score: 32
  • Best player score: 39
  • Position: #744 / 1614
  • Number of attempts: 9
Gs Abl
Twitter:

entered into 18 challenges

contributed 0 challenges