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

Box it - 3577 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Number of attempts: 5
One number per line - 13426 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 8
Preferably without multi-cursor plugin - 296 entries

Originally asked as question on reddit by kpthunder: https://www.reddit.com/r/vim/comments/9fvsro/what_is_the_most_efficient_way_to_go_about/

  • Best score: 30
  • Best player score: 42
  • Number of attempts: 2
Reorder the groups - 545 entries

Change the order so that the groups of fruit come before the vegetables.

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 10
Simple text editing with Vim - 10552 entries

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

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 4
Extract argument from function - 2019 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 4
Inner hyphens - 111 entries

Yet another hyphen challenge. Adding 5 hyphens to a file shouldn't be too hard.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 1
Add semicolons - 2827 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 2
Just the middle - 9428 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 9614 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 2
Bad Copy Syntax - 662 entries

Copy should be from right to left, but sometimes you type it wrong.

  • Best score: 19
  • Best player score: 22
  • Number of attempts: 1
ASCII Art - 76 entries

how good are you with simple regex?

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 2
That hyphen - 2205 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 10
  • Number of attempts: 5
Swap values - 3629 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 7
V to the i - 3979 entries

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

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 2
Mirrored text - 153 entries

backward and forward, and long enough to be challenging

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 2
Align commas - 854 entries

There are 15,000 aligning challenges on vimgolf.com, and they're all exactly the same. I hope this one is a little different.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 12
Append semicolon after expressions - 872 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 7
Saving the hashes(#) - 1770 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: 20
  • Number of attempts: 14
Fun With The Diagonal - 85 entries

change the lowercase characters on the main diagonal to uppercase

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 2
Simple, Practical, and Common - 25756 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: 22
  • Number of attempts: 9
Don't know what this is - 1775 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: 11
  • Number of attempts: 7

Contributed Challenges

ASCII Art - 76 entries

how good are you with simple regex?

Fun With The Diagonal - 85 entries

change the lowercase characters on the main diagonal to uppercase

Wistan Chou
Twitter:

entered into 22 challenges

contributed 2 challenges