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

Rearrange array to single level - 1298 entries

The goal is to flatten the array into a single list and remove any empty elements.

  • Best score: 14
  • Best player score: 14
  • Position: #10 / 205
  • Number of attempts: 32
Rearrange array to one line - 602 entries

Rearrange the array content on only one line, and remove trailing commas

  • Best score: 13
  • Best player score: 13
  • Position: #17 / 144
  • Number of attempts: 13
New teacher - 923 entries

Update the details of the new CS teacher.

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

Turn the months into list items.

  • Best score: 22
  • Best player score: 22
  • Position: #32 / 274
  • Number of attempts: 17
Many duplicates - 1445 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #303 / 468
  • Number of attempts: 8
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: #129 / 154
  • Number of attempts: 4
delete swap - 1786 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #350 / 555
  • Number of attempts: 8
Add semicolons - 10852 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #766 / 3063
  • Number of attempts: 13
comment and uncomment code inline - 1122 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: 9
  • Position: #161 / 322
  • Number of attempts: 14
camel riding - 793 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 15
  • Position: #77 / 281
  • Number of attempts: 13
-a-b-c- - 3213 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 14
  • Position: #436 / 1137
  • Number of attempts: 9
ARK
Github:

entered into 11 challenges

contributed 0 challenges