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 - 33591 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: 25
  • Position: #3152 / 7410
  • Number of attempts: 7
One number per line - 18711 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1047 / 3858
  • Number of attempts: 5
Prime Numbers - 354 entries

List the first 100 prime numbers.

  • Best score: 34
  • Best player score: 374
  • Position: #99 / 104
  • Number of attempts: 2
Just the middle - 11424 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2116 / 4186
  • Number of attempts: 1
Basic renumbering - 5645 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 11
  • Position: #19 / 1263
  • Number of attempts: 7
Vice versa - 7903 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #159 / 2125
  • Number of attempts: 4
SQL to YAML - 52 entries

Should be easy with vim, or not?

  • Best score: 71
  • Best player score: 89
  • Position: #15 / 22
  • Number of attempts: 1
Mirrored text - 177 entries

backward and forward, and long enough to be challenging

  • Best score: 14
  • Best player score: 15
  • Position: #24 / 71
  • Number of attempts: 3
Inner hyphens - 136 entries

Yet another hyphen challenge. Adding 5 hyphens to a file shouldn't be too hard.

  • Best score: 11
  • Best player score: 12
  • Position: #33 / 82
  • Number of attempts: 1
Scrambled numbers - 807 entries

Four is NOT 1. One is 1.

  • Best score: 18
  • Best player score: 20
  • Position: #52 / 184
  • Number of attempts: 2
Manual SQL - 160 entries

Change select and insert queries to simulate inserting a new record.

  • Best score: 48
  • Best player score: 52
  • Position: #9 / 50
  • Number of attempts: 2
Fix the XML - 1039 entries

The challenge consists in having a valid xml from an incomplete source.

  • Best score: 18
  • Best player score: 18
  • Position: #36 / 290
  • Number of attempts: 7
Condensed Cases - 800 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 15
  • Position: #168 / 245
  • Number of attempts: 2
I forgot quotes - 15974 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1637 / 4175
  • Number of attempts: 2
Don't know what this is - 2014 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: 11
  • Position: #64 / 582
  • Number of attempts: 6
A HAPPY NEW YEAR 2014 ! - 10657 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 13
  • Position: #2579 / 3679
  • Number of attempts: 1
attr_aligner - 3498 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 30
  • Position: #375 / 696
  • Number of attempts: 3
Words in parens - 12928 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 19
  • Position: #3099 / 3960
  • Number of attempts: 1
abcd > a b c d - 290 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #159 / 221
  • Number of attempts: 1
Shuffle and Sort - 229 entries

The values where sorted incorrectly. Get them back to how they are supposed to be

  • Best score: 17
  • Best player score: 17
  • Position: #9 / 67
  • Number of attempts: 6
Vertical Limit - 2538 entries

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

  • Best score: 21
  • Best player score: 21
  • Position: #44 / 754
  • Number of attempts: 7
replacing each line of a block selection - 2998 entries

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

  • Best score: 18
  • Best player score: 20
  • Position: #273 / 776
  • Number of attempts: 5
Append semicolon after expressions - 1047 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #92 / 414
  • Number of attempts: 3
Calculate the table totals - 146 entries

Go ahead... commit the treachery of using vim as a spreadsheet.

  • Best score: 33
  • Best player score: 47
  • Position: #20 / 45
  • Number of attempts: 3
Simple text editing with Vim - 12712 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #2089 / 3671
  • Number of attempts: 1

Contributed Challenges

SQL to YAML - 52 entries

Should be easy with vim, or not?

Swap values - 4610 entries

Well, swap the values...

Mister Knister
Twitter:

entered into 25 challenges

contributed 2 challenges