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

months to html list items - 548 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 36
  • Position: #129 / 153
  • Number of attempts: 4
Quicksort - 1553 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: 7
  • Position: #128 / 341
  • Number of attempts: 8
Tic-Tac-Toe Grid Transformation - 319 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: 148
  • Position: #51 / 77
  • Number of attempts: 1
Pick and sort servers from mirror list - 344 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: 48
  • Position: #55 / 75
  • Number of attempts: 2
Populate 3D bone names list - 450 entries

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

  • Best score: 21
  • Best player score: 37
  • Position: #98 / 119
  • Number of attempts: 4
Remove line numbers - 537 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: 18
  • Position: #89 / 143
  • Number of attempts: 2
Find fix point of cos - 1116 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: 16
  • Position: #223 / 334
  • Number of attempts: 3
Insert column data on Confluence-style table - 425 entries

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

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

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

  • Best score: 17
  • Best player score: 17
  • Position: #69 / 271
  • Number of attempts: 4
Paste a column after a column - 2243 entries

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

  • Best score: 14
  • Best player score: 23
  • Position: #308 / 487
  • Number of attempts: 4
HS exam question - 1497 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 72
  • Position: #201 / 393
  • Number of attempts: 3
Reformat symbols in list - 1466 entries

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

  • Best score: 24
  • Best player score: 42
  • Position: #266 / 322
  • Number of attempts: 1
Many duplicates - 1251 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #343 / 410
  • Number of attempts: 2
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: 73
  • Position: #121 / 145
  • Number of attempts: 1
delete swap - 1522 entries

delete all swap

  • Best score: 5
  • Best player score: 14
  • Position: #441 / 476
  • Number of attempts: 3
Fix the shell script! - 2328 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 36
  • Position: #335 / 539
  • Number of attempts: 4
Put a newline after every 10 lines in vim - 1574 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #142 / 523
  • Number of attempts: 4
Java to JavaScript - 257 entries

Let convert some simple Java file to JavaScript!

  • Best score: 59
  • Best player score: 108
  • Position: #56 / 67
  • Number of attempts: 2
hello-world-vimgolf - 2346 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #317 / 663
  • Number of attempts: 6
Learn to ask for :help - 531 entries

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

  • Best score: 19
  • Best player score: 59
  • Position: #115 / 121
  • Number of attempts: 1
Plotting some variables in python - 1558 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: 43
  • Position: #144 / 333
  • Number of attempts: 2
Lowercase first characters - 467 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: 50
  • Position: #146 / 175
  • Number of attempts: 2
Increment number for every 10 lines - 219 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: 47
  • Position: #35 / 61
  • Number of attempts: 1
CSV to MD format - 388 entries

To convert a CSV list to Markdown list

  • Best score: 36
  • Best player score: 108
  • Position: #77 / 91
  • Number of attempts: 1
Making 3 line function a one liner. - 305 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #171 / 194
  • Number of attempts: 1
swap number pairs - 2011 entries

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

  • Best score: 16
  • Best player score: 37
  • Position: #298 / 370
  • Number of attempts: 2
Rural Post - 4362 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 10
  • Position: #323 / 1071
  • Number of attempts: 6
Satisfy the go linter - 2329 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 34
  • Position: #384 / 457
  • Number of attempts: 1
Simple, Practical, and Common - 33379 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: 29
  • Position: #4929 / 7363
  • Number of attempts: 5
prepend * to every non-blank line - 6208 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 11
  • Position: #632 / 1517
  • Number of attempts: 6
One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Position: #2283 / 3842
  • Number of attempts: 4
Add semicolons - 10792 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1573 / 3044
  • Number of attempts: 4
Com(m)a Trouble - 3668 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 20
  • Position: #615 / 826
  • Number of attempts: 1
Box it - 7827 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 44
  • Position: #1739 / 1864
  • Number of attempts: 1
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 11
  • Position: #3945 / 4164
  • Number of attempts: 1
create arrows in a list - 103 entries

Add arrow at same distance

  • Best score: 10
  • Best player score: 31
  • Position: #70 / 70
  • Number of attempts: 3
comments galore - 998 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 10
  • Position: #301 / 418
  • Number of attempts: 4
A HAPPY NEW YEAR 2014 ! - 10624 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Position: #2844 / 3666
  • Number of attempts: 1
Switch function arguments - 2078 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 16
  • Position: #604 / 651
  • Number of attempts: 5
Getters & Setters: Java - 205 entries

Boilerplate getters & setters - it's a tedious fact of life in Java, and probably the only thing that still pulls me back to an IDE. Perhaps someone knows a fast, pure vim way...

  • Best score: 89
  • Best player score: 190
  • Position: #53 / 56
  • Number of attempts: 1
Pieter-Jan Lavaerts
Twitter:

entered into 40 challenges

contributed 0 challenges