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 - 33483 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: 26
  • Position: #3471 / 7384
  • Number of attempts: 1
Swap values - 4554 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 15
  • Position: #843 / 1259
  • Number of attempts: 2
One number per line - 18673 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #1638 / 3852
  • Number of attempts: 4
V to the i - 4771 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #392 / 1887
  • Number of attempts: 2
Split line with dots - 2131 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 22
  • Position: #449 / 633
  • Number of attempts: 1
Copy three lines - 2869 entries

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

  • Best score: 13
  • Best player score: 21
  • Position: #435 / 639
  • Number of attempts: 1
That hyphen - 2572 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #131 / 698
  • Number of attempts: 5
Just the middle - 11380 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2232 / 4174
  • Number of attempts: 2
Make HTML List - 1050 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 50
  • Position: #209 / 273
  • Number of attempts: 1
Basic renumbering - 5605 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 17
  • Position: #579 / 1260
  • Number of attempts: 2
Wrap text in quotes - 351 entries

All the blocks of text should be wrapped in quotation marks.

  • Best score: 16
  • Best player score: 27
  • Position: #113 / 121
  • Number of attempts: 3
Vice versa - 7865 entries

Little role switching.

  • Best score: 12
  • Best player score: 21
  • Position: #1885 / 2114
  • Number of attempts: 1
Pretty multi-line bash - 219 entries

Bash line continuations are much prettier when they're column aligned.

  • Best score: 15
  • Best player score: 28
  • Position: #56 / 76
  • Number of attempts: 3
Paragraph sort - 431 entries

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

  • Best score: 14
  • Best player score: 23
  • Position: #110 / 124
  • Number of attempts: 1
Paragraph breaks - 509 entries

Swap the blank lines and the aaa lines.

  • Best score: 10
  • Best player score: 17
  • Position: #157 / 166
  • Number of attempts: 2
comments galore - 1017 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 10
  • Position: #190 / 421
  • Number of attempts: 2
Mirrored text - 167 entries

backward and forward, and long enough to be challenging

  • Best score: 14
  • Best player score: 17
  • Position: #57 / 70
  • Number of attempts: 1
lipsum lines - 255 entries

Convert a quoted block of text into strings in a list.

  • Best score: 28
  • Best player score: 32
  • Position: #53 / 93
  • Number of attempts: 2
Alsa configuration - 502 entries

I'm tweaking my ~/.asoundrc file!

  • Best score: 22
  • Best player score: 31
  • Position: #91 / 127
  • Number of attempts: 1
Align commas - 1063 entries

There are 15,000 aligning challenges on vimgolf.com, and they're all exactly the same. I hope this one is a little different.

  • Best score: 11
  • Best player score: 17
  • Position: #168 / 243
  • Number of attempts: 2
ascii-art diamond - 37 entries

Simple ascii-art diamond. The grid is 40x40.

  • Best score: 39
  • Best player score: 66
  • Position: #16 / 16
  • Number of attempts: 6
A grid of punctuation - 127 entries

Create a checkerboard of = and - in an 80×24 grid!

  • Best score: 16
  • Best player score: 17
  • Position: #36 / 59
  • Number of attempts: 2
Generate a list of numbers - 284 entries

Please generate list of numbers from 1 to 20.

  • Best score: 14
  • Best player score: 14
  • Position: #10 / 137
  • Number of attempts: 4
Mirror Symmetry - 812 entries

Add backslashes.

  • Best score: 7
  • Best player score: 12
  • Position: #161 / 268
  • Number of attempts: 3
Collect List - 4267 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 17
  • Position: #940 / 1188
  • Number of attempts: 2
swap or reverse - 118 entries

Try to swap or reverse the line as needed.

  • Best score: 16
  • Best player score: 16
  • Position: #41 / 68
  • Number of attempts: 1
I forgot quotes - 15946 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3170 / 4166
  • Number of attempts: 1
Change name of a variable - 173 entries

Replace the name of the $variable with the fastest move possible. The challenge is having a command that allow you to easily change the variable name even if its indented.

  • Best score: 9
  • Best player score: 9
  • Position: #99 / 136
  • Number of attempts: 1
Do you demand a shrubbery? - 1136 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 32
  • Position: #274 / 298
  • Number of attempts: 1
Where should I put the Newline? - 874 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 7
  • Position: #178 / 436
  • Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 10652 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 13
  • Position: #2569 / 3677
  • Number of attempts: 2
NATO phonetic alphabet - 506 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 23
  • Position: #136 / 194
  • Number of attempts: 1
A simple change - 444 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #32 / 190
  • Number of attempts: 4
Saving the hashes(#) - 2008 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: 29
  • Position: #342 / 476
  • Number of attempts: 3
Vertical Limit - 2487 entries

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

  • Best score: 21
  • Best player score: 28
  • Position: #588 / 748
  • Number of attempts: 2
Reverse and double space - 498 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 18
  • Position: #164 / 197
  • Number of attempts: 1
Generate English Alphabets - 476 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 25
  • Position: #139 / 205
  • Number of attempts: 1
Round Round - 288 entries

Round Round

  • Best score: 19
  • Best player score: 117
  • Position: #71 / 85
  • Number of attempts: 1
Reverse Simple Deletion - 834 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #324 / 455
  • Number of attempts: 2
Indentation - 499 entries

Indent each line according to the right number of spaces it needs.

  • Best score: 20
  • Best player score: 29
  • Position: #96 / 170
  • Number of attempts: 2
Compile C - 366 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 26
  • Position: #109 / 133
  • Number of attempts: 3
Reverse characters in a line - 732 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 12
  • Best player score: 15
  • Position: #140 / 257
  • Number of attempts: 2
Reconstruct the Sentence - 1436 entries

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

  • Best score: 20
  • Best player score: 26
  • Position: #350 / 397
  • Number of attempts: 1

Contributed Challenges

ascii-art diamond - 37 entries

Simple ascii-art diamond. The grid is 40x40.

George Angelopoulos
Twitter:

entered into 43 challenges

contributed 1 challenges