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: 24
  • Position: #188 / 403
  • Number of attempts: 4
EDN reformat - 1102 entries

The goal is to make the code more readable and concise while maintaining its functionality.

  • Best score: 17
  • Best player score: 18
  • Position: #18 / 154
  • Number of attempts: 5
Tic-Tac-Toe Grid Transformation - 381 entries

Your mission is to efficiently convert the original Tic-Tac-Toe grid, represented by 'x's and 'o's, into a neat and well-organized game board.

  • Best score: 56
  • Best player score: 70
  • Position: #18 / 82
  • Number of attempts: 13
Pick and sort servers from mirror list - 398 entries

Retrieve the primary server for each country from a mirror list file and organize them alphabetically by country name. Given a mirror list file containing server information for various countries, the objective is to extract the primary server from each country and then arrange these servers in alphabetical order based on the respective country names.

  • Best score: 28
  • Best player score: 33
  • Position: #39 / 82
  • Number of attempts: 6
Populate 3D bone names list - 580 entries

Ran into this at work, excited to see how this gets optimized

  • Best score: 21
  • Best player score: 30
  • Position: #82 / 147
  • Number of attempts: 5
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: 15
  • Position: #159 / 381
  • Number of attempts: 1
Surround the 'z' character with brackets, quotes, and print as formatted string. - 532 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #141 / 294
  • Number of attempts: 3
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: 16
  • Position: #173 / 535
  • Number of attempts: 6
Filter number combinations that don't add to 11 - 398 entries

Append the sum of each line to its end, alongside an equals sign, and remove any that do not sum to 11. The ordering of lines should stay the same. Note that the combinations are semi-arbitrary and not all 4-number combinations are present in the file.

  • Best score: 27
  • Best player score: 27
  • Position: #30 / 113
  • Number of attempts: 9
Tabbed Table to Python Array - 706 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: 51
  • Position: #16 / 174
  • Number of attempts: 9
HS exam question - 1539 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 47
  • Position: #16 / 410
  • Number of attempts: 13
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: 24
  • Position: #51 / 337
  • Number of attempts: 9
Fizzbuzz - 556 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 80
  • Position: #94 / 165
  • Number of attempts: 2
Substraction (bis) - 584 entries

Solve the equations (adapted from the original @Caek_'s challenge).

  • Best score: 21
  • Best player score: 23
  • Position: #34 / 111
  • Number of attempts: 9
Changing around text with citations - 325 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 43
  • Position: #66 / 91
  • Number of attempts: 3
delete swap - 1754 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #284 / 542
  • Number of attempts: 2
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: 34
  • Position: #52 / 347
  • Number of attempts: 14
Create a diamond comment - 337 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 28
  • Position: #28 / 75
  • Number of attempts: 11
Lowercase first characters - 486 entries

This is the (abridged) input for Day 3 in Advent of Code 2019. The output is a format more suitable for Prolog programming: the two lines of input become two lists of pairs, joined together in a wires functor.

  • Best score: 33
  • Best player score: 33
  • Position: #32 / 182
  • Number of attempts: 2
Migrated to Postgres! - 323 entries

Celebration completion of this project. https://github.com/igrigorik/vimgolf/pull/322

  • Best score: 26
  • Best player score: 29
  • Position: #64 / 126
  • Number of attempts: 3
simple replacements - 1749 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 21
  • Position: #153 / 379
  • Number of attempts: 9
RUST match with enum for Coin - 183 entries

RUST match with enum for Coin rusty practice on vimgolf

  • Best score: 84
  • Best player score: 103
  • Position: #23 / 53
  • Number of attempts: 3
ninja substitution - 1420 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 14
  • Position: #84 / 267
  • Number of attempts: 12
A HAPPY NEW YEAR 2014 ! - 10654 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1599 / 3678
  • Number of attempts: 5
attr_aligner - 3498 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 19
  • Position: #179 / 696
  • Number of attempts: 19
Whitespace, empty lines and tabs - 3559 entries

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

  • Best score: 16
  • Best player score: 16
  • Position: #31 / 768
  • Number of attempts: 8
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: 14
  • Position: #1953 / 3650
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 6821 entries

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

  • Best score: 28
  • Best player score: 59
  • Position: #1532 / 1671
  • Number of attempts: 4
Vimgolf User
Twitter2:

entered into 28 challenges

contributed 0 challenges