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

Turn the months into list items.

  • Best score: 22
  • Best player score: 36
  • Position: #235 / 274
  • Number of attempts: 4
Quicksort - 1962 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: #150 / 431
  • Number of attempts: 8
Tic-Tac-Toe Grid Transformation - 396 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: #55 / 83
  • Number of attempts: 1
Pick and sort servers from mirror list - 431 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: #65 / 87
  • Number of attempts: 2
Populate 3D bone names list - 629 entries

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

  • Best score: 21
  • Best player score: 37
  • Position: #130 / 162
  • Number of attempts: 4
Remove line numbers - 736 entries

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

  • Best score: 9
  • Best player score: 18
  • Position: #127 / 198
  • Number of attempts: 2
Find fix point of cos - 1402 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: #273 / 415
  • Number of attempts: 3
Insert column data on Confluence-style table - 458 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: #97 / 109
  • Number of attempts: 1
Surround the 'z' character with brackets, quotes, and print as formatted string. - 554 entries

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

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

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

  • Best score: 14
  • Best player score: 23
  • Position: #355 / 553
  • Number of attempts: 4
HS exam question - 1589 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 72
  • Position: #215 / 417
  • Number of attempts: 3
Reformat symbols in list - 1621 entries

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

  • Best score: 24
  • Best player score: 42
  • Position: #289 / 348
  • Number of attempts: 1
Many duplicates - 1445 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #388 / 468
  • Number of attempts: 2
2 quick changes and a numbered list - 647 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: #126 / 154
  • Number of attempts: 1
delete swap - 1786 entries

delete all swap

  • Best score: 5
  • Best player score: 14
  • Position: #506 / 555
  • Number of attempts: 3
Fix the shell script! - 2544 entries

Fix the shell script with the fewest keystrokes!

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

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

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

Let convert some simple Java file to JavaScript!

  • Best score: 59
  • Best player score: 108
  • Position: #60 / 74
  • Number of attempts: 2
hello-world-vimgolf - 2499 entries

Simple number generation

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

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

  • Best score: 19
  • Best player score: 59
  • Position: #123 / 130
  • Number of attempts: 1
Plotting some variables in python - 1661 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: #151 / 348
  • Number of attempts: 2
Lowercase first characters - 487 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 / 183
  • Number of attempts: 2
Increment number for every 10 lines - 230 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 / 64
  • Number of attempts: 1
CSV to MD format - 413 entries

To convert a CSV list to Markdown list

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

Simple challenge for frequent action while programming.

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

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

  • Best score: 16
  • Best player score: 37
  • Position: #305 / 380
  • Number of attempts: 2
Rural Post - 4479 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #334 / 1097
  • Number of attempts: 6
Satisfy the go linter - 2391 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: #395 / 471
  • Number of attempts: 1
Simple, Practical, and Common - 33616 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: #4955 / 7420
  • Number of attempts: 5
prepend * to every non-blank line - 6308 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #643 / 1537
  • Number of attempts: 6
One number per line - 18727 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Position: #2292 / 3864
  • Number of attempts: 4
Add semicolons - 10852 entries

Simply add a semicolon at the end of each line

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

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

  • Best score: 12
  • Best player score: 20
  • Position: #643 / 865
  • Number of attempts: 1
Box it - 7905 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 44
  • Position: #1751 / 1876
  • Number of attempts: 1
Just the middle - 11454 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 11
  • Position: #3973 / 4197
  • Number of attempts: 1
create arrows in a list - 117 entries

Add arrow at same distance

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

Basic comment reformatting

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

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Position: #2857 / 3683
  • Number of attempts: 1
Switch function arguments - 2139 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 16
  • Position: #615 / 663
  • Number of attempts: 5
Getters & Setters: Java - 207 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 / 58
  • Number of attempts: 1
Pieter-Jan Lavaerts
Twitter:

entered into 40 challenges

contributed 0 challenges