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 - 515 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: 29
  • Position: #103 / 139
  • Number of attempts: 4
EDN reformat - 347 entries

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

  • Best score: 17
  • Best player score: 33
  • Position: #51 / 68
  • Number of attempts: 2
Tic-Tac-Toe Grid Transformation - 134 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: 58
  • Best player score: 112
  • Position: #19 / 38
  • Number of attempts: 1
Populate 3D bone names list - 235 entries

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

  • Best score: 21
  • Best player score: 29
  • Position: #41 / 64
  • Number of attempts: 2
Remove line numbers - 266 entries

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

  • Best score: 8
  • Best player score: 9
  • Position: #4 / 79
  • Number of attempts: 5
Find fix point of cos - 798 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: #141 / 232
  • Number of attempts: 2
Surround the 'z' character with brackets, quotes, and print as formatted string. - 393 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #154 / 211
  • Number of attempts: 1
Paste a column after a column - 1887 entries

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

  • Best score: 14
  • Best player score: 23
  • Position: #268 / 407
  • Number of attempts: 3
Filter number combinations that don't add to 11 - 316 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: 12
  • Best player score: 12
  • Position: #1 / 97
  • Number of attempts: 1
Tabbed Table to Python Array - 564 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: 62
  • Position: #85 / 150
  • Number of attempts: 3
Reformat symbols in list - 1321 entries

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

  • Best score: 24
  • Best player score: 27
  • Position: #142 / 294
  • Number of attempts: 6
Fizzbuzz - 464 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 47
  • Best player score: 76
  • Position: #71 / 144
  • Number of attempts: 1
Changing around text with citations - 275 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 43
  • Position: #59 / 78
  • Number of attempts: 2
Many duplicates - 1123 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #251 / 364
  • Number of attempts: 4
delete swap - 1378 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #292 / 432
  • Number of attempts: 5
Generate a very basic Python constructor (fixed) - 1090 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #1 / 232
  • Number of attempts: 2
Put a newline after every 10 lines in vim - 1466 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #180 / 494
  • Number of attempts: 3
hello-world-vimgolf - 2185 entries

Simple number generation

  • Best score: 10
  • Best player score: 15
  • Position: #494 / 623
  • Number of attempts: 3
Contribute to keyboard mashing - 792 entries

Speak in tongues

  • Best score: 17
  • Best player score: 17
  • Position: #50 / 243
  • Number of attempts: 5
Reordering Lorem Ipsum - 216 entries

Who even sorted this?

  • Best score: 13
  • Best player score: 87
  • Position: #37 / 55
  • Number of attempts: 2
Fill in the chess board - 843 entries

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

  • Best score: 19
  • Best player score: 42
  • Position: #113 / 169
  • Number of attempts: 2
Transpose a python matrix - 784 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 65
  • Position: #94 / 129
  • Number of attempts: 1
simple replacements - 1366 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 28
  • Position: #269 / 306
  • Number of attempts: 1
Inverting Lines - 1677 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #235 / 456
  • Number of attempts: 5
Python dataclasses - 881 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 30
  • Position: #149 / 229
  • Number of attempts: 1
Making 3 line function a one liner. - 295 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #165 / 188
  • Number of attempts: 1
Put a cross in the square - 201 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 22
  • Position: #34 / 83
  • Number of attempts: 2
swap number pairs - 1945 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 30
  • Position: #231 / 359
  • Number of attempts: 1
HS Final exam vimgolf - 852 entries

Change the initial file to a single line containing all names comma-separated with numbers inside parentheses.

  • Best score: 21
  • Best player score: 25
  • Position: #111 / 224
  • Number of attempts: 7
Simple, Practical, and Common - 33256 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: 28
  • Position: #4485 / 7337
  • Number of attempts: 3
Just the middle - 11331 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #1502 / 4156
  • Number of attempts: 6
I forgot quotes - 15890 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Position: #2369 / 4152
  • Number of attempts: 3
Ludovic Schwartz
Github:

entered into 32 challenges

contributed 0 challenges