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 - 1595 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: 25
  • Position: #216 / 350
  • Number of attempts: 4
EDN reformat - 1057 entries

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

  • Best score: 17
  • Best player score: 22
  • Position: #85 / 148
  • Number of attempts: 8
Tic-Tac-Toe Grid Transformation - 326 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: 111
  • Position: #37 / 79
  • Number of attempts: 3
Pick and sort servers from mirror list - 349 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: 40
  • Position: #45 / 76
  • Number of attempts: 4
Populate 3D bone names list - 459 entries

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

  • Best score: 21
  • Best player score: 21
  • Position: #9 / 122
  • Number of attempts: 8
Remove line numbers - 553 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #87 / 150
  • Number of attempts: 3
Find fix point of cos - 1138 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: #148 / 341
  • Number of attempts: 4
Insert column data on Confluence-style table - 426 entries

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

  • Best score: 33
  • Best player score: 44
  • Position: #40 / 100
  • Number of attempts: 15
Surround the 'z' character with brackets, quotes, and print as formatted string. - 489 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #142 / 274
  • Number of attempts: 2
Easier Align - 350 entries

Align the columns of a markdown table

  • Best score: 51
  • Best player score: 516
  • Position: #87 / 91
  • Number of attempts: 1
Paste a column after a column - 2262 entries

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

  • Best score: 14
  • Best player score: 16
  • Position: #168 / 491
  • Number of attempts: 12
Filter number combinations that don't add to 11 - 377 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: #29 / 111
  • Number of attempts: 9
Tabbed Table to Python Array - 644 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: 69
  • Position: #126 / 167
  • Number of attempts: 2
HS exam question - 1510 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 69
  • Position: #186 / 397
  • Number of attempts: 1
Reformat symbols in list - 1474 entries

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

  • Best score: 24
  • Best player score: 26
  • Position: #100 / 325
  • Number of attempts: 6
Fizzbuzz - 510 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 419
  • Position: #152 / 157
  • Number of attempts: 1
Substraction (bis) - 579 entries

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

  • Best score: 21
  • Best player score: 108
  • Position: #100 / 108
  • Number of attempts: 2
Changing around text with citations - 323 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 197
  • Position: #89 / 89
  • Number of attempts: 2
Poorly indented Python comments - 1190 entries

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

  • Best score: 15
  • Best player score: 96
  • Position: #189 / 205
  • Number of attempts: 1
Many duplicates - 1259 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #251 / 415
  • Number of attempts: 4
2 quick changes and a numbered list - 599 entries

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

  • Best score: 37
  • Best player score: 51
  • Position: #90 / 145
  • Number of attempts: 8
delete swap - 1548 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #293 / 484
  • Number of attempts: 2
Generate a very basic Python constructor (fixed) - 1184 entries

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

  • Best score: 29
  • Best player score: 48
  • Position: #156 / 249
  • Number of attempts: 4
Fix the shell script! - 2349 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 44
  • Position: #411 / 543
  • Number of attempts: 5
Visual block training - 1005 entries

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

  • Best score: 17
  • Best player score: 54
  • Position: #137 / 185
  • Number of attempts: 3
Innocent Monster - 164 entries

You have the tools, just create him!

  • Best score: 60
  • Best player score: 86
  • Position: #26 / 47
  • Number of attempts: 6
Put a newline after every 10 lines in vim - 1581 entries

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

  • Best score: 10
  • Best player score: 17
  • Position: #476 / 527
  • Number of attempts: 3
Java to JavaScript - 257 entries

Let convert some simple Java file to JavaScript!

  • Best score: 59
  • Best player score: 145
  • Position: #62 / 67
  • Number of attempts: 3
Wikitext headings to markdown - 980 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 39
  • Position: #154 / 203
  • Number of attempts: 2
Reconstruct the Sentence - 1377 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: 175
  • Position: #386 / 386
  • Number of attempts: 1
Braces or Brackets? - 885 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 56
  • Position: #257 / 289
  • Number of attempts: 2
Whitespace, empty lines and tabs - 3340 entries

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

  • Best score: 16
  • Best player score: 96
  • Position: #733 / 737
  • Number of attempts: 1
Flodder-challenge - 1118 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 45
  • Position: #263 / 311
  • Number of attempts: 2
Simple text editing with Vim - 12290 entries

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

  • Best score: 13
  • Best player score: 49
  • Position: #3490 / 3581
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 6563 entries

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

  • Best score: 32
  • Best player score: 75
  • Position: #1563 / 1617
  • Number of attempts: 1
Maurice Schmicking
Twitter:

entered into 35 challenges

contributed 0 challenges