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

Simple, Practical, and Common - 33621 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: 28
  • Position: #4200 / 7422
  • Number of attempts: 2
Interweave two blocks of text - 659 entries

Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?

  • Best score: 15
  • Best player score: 17
  • Position: #86 / 214
  • Number of attempts: 1
Vertical Limit - 2538 entries

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

  • Best score: 21
  • Best player score: 34
  • Position: #703 / 754
  • Number of attempts: 1
Switch function arguments - 2139 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 16
  • Position: #584 / 663
  • Number of attempts: 3
switch variable - 5071 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 21
  • Position: #1675 / 1748
  • Number of attempts: 2
PHP <--> Java class conversion Part 1 - 254 entries

Convert this tiny php class to adequate java one.

  • Best score: 65
  • Best player score: 128
  • Position: #49 / 63
  • Number of attempts: 1
Multiplication table. - 232 entries

Create a multiplication table.

  • Best score: 31
  • Best player score: 162
  • Position: #63 / 68
  • Number of attempts: 1
Sort the cardinal numbers - 310 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 14
  • Position: #87 / 148
  • Number of attempts: 2
Line Zipper - 473 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Position: #121 / 215
  • Number of attempts: 1
remove dupes from array - 1358 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 45
  • Position: #323 / 336
  • Number of attempts: 2
PHP <--> Java class conversion Part 2 - 98 entries

Same class but reverse!

  • Best score: 79
  • Best player score: 125
  • Position: #22 / 39
  • Number of attempts: 1
Case preserving word replacement - 454 entries

Half way through my project, my people turned into dogs. Now I have to change everything in my source.

  • Best score: 19
  • Best player score: 23
  • Position: #132 / 180
  • Number of attempts: 3
Rotating Philosophers Problem - 410 entries

Can you help the philosophers find a good place to sit before they get five forks and spaghetti?

  • Best score: 29
  • Best player score: 34
  • Position: #142 / 166
  • Number of attempts: 2
expand a list comprehension (python) - 333 entries

Please show your way to convert a list comprehension in python to an ordinary for-loop expression!

  • Best score: 42
  • Best player score: 51
  • Position: #43 / 109
  • Number of attempts: 4
Numbering a List - 1931 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 34
  • Position: #616 / 652
  • Number of attempts: 1
A Simple One - 1050 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #208 / 664
  • Number of attempts: 1
Increment, increment, increment.... - 688 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #204 / 408
  • Number of attempts: 1
The Cake is a Lie - 1346 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 11
  • Position: #418 / 527
  • Number of attempts: 1
Compile C - 430 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 22
  • Position: #88 / 141
  • Number of attempts: 1
Sort and add attributes - 1452 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 35
  • Position: #394 / 564
  • Number of attempts: 2
Simple text editing with Vim - 12815 entries

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

  • Best score: 13
  • Best player score: 23
  • Position: #2993 / 3696
  • Number of attempts: 4
Dan Masquelier
Twitter:

Software Engineer @Nextdoor, musician, Star Wars fan.

entered into 21 challenges

contributed 0 challenges