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

New teacher - 923 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 21
  • Position: #32 / 194
  • Number of attempts: 8
months to html list items - 1010 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 27
  • Position: #159 / 274
  • Number of attempts: 2
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: 83
  • Position: #82 / 87
  • Number of attempts: 2
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: 53
  • Position: #183 / 198
  • Number of attempts: 1
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: 60
  • Position: #387 / 415
  • Number of attempts: 1
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: 64
  • Position: #75 / 109
  • Number of attempts: 2
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: #193 / 309
  • Number of attempts: 1
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: 22
  • Position: #344 / 553
  • Number of attempts: 2
Filter number combinations that don't add to 11 - 408 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: 106
  • Position: #116 / 117
  • Number of attempts: 2
Tabbed Table to Python Array - 734 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: 87
  • Position: #164 / 179
  • Number of attempts: 1
HS exam question - 1589 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 106
  • Position: #350 / 417
  • Number of attempts: 1
Fizzbuzz - 573 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 272
  • Position: #161 / 168
  • Number of attempts: 1
Many duplicates - 1445 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #283 / 468
  • Number of attempts: 5
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: 74
  • Position: #128 / 154
  • Number of attempts: 2
delete swap - 1786 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #321 / 555
  • Number of attempts: 5
Generate a very basic Python constructor (fixed) - 1253 entries

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

  • Best score: 29
  • Best player score: 117
  • Position: #254 / 271
  • Number of attempts: 1
Fix the shell script! - 2544 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 34
  • Position: #308 / 589
  • Number of attempts: 4
Visual block training - 1070 entries

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

  • Best score: 17
  • Best player score: 54
  • Position: #150 / 204
  • Number of attempts: 1
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: #203 / 556
  • Number of attempts: 7
Wikitext headings to markdown - 987 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 71
  • Position: #192 / 209
  • Number of attempts: 3
hello-world-vimgolf - 2499 entries

Simple number generation

  • Best score: 10
  • Best player score: 16
  • Position: #577 / 708
  • Number of attempts: 5
Contribute to keyboard mashing - 890 entries

Speak in tongues

  • Best score: 17
  • Best player score: 18
  • Position: #90 / 270
  • Number of attempts: 6
Reordering Lorem Ipsum - 290 entries

Who even sorted this?

  • Best score: 13
  • Best player score: 96
  • Position: #48 / 66
  • Number of attempts: 2
Learn to ask for :help - 587 entries

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

  • Best score: 19
  • Best player score: 35
  • Position: #87 / 130
  • Number of attempts: 5
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: 52
  • Position: #222 / 348
  • Number of attempts: 2
Migrated to Postgres! - 331 entries

Celebration completion of this project. https://github.com/igrigorik/vimgolf/pull/322

  • Best score: 26
  • Best player score: 46
  • Position: #124 / 131
  • 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: 25
  • Position: #3411 / 7420
  • Number of attempts: 4
Swap values - 4616 entries

Well, swap the values...

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

Just give me the numbers.

  • Best score: 14
  • Best player score: 23
  • Position: #2857 / 3864
  • Number of attempts: 1
Every other line - 2910 entries

AaAaAaA

  • Best score: 12
  • Best player score: 26
  • Position: #677 / 703
  • Number of attempts: 3
Copy three lines - 2872 entries

If the site is up (by some miracle), make the text under every header identical.

  • Best score: 13
  • Best player score: 21
  • Position: #442 / 640
  • Number of attempts: 2
Just the middle - 11454 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #772 / 4197
  • Number of attempts: 2
Vice versa - 7907 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #231 / 2128
  • Number of attempts: 6
Order and join - 983 entries

There's something special about the input order.

  • Best score: 10
  • Best player score: 13
  • Position: #176 / 259
  • Number of attempts: 1
I forgot quotes - 15983 entries

Oops.

  • Best score: 10
  • Best player score: 23
  • Position: #3874 / 4180
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10663 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1040 / 3683
  • Number of attempts: 5
Words in parens - 12935 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #723 / 3963
  • Number of attempts: 5
Rodney Visser
Twitter:

entered into 37 challenges

contributed 0 challenges