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

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 25
  • Position: #103 / 251
  • Number of attempts: 2
months to html list items - 1064 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 25
  • Position: #113 / 289
  • Number of attempts: 3
Quicksort - 2005 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: 30
  • Position: #339 / 442
  • Number of attempts: 1
Populate 3D bone names list - 633 entries

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

  • Best score: 21
  • Best player score: 32
  • Position: #108 / 163
  • Number of attempts: 1
Find fix point of cos - 1408 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: 20
  • Position: #324 / 418
  • 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: 66
  • Position: #76 / 109
  • Number of attempts: 1
Surround the 'z' character with brackets, quotes, and print as formatted string. - 561 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #202 / 314
  • Number of attempts: 1
Paste a column after a column - 2557 entries

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

  • Best score: 14
  • Best player score: 34
  • Position: #436 / 558
  • Number of attempts: 1
Tabbed Table to Python Array - 735 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: 60
  • Position: #90 / 179
  • Number of attempts: 2
HS exam question - 1589 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 71
  • Position: #212 / 417
  • Number of attempts: 1
delete swap - 1788 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #329 / 557
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1660 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #401 / 558
  • Number of attempts: 1
hello-world-vimgolf - 2501 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #319 / 709
  • Number of attempts: 2
Contribute to keyboard mashing - 890 entries

Speak in tongues

  • Best score: 17
  • Best player score: 20
  • Position: #205 / 270
  • Number of attempts: 1
Learn to ask for :help - 587 entries

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

  • Best score: 19
  • Best player score: 45
  • Position: #113 / 130
  • 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: 29
  • Position: #68 / 131
  • Number of attempts: 3
simple replacements - 1802 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 21
  • Position: #160 / 390
  • Number of attempts: 9
Inverting Lines - 1907 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 12
  • Position: #308 / 512
  • Number of attempts: 5
Modernise code - 1402 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 36
  • Position: #105 / 324
  • Number of attempts: 2
Rural Post - 4547 entries

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

  • Best score: 9
  • Best player score: 14
  • Position: #734 / 1109
  • Number of attempts: 1
Satisfy the go linter - 2437 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: 27
  • Position: #329 / 481
  • Number of attempts: 1
Simple, Practical, and Common - 33742 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: 24
  • Position: #3124 / 7447
  • Number of attempts: 4
One number per line - 18776 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Position: #2316 / 3875
  • Number of attempts: 1
Split line with dots - 2154 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 20
  • Position: #388 / 635
  • Number of attempts: 1
remove lines containing the word "reader" - 3604 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #499 / 1169
  • Number of attempts: 2
Copy three lines - 2875 entries

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

  • Best score: 13
  • Best player score: 23
  • Position: #531 / 641
  • Number of attempts: 1
Vertical Limit - 2552 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 25
  • Position: #395 / 757
  • Number of attempts: 1
Exchanging Quotes - 858 entries

Sometimes you need to exchange a choice of quotes in some code.

  • Best score: 30
  • Best player score: 38
  • Position: #159 / 230
  • Number of attempts: 1
replacing each line of a block selection - 3005 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 24
  • Position: #521 / 779
  • Number of attempts: 1
Switch function arguments - 2147 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Position: #431 / 666
  • Number of attempts: 2
Append semicolon after expressions - 1056 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 13
  • Position: #357 / 419
  • Number of attempts: 1
gpfl0712
Github:

entered into 31 challenges

contributed 0 challenges