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 - 1735 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: #183 / 380
  • Number of attempts: 4
EDN reformat - 1095 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 / 152
  • Number of attempts: 5
Tic-Tac-Toe Grid Transformation - 327 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: #17 / 79
  • Number of attempts: 13
Pick and sort servers from mirror list - 379 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 / 81
  • Number of attempts: 6
Populate 3D bone names list - 521 entries

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

  • Best score: 21
  • Best player score: 30
  • Position: #79 / 140
  • Number of attempts: 5
Find fix point of cos - 1199 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: #157 / 363
  • Number of attempts: 1
Surround the 'z' character with brackets, quotes, and print as formatted string. - 505 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #141 / 285
  • Number of attempts: 3
Paste a column after a column - 2413 entries

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

  • Best score: 14
  • Best player score: 16
  • Position: #171 / 523
  • Number of attempts: 6
Filter number combinations that don't add to 11 - 379 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 / 112
  • Number of attempts: 9
Tabbed Table to Python Array - 652 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: #15 / 171
  • Number of attempts: 9
HS exam question - 1523 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 47
  • Position: #16 / 404
  • Number of attempts: 13
Reformat symbols in list - 1506 entries

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

  • Best score: 24
  • Best player score: 24
  • Position: #51 / 333
  • Number of attempts: 9
Fizzbuzz - 536 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 80
  • Position: #91 / 161
  • Number of attempts: 2
Substraction (bis) - 582 entries

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

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

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 43
  • Position: #65 / 90
  • Number of attempts: 3
delete swap - 1648 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #284 / 513
  • Number of attempts: 2
Plotting some variables in python - 1604 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 / 344
  • Number of attempts: 14
Create a diamond comment - 336 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 28
  • Position: #28 / 74
  • Number of attempts: 11
Lowercase first characters - 482 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 / 180
  • Number of attempts: 2
Migrated to Postgres! - 321 entries

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

  • Best score: 26
  • Best player score: 29
  • Position: #65 / 125
  • Number of attempts: 3
simple replacements - 1706 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 21
  • Position: #152 / 377
  • 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 - 1398 entries

How can you reuse a previous substitution ?

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

A HAPPY NEW YEAR 2014 !

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

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

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

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

  • Best score: 16
  • Best player score: 16
  • Position: #31 / 757
  • Number of attempts: 8
Simple text editing with Vim - 12473 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1947 / 3622
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 6743 entries

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

  • Best score: 31
  • Best player score: 59
  • Position: #1517 / 1651
  • Number of attempts: 4
Vimgolf User
Twitter2:

entered into 28 challenges

contributed 0 challenges