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

Swap values - 4616 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 16
  • Position: #1077 / 1268
  • Number of attempts: 1
One number per line - 18727 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 24
  • Position: #3209 / 3864
  • Number of attempts: 1
V to the i - 4802 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #593 / 1893
  • Number of attempts: 3
Swap the operands under comparison - 297 entries

Swap the operands under comparison to prevent null pointer exception (at least in java)

  • Best score: 19
  • Best player score: 22
  • Position: #50 / 101
  • Number of attempts: 1
Split line with dots - 2144 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 34
  • Position: #608 / 634
  • Number of attempts: 1
multiple cursor alternative - 1519 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: 27
  • Position: #323 / 380
  • Number of attempts: 1
From argument to object - 1508 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: 25
  • Position: #421 / 458
  • Number of attempts: 1
Every other line - 2910 entries

AaAaAaA

  • Best score: 12
  • Best player score: 31
  • Position: #692 / 703
  • Number of attempts: 1
Copy three lines - 2872 entries

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

  • Best score: 13
  • Best player score: 21
  • Position: #463 / 640
  • Number of attempts: 1
Preferably without multi-cursor plugin - 540 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: 39
  • Position: #96 / 129
  • Number of attempts: 1
That hyphen - 2595 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 13
  • Position: #534 / 701
  • Number of attempts: 1
Generate a list of numbers - 295 entries

Please generate list of numbers from 1 to 20.

  • Best score: 14
  • Best player score: 17
  • Position: #129 / 140
  • Number of attempts: 2
convert yml into java pojo field - 857 entries

How fast vim can create fields for java pojo i.e class declaration referring to a (simple) yml file

  • Best score: 29
  • Best player score: 34
  • Position: #174 / 227
  • Number of attempts: 1
Collect List - 4298 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 15
  • Position: #733 / 1190
  • Number of attempts: 2
-a-b-c- - 3213 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #685 / 1137
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10663 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2332 / 3683
  • Number of attempts: 1
The name of the game - 665 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #241 / 360
  • Number of attempts: 1
Saving the hashes(#) - 2063 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: 48
  • Position: #468 / 480
  • Number of attempts: 1
replacing each line of a block selection - 2999 entries

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

  • Best score: 18
  • Best player score: 21
  • Position: #406 / 777
  • Number of attempts: 1
Switch function arguments - 2139 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 15
  • Position: #575 / 663
  • Number of attempts: 1
Ugly spreadsheet copy/paste to CSV - 1009 entries

convert an ugly spreadsheet copy/paste into a CSV format.

  • Best score: 19
  • Best player score: 43
  • Position: #130 / 193
  • Number of attempts: 1
Table Reshuffle - 429 entries

Fix the column order in this table... also append the new 'username' column.

  • Best score: 22
  • Best player score: 36
  • Position: #94 / 139
  • Number of attempts: 2
prince ducaca
Twitter:

étron royal

entered into 22 challenges

contributed 0 challenges