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

One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 22
  • Position: #2650 / 3842
  • Number of attempts: 2
V to the i - 4751 entries

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

  • Best score: 7
  • Best player score: 9
  • Position: #1565 / 1879
  • 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: #100 / 376
  • Number of attempts: 2
Search and Replace 0 - 4792 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #374 / 1585
  • Number of attempts: 3
That hyphen - 2556 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 13
  • Position: #500 / 695
  • Number of attempts: 3
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 11
  • Position: #3869 / 4164
  • Number of attempts: 1
Basic renumbering - 5587 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 23
  • Position: #983 / 1258
  • Number of attempts: 2
Vice versa - 7805 entries

Little role switching.

  • Best score: 12
  • Best player score: 14
  • Position: #858 / 2101
  • Number of attempts: 3
Separating firstname & lastname - 120 entries

Seperate named with equal tabs.

  • Best score: 19
  • Best player score: 27
  • Position: #40 / 55
  • Number of attempts: 1
Assign numbers to fields - 105 entries

You are given a list of space-separated strings. Add an increasing numeric prefix to each one.

  • Best score: 19
  • Best player score: 19
  • Position: #4 / 59
  • Number of attempts: 2
Space out the alphabet - 1627 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 23
  • Position: #339 / 440
  • Number of attempts: 4
Mute the second method of this script - 447 entries

prepend a # infront of every line of the second method

  • Best score: 9
  • Best player score: 10
  • Position: #161 / 237
  • Number of attempts: 4
Sorting database text output - 219 entries

Sometimes it is nice to be able to quickly take column-formatted text output from the SQL command line and turn it into a list of useful data. In this case we want a unique, sorted list of the values from the second column combined into one comma-separated list. What is the fewest strokes you can do this in?

  • Best score: 24
  • Best player score: 31
  • Position: #76 / 81
  • Number of attempts: 2
Pretty format for variable declarations - 155 entries

Project standards demand the equal signs must be aligned for better readability.

  • Best score: 13
  • Best player score: 18
  • Position: #47 / 62
  • Number of attempts: 1
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Position: #2060 / 4161
  • Number of attempts: 2
-a-b-c- - 3176 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #529 / 1129
  • Number of attempts: 2
Count both ways - 1001 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #208 / 351
  • Number of attempts: 3
120 Degrees - 468 entries

Rotate that triangle.

  • Best score: 14
  • Best player score: 33
  • Position: #133 / 143
  • Number of attempts: 2
Gray area - 732 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 15
  • Position: #242 / 268
  • Number of attempts: 1
Do you demand a shrubbery? - 1120 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 28
  • Position: #195 / 293
  • Number of attempts: 2
Don't know what this is - 1978 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: 16
  • Position: #475 / 578
  • Number of attempts: 1
Where should I put the Newline? - 863 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #336 / 431
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10628 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #1965 / 3667
  • Number of attempts: 2
quotes inside quotes - 3125 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 17
  • Position: #853 / 1072
  • Number of attempts: 2
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2192 / 3946
  • Number of attempts: 1
Word frequency alignment - 276 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

  • Best score: 5
  • Best player score: 5
  • Position: #41 / 158
  • Number of attempts: 3
Enumerate words - 250 entries

Enumerate the unique words in order.

  • Best score: 23
  • Best player score: 34
  • Position: #81 / 89
  • Number of attempts: 1
Transposition - 82 entries

Transpose the original lines in separate columns, one for each line.

  • Best score: 31
  • Best player score: 71
  • Position: #26 / 30
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1581 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 14
  • Position: #365 / 439
  • Number of attempts: 2
Saving the hashes(#) - 1992 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: 32
  • Position: #409 / 473
  • Number of attempts: 1
Vertical Limit - 2448 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 30
  • Position: #649 / 738
  • Number of attempts: 1
replacing each line of a block selection - 2947 entries

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

  • Best score: 18
  • Best player score: 30
  • Position: #649 / 768
  • Number of attempts: 2
Simple text editing with Vim - 12290 entries

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

  • Best score: 13
  • Best player score: 26
  • Position: #3102 / 3581
  • Number of attempts: 1
Dmitry Zudochkin
Twitter:

Web developer (mostly ROR), transhumanist, misanthrope, big fan of Haskell and ReactJS

entered into 33 challenges

contributed 0 challenges