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 - 1692 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: 6
  • Position: #38 / 372
  • Number of attempts: 15
EDN reformat - 1085 entries

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

  • Best score: 17
  • Best player score: 34
  • Position: #117 / 151
  • Number of attempts: 4
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: 169
  • Position: #64 / 79
  • Number of attempts: 3
Pick and sort servers from mirror list - 363 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: 80
  • Position: #72 / 79
  • Number of attempts: 4
Populate 3D bone names list - 490 entries

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

  • Best score: 21
  • Best player score: 42
  • Position: #119 / 135
  • Number of attempts: 3
Remove line numbers - 617 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: 50
  • Position: #151 / 166
  • Number of attempts: 1
Find fix point of cos - 1169 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: 21
  • Position: #276 / 355
  • Number of attempts: 2
Insert column data on Confluence-style table - 438 entries

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

  • Best score: 33
  • Best player score: 119
  • Position: #99 / 103
  • Number of attempts: 1
Surround the 'z' character with brackets, quotes, and print as formatted string. - 502 entries

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

  • Best score: 17
  • Best player score: 21
  • Position: #274 / 283
  • Number of attempts: 1
Easier Align - 357 entries

Align the columns of a markdown table

  • Best score: 51
  • Best player score: 420
  • Position: #78 / 92
  • Number of attempts: 1
Paste a column after a column - 2367 entries

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

  • Best score: 14
  • Best player score: 20
  • Position: #281 / 514
  • 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: #24 / 112
  • Number of attempts: 2
Tabbed Table to Python Array - 646 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: 111
  • Position: #161 / 168
  • Number of attempts: 1
HS exam question - 1517 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 131
  • Position: #369 / 401
  • Number of attempts: 1
Changing around text with citations - 323 entries

Based off of something I saw on reddit

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

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

  • Best score: 15
  • Best player score: 82
  • Position: #190 / 211
  • Number of attempts: 1
Many duplicates - 1303 entries

Quick and easy

  • Best score: 7
  • Best player score: 9
  • Position: #305 / 428
  • Number of attempts: 5
2 quick changes and a numbered list - 613 entries

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

  • Best score: 37
  • Best player score: 97
  • Position: #135 / 147
  • Number of attempts: 3
delete swap - 1614 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #277 / 503
  • Number of attempts: 5
Generate a very basic Python constructor (fixed) - 1215 entries

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

  • Best score: 29
  • Best player score: 59
  • Position: #210 / 255
  • Number of attempts: 6
Fix the shell script! - 2414 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 26
  • Position: #48 / 559
  • Number of attempts: 20
Visual block training - 1041 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #8 / 192
  • Number of attempts: 26
Put a newline after every 10 lines in vim - 1629 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #392 / 543
  • Number of attempts: 7
Java to JavaScript - 265 entries

Let convert some simple Java file to JavaScript!

  • Best score: 59
  • Best player score: 151
  • Position: #66 / 70
  • Number of attempts: 1
hello-world-vimgolf - 2421 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #290 / 688
  • Number of attempts: 1
Contribute to keyboard mashing - 870 entries

Speak in tongues

  • Best score: 17
  • Best player score: 18
  • Position: #108 / 264
  • Number of attempts: 11
Fill in the chess board - 932 entries

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

  • Best score: 19
  • Best player score: 218
  • Position: #176 / 179
  • Number of attempts: 1
Learn to ask for :help - 571 entries

Learn to use the help to reduce your strokes...

  • Best score: 19
  • Best player score: 31
  • Position: #66 / 127
  • Number of attempts: 12
Plotting some variables in python - 1597 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: 48
  • Position: #192 / 342
  • Number of attempts: 2
LandR
Twitter2:

entered into 29 challenges

contributed 0 challenges