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

Comparing scores - 68 entries

If Alice and Bob both did the challenge, put their entries together in the top paragraph, so we can compare their scores more easily.

  • Best score: 18
  • Best player score: 69
  • Number of attempts: 1
Sort and add attributes - 1067 entries

Sort the states and add the attribute country to each record.

  • Best score: 18
  • Best player score: 34
  • Number of attempts: 4
NBCU Weekly Challenge - #0 - 118 entries

One of our favorites lines here at NBCU! p.s. The first version of #0 was deleted due to me copy/pasting a HTML entity. Congrats to the one who figured that out, you are a true ninja warrior!

  • Best score: 30
  • Best player score: 33
  • Number of attempts: 3
Saving the hashes(#) - 1709 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 27
  • Number of attempts: 5
Swap values - 3413 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 5
switch variable - 4244 entries

how fast can you switch two variable ?

  • Best score: 3
  • Best player score: 12
  • Number of attempts: 3
V to the i - 3800 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 3
Switch function arguments - 1815 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 3
Search and Replace 0 - 4019 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 5
A HAPPY NEW YEAR 2014 ! - 9373 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 2
Just the middle - 8977 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 2
Words in parens - 10843 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 2
Prefixes and suffixes - 485 entries

Generate all prefixes of "vimchallenge", then all suffixes.

  • Best score: 17
  • Best player score: 27
  • Number of attempts: 7
Append semicolon after expressions - 843 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 2
Let's play some Ivmgolf - 890 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 4
Delete unwanted lines - 333 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 2
NBCU Weekly Challenge - Test - 215 entries

Just testing.

  • Best score: 18
  • Best player score: 20
  • Number of attempts: 2
Don't know what this is - 1711 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 3
Simple, Practical, and Common - 24026 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: 2
  • Best player score: 26
  • Number of attempts: 4
Simple text editing with Vim - 10277 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 4
Make it more readable - 1738 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
I forgot quotes - 11370 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Number of attempts: 3
Split line with dots - 1794 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 4
quotes inside quotes - 2726 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 2
  • Best player score: 17
  • Number of attempts: 1
Minimalist Limerick - 448 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 48
  • Number of attempts: 2
replacing each line of a block selection - 2475 entries

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

  • Best score: 17
  • Best player score: 21
  • Number of attempts: 1
One number per line - 12146 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 3
lamb had a little Mary - 464 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 38
  • Number of attempts: 1
Numbering a List - 1719 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Number of attempts: 3
Fnord Everywhere
Twitter:

Sysadmin with strong emphasis on CI/CD and attemting to live the Devops Culture

entered into 29 challenges

contributed 0 challenges