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

Todo list specification - 274 entries

The every item on the todo list must be done today. Modify the list to reflect that.

  • Best score: 37
  • Best player score: 39
  • Number of attempts: 3
Saving the hashes(#) - 1686 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: 28
  • Number of attempts: 2
Array transposition - 1297 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 27
  • Number of attempts: 1
Learn some german verbs - 326 entries

The list needs to be structured so we can print in verbatim and feel ok about how it looks.

  • Best score: 11
  • Best player score: 26
  • Number of attempts: 1
Nesting SASS - 204 entries

Move a block inside another block and indent it

  • Best score: 9
  • Best player score: 20
  • Number of attempts: 1
Simple, Practical, and Common - 21239 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: 5
  • Best player score: 22
  • Number of attempts: 5
Fiddle percentages into real numbers - 668 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 18
  • Number of attempts: 1
Scrambled numbers - 696 entries

Four is NOT 1. One is 1.

  • Best score: 18
  • Best player score: 20
  • Number of attempts: 8
Space out the alphabet - 1274 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 18
  • Number of attempts: 7
Fun With The Diagonal - 75 entries

change the lowercase characters on the main diagonal to uppercase

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 2
Mirror Symmetry - 681 entries

Add backslashes.

  • Best score: 7
  • Best player score: 10
  • Number of attempts: 4
Format java properties - 63 entries

Format java properties to a different format. The value which is the string following the first '=' cannot & should not change. All periods in the key get replaced with an underscore "_" and get a prefix of "b_".

  • Best score: 27
  • Best player score: 37
  • Number of attempts: 3
From argument to object - 1008 entries

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

  • Best score: 17
  • Best player score: 21
  • Number of attempts: 1
Context insensitive completion 0 - 440 entries

Buried in the lines you're not supposed to add is the line "Add this line!" Add that line to the top of the file.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 3
Ruby 1.9 hashes - 1030 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 6
V to the i - 3564 entries

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

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 4
comments galore - 870 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 3
Swap values - 3155 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 3
Team names - 1227 entries

The team names are misspelled.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 3
Where should I put the Newline? - 782 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 3
Search and Replace 0 - 3841 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 6
A HAPPY NEW YEAR 2014 ! - 9081 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 1
Change attribute to getter - 84 entries

Wrap attributes with a getter method.

  • Best score: 24
  • Best player score: 24
  • Number of attempts: 3
-a-b-c- - 2368 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Number of attempts: 2
Copy three lines - 1709 entries

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

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 6
Wrap text in quotes - 270 entries

All the blocks of text should be wrapped in quotation marks.

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 4
Just the middle - 8496 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 2
Collect List - 3164 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 6
comment and uncomment code inline - 627 entries

It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.

  • Best score: 9
  • Best player score: 17
  • Number of attempts: 1
Every other line - 1806 entries

AaAaAaA

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 6
Stairstep digits - 202 entries

Remove the evens. Double the odds.

  • Best score: 9
  • Best player score: 13
  • Number of attempts: 1
Do you demand a shrubbery? - 981 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 11
Words in parens - 10374 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 2
Pretty multi-line bash - 190 entries

Bash line continuations are much prettier when they're column aligned.

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 7
James Houghton
Twitter:

UVA CS '21

entered into 34 challenges

contributed 0 challenges