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 - 33757 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: 29
  • Position: #4647 / 7450
  • Number of attempts: 1
Swap values - 4647 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 15
  • Position: #855 / 1276
  • Number of attempts: 1
One number per line - 18784 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #1651 / 3878
  • Number of attempts: 2
V to the i - 4824 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1188 / 1899
  • Number of attempts: 2
Copy three lines - 2875 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #19 / 641
  • Number of attempts: 15
Python Hello World! Reformatting - 1006 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 43
  • Position: #182 / 383
  • Number of attempts: 3
Basic renumbering - 5685 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 14
  • Position: #466 / 1270
  • Number of attempts: 4
Add to end of each line... kinda - 338 entries

Visual-block mode can be used to add something to the end of each line, even if they are of differing lengths. However, what if it's not quite at the end?

  • Best score: 12
  • Best player score: 12
  • Position: #81 / 175
  • Number of attempts: 2
Vice versa - 7968 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1258 / 2144
  • Number of attempts: 2
Free hyphen! - 176 entries

Just like "Inner hyphens", but I'm giving you a free hyphen to play with. Will your solution be any different?

  • Best score: 9
  • Best player score: 9
  • Position: #12 / 90
  • Number of attempts: 3
C Reformatting - 690 entries

You may use Visual mode... or not. #uppercase

  • Best score: 30
  • Best player score: 56
  • Position: #105 / 163
  • Number of attempts: 4
Paragraph sort - 450 entries

My large herbivorous mammals, Vim commands, and POSIX utilities need to be sorted separately.

  • Best score: 14
  • Best player score: 18
  • Position: #84 / 125
  • Number of attempts: 5
Sorting a glossary - 132 entries

Sort a glossary. Glossary head contains a header phrase ending with ':' and glossary body has multi line text indented with a tab.

  • Best score: 6
  • Best player score: 6
  • Position: #48 / 82
  • Number of attempts: 2
Mirrored text - 185 entries

backward and forward, and long enough to be challenging

  • Best score: 14
  • Best player score: 15
  • Position: #27 / 72
  • Number of attempts: 3
Generate a list of numbers - 299 entries

Please generate list of numbers from 1 to 20.

  • Best score: 14
  • Best player score: 15
  • Position: #93 / 141
  • Number of attempts: 2
Collect List - 4312 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #232 / 1193
  • Number of attempts: 5
VimGolfNight - 575 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #239 / 352
  • Number of attempts: 2
Line 'em up! - 421 entries

It can be so hard to keep everything neatly lined-up. Somebody clearly hasn't bothered here. Tidy it up, please!

  • Best score: 17
  • Best player score: 17
  • Position: #27 / 114
  • Number of attempts: 4
I forgot quotes - 16051 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1666 / 4194
  • Number of attempts: 4
Lisp Condense - 460 entries

Reduce 4 cons selection operations down to one function call.

  • Best score: 13
  • Best player score: 14
  • Position: #83 / 158
  • Number of attempts: 5
120 Degrees - 505 entries

Rotate that triangle.

  • Best score: 14
  • Best player score: 14
  • Position: #26 / 146
  • Number of attempts: 6
A HAPPY NEW YEAR 2014 ! - 10699 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2135 / 3695
  • Number of attempts: 6
Words in parens - 12969 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1553 / 3970
  • Number of attempts: 4
Let's play some Ivmgolf - 1130 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #293 / 448
  • Number of attempts: 2
Append semicolon after expressions - 1057 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #99 / 420
  • Number of attempts: 3
Remove noise from HTTP log - 724 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 16
  • Position: #190 / 275
  • Number of attempts: 3
Ugly spreadsheet copy/paste to CSV - 1009 entries

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

  • Best score: 19
  • Best player score: 22
  • Position: #60 / 193
  • Number of attempts: 6
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: 17
  • Position: #66 / 336
  • Number of attempts: 9
The Cake is a Lie - 1374 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #223 / 534
  • Number of attempts: 4
Make Fancy Header - 1070 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 17
  • Position: #197 / 348
  • Number of attempts: 2
Change the content of a string - 1649 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #163 / 609
  • Number of attempts: 6
Sort and add attributes - 1501 entries

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

  • Best score: 33
  • Best player score: 33
  • Position: #199 / 582
  • Number of attempts: 2
Reconstruct the Sentence - 1649 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 19
  • Best player score: 20
  • Position: #106 / 434
  • Number of attempts: 5
Simple text editing with Vim - 13101 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1556 / 3768
  • Number of attempts: 1
jj johnson
Twitter:

entered into 34 challenges

contributed 0 challenges