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: #176 / 403
  • Number of attempts: 6
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: #15 / 154
  • Number of attempts: 8
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: #17 / 82
  • Number of attempts: 6
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: 29
  • Position: #6 / 82
  • Number of attempts: 9
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: 21
  • Position: #7 / 147
  • Number of attempts: 5
Remove line numbers - 671 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

  • Best score: 10
  • Best player score: 12
  • Position: #22 / 182
  • Number of attempts: 6
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: 14
  • Position: #36 / 381
  • Number of attempts: 2
Insert column data on Confluence-style table - 444 entries

Add ip addresses into new "IP" column based on the last digits from the "Server" column

  • Best score: 33
  • Best player score: 34
  • Position: #18 / 106
  • Number of attempts: 4
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: #138 / 294
  • Number of attempts: 1
Easier Align - 381 entries

Align the columns of a markdown table

  • Best score: 51
  • Best player score: 58
  • Position: #8 / 93
  • Number of attempts: 7
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: 17
  • Position: #209 / 535
  • Number of attempts: 1
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: #26 / 113
  • Number of attempts: 4
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: #15 / 174
  • Number of attempts: 4
HS exam question - 1539 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 47
  • Position: #15 / 410
  • Number of attempts: 8
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: #50 / 337
  • Number of attempts: 6
Fizzbuzz - 556 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 47
  • Position: #18 / 165
  • Number of attempts: 10
Substraction (bis) - 584 entries

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

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

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 28
  • Position: #20 / 91
  • Number of attempts: 10
Poorly indented Python comments - 1300 entries

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

  • Best score: 15
  • Best player score: 15
  • Position: #41 / 218
  • Number of attempts: 7
Many duplicates - 1420 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #256 / 458
  • Number of attempts: 1
2 quick changes and a numbered list - 642 entries

The ascii will not be lost, but rather numbered in 4 digit blocks with leading zeros.

  • Best score: 37
  • Best player score: 41
  • Position: #57 / 153
  • Number of attempts: 2
delete swap - 1754 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #286 / 542
  • Number of attempts: 1
Generate a very basic Python constructor (fixed) - 1250 entries

Original by @BiddulphCaleb (http://www.vimgolf.com/challenges/6019f1c4642668000cee11e8) - had some extra spaces in output file.

  • Best score: 29
  • Best player score: 29
  • Position: #57 / 270
  • Number of attempts: 7
Fix the shell script! - 2540 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 28
  • Position: #159 / 587
  • Number of attempts: 3
Visual block training - 1069 entries

You see the input. You see the output. Go.

  • Best score: 17
  • Best player score: 17
  • Position: #9 / 203
  • Number of attempts: 3
Innocent Monster - 217 entries

You have the tools, just create him!

  • Best score: 60
  • Best player score: 60
  • Position: #4 / 49
  • Number of attempts: 6
Put a newline after every 10 lines in vim - 1656 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #186 / 555
  • Number of attempts: 3
Java to JavaScript - 267 entries

Let convert some simple Java file to JavaScript!

  • Best score: 59
  • Best player score: 65
  • Position: #18 / 72
  • Number of attempts: 5
Wikitext headings to markdown - 986 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #45 / 208
  • Number of attempts: 5
hello-world-vimgolf - 2481 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #294 / 702
  • Number of attempts: 1
Contribute to keyboard mashing - 887 entries

Speak in tongues

  • Best score: 17
  • Best player score: 17
  • Position: #49 / 269
  • Number of attempts: 5
Reordering Lorem Ipsum - 287 entries

Who even sorted this?

  • Best score: 13
  • Best player score: 70
  • Position: #38 / 65
  • Number of attempts: 2
Solve anagram with ASCII letters - 54 entries

ASCII created by TOIlet command

  • Best score: 46
  • Best player score: 48
  • Position: #8 / 18
  • Number of attempts: 3
Fill in the chess board - 947 entries

Fill in the name of each square using its file (a-h) and rank (1-8).

  • Best score: 19
  • Best player score: 19
  • Position: #32 / 181
  • Number of attempts: 5
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: #54 / 347
  • Number of attempts: 8
Transpose a python matrix - 871 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 23
  • Position: #19 / 137
  • Number of attempts: 4
Create a diamond comment - 337 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 27
  • Position: #12 / 75
  • Number of attempts: 2
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: 34
  • Position: #54 / 182
  • Number of attempts: 2
Make list of numbers from 1 to 30 more compact, but more confusing - 107 entries

Change the naming logic of numbers to end up with less lines.

  • Best score: 74
  • Best player score: 74
  • Position: #1 / 39
  • Number of attempts: 2
Write Hello World in the 'i use arch btw' -programming language - 31 entries

> "I use Arch btw" is an esoteric programming language based on Brainfuck in which the Brainfuck commands have been replaced with the following keywords: i, use, arch, linux, btw, by, the, way. https://github.com/OverMighty/i-use-arch-btw

  • Best score: 162
  • Best player score: 245
  • Position: #8 / 16
  • Number of attempts: 1
Migrated to Postgres! - 323 entries

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

  • Best score: 26
  • Best player score: 33
  • Position: #91 / 126
  • Number of attempts: 1
Increment number for every 10 lines - 229 entries

The file consists of 2 columns (code and percentage). We need to add 2 more columns with increasing number for 4th column (Xcols) and increment 3rd column (Ycols) only for every 10 lines with reset of 4th column

  • Best score: 25
  • Best player score: 44
  • Position: #33 / 63
  • Number of attempts: 3
simple replacements - 1749 entries

The goal is to see the replacement commands in action.

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

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

  • Best score: 10
  • Best player score: 10
  • Position: #207 / 507
  • Number of attempts: 2
CSV to MD format - 413 entries

To convert a CSV list to Markdown list

  • Best score: 36
  • Best player score: 36
  • Position: #13 / 94
  • Number of attempts: 5
Python dataclasses - 1127 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 19
  • Position: #62 / 283
  • Number of attempts: 1
Count to 100 in word form - 138 entries

Write all the numbers from 1 to 100, using their word forms rather than the digit form. Most of the parts you will need are included in the input file. Use hyphens when appropriate.

  • Best score: 53
  • Best player score: 53
  • Position: #2 / 29
  • Number of attempts: 5
tien
Twitter2:

Just a tweeter

entered into 47 challenges

contributed 0 challenges