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

Capitalize the Names - 361 entries

I want to capitalize the names in quotes, but just the people's names, not the file names.

  • Best score: 21
  • Best player score: 21
  • Position: #4 / 91
  • Number of attempts: 2
Yo To Hello - 1107 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #28 / 512
  • Number of attempts: 4
Simple, Practical, and Common - 33353 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: 31
  • Position: #5497 / 7358
  • Number of attempts: 2
Swap values - 4535 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 12
  • Position: #442 / 1255
  • Number of attempts: 6
prepend * to every non-blank line - 6201 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 15
  • Position: #934 / 1514
  • Number of attempts: 3
One number per line - 18613 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 23
  • Position: #2918 / 3841
  • Number of attempts: 2
V to the i - 4743 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #535 / 1878
  • Number of attempts: 3
multiple cursor alternative - 1474 entries

from: https://www.reddit.com/r/vim/comments/6w5pfa/crosspost_from_remacs_how_would_you_do_this_in_vim/

  • Best score: 19
  • Best player score: 20
  • Position: #130 / 376
  • Number of attempts: 5
Search and Replace 0 - 4790 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #840 / 1585
  • Number of attempts: 7
That hyphen - 2554 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 14
  • Position: #578 / 694
  • Number of attempts: 1
comment and uncomment code inline - 1069 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: #75 / 314
  • Number of attempts: 4
Team names - 1805 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 19
  • Position: #410 / 581
  • Number of attempts: 3
Stairstep digits - 376 entries

Remove the evens. Double the odds.

  • Best score: 9
  • Best player score: 9
  • Position: #32 / 141
  • Number of attempts: 4
Basic renumbering - 5584 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 23
  • Position: #1043 / 1257
  • Number of attempts: 1
Fiddle percentages into real numbers - 840 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: 13
  • Position: #98 / 287
  • Number of attempts: 5
Vice versa - 7778 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #331 / 2095
  • Number of attempts: 6
Swap assigned value - 614 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 11
  • Position: #177 / 247
  • Number of attempts: 1
-a-b-c- - 3170 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #986 / 1127
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10616 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Position: #2791 / 3663
  • Number of attempts: 2
Words in parens - 12848 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 18
  • Position: #2927 / 3943
  • Number of attempts: 3
A simple change - 434 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 17
  • Position: #163 / 187
  • Number of attempts: 1
Luke Parsons
Twitter:

entered into 21 challenges

contributed 0 challenges