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 - 825 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 36
  • Position: #189 / 221
  • Number of attempts: 4
Quicksort - 1755 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: #140 / 384
  • Number of attempts: 8
Tic-Tac-Toe Grid Transformation - 329 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: #53 / 80
  • Number of attempts: 1
Pick and sort servers from mirror list - 379 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: #60 / 81
  • Number of attempts: 2
Populate 3D bone names list - 525 entries

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

  • Best score: 21
  • Best player score: 37
  • Position: #112 / 141
  • Number of attempts: 4
Remove line numbers - 654 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: #110 / 173
  • Number of attempts: 2
Find fix point of cos - 1199 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: #243 / 363
  • Number of attempts: 3
Insert column data on Confluence-style table - 441 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: #94 / 104
  • Number of attempts: 1
Surround the 'z' character with brackets, quotes, and print as formatted string. - 507 entries

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

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

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

  • Best score: 14
  • Best player score: 23
  • Position: #335 / 523
  • Number of attempts: 4
HS exam question - 1523 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 72
  • Position: #207 / 404
  • Number of attempts: 3
Reformat symbols in list - 1507 entries

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

  • Best score: 24
  • Best player score: 42
  • Position: #275 / 334
  • Number of attempts: 1
Many duplicates - 1342 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #367 / 439
  • Number of attempts: 2
2 quick changes and a numbered list - 614 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: #123 / 147
  • Number of attempts: 1
delete swap - 1650 entries

delete all swap

  • Best score: 5
  • Best player score: 14
  • Position: #472 / 514
  • Number of attempts: 3
Fix the shell script! - 2428 entries

Fix the shell script with the fewest keystrokes!

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

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

  • Best score: 10
  • Best player score: 11
  • Position: #147 / 550
  • Number of attempts: 4
Java to JavaScript - 267 entries

Let convert some simple Java file to JavaScript!

  • Best score: 59
  • Best player score: 108
  • Position: #59 / 72
  • Number of attempts: 2
hello-world-vimgolf - 2472 entries

Simple number generation

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

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

  • Best score: 19
  • Best player score: 59
  • Position: #122 / 128
  • Number of attempts: 1
Plotting some variables in python - 1604 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: #150 / 344
  • Number of attempts: 2
Lowercase first characters - 484 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: #150 / 181
  • Number of attempts: 2
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: 47
  • Position: #37 / 63
  • Number of attempts: 1
CSV to MD format - 404 entries

To convert a CSV list to Markdown list

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

Simple challenge for frequent action while programming.

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

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

  • Best score: 16
  • Best player score: 37
  • Position: #300 / 373
  • Number of attempts: 2
Rural Post - 4425 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #330 / 1085
  • Number of attempts: 6
Satisfy the go linter - 2359 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: #389 / 464
  • Number of attempts: 1
Simple, Practical, and Common - 33483 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: #4939 / 7384
  • Number of attempts: 5
prepend * to every non-blank line - 6254 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #640 / 1530
  • Number of attempts: 6
One number per line - 18673 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Position: #2289 / 3852
  • Number of attempts: 4
Add semicolons - 10831 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1576 / 3055
  • Number of attempts: 4
Com(m)a Trouble - 3709 entries

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

  • Best score: 12
  • Best player score: 20
  • Position: #625 / 838
  • Number of attempts: 1
Box it - 7849 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 44
  • Position: #1745 / 1870
  • Number of attempts: 1
Just the middle - 11380 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 11
  • Position: #3953 / 4174
  • Number of attempts: 1
create arrows in a list - 106 entries

Add arrow at same distance

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

Basic comment reformatting

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

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Position: #2853 / 3677
  • Number of attempts: 1
Switch function arguments - 2085 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 16
  • Position: #606 / 653
  • Number of attempts: 5
Getters & Setters: Java - 206 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: #54 / 57
  • Number of attempts: 1
Pieter-Jan Lavaerts
Twitter:

entered into 40 challenges

contributed 0 challenges