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 - 33724 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: 22
  • Position: #1324 / 7442
  • Number of attempts: 3
One number per line - 18755 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 16
  • Position: #955 / 3870
  • Number of attempts: 4
V to the i - 4813 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #481 / 1897
  • Number of attempts: 3
Applying same text modification in several lines - 2897 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 12
  • Best player score: 13
  • Position: #160 / 857
  • Number of attempts: 4
Add semicolons - 10881 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #14 / 3072
  • Number of attempts: 7
Box it - 7916 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #107 / 1881
  • Number of attempts: 4
Every other line - 2915 entries

AaAaAaA

  • Best score: 12
  • Best player score: 16
  • Position: #393 / 704
  • 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: 16
  • Position: #260 / 641
  • Number of attempts: 4
Search and Replace 0 - 5004 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #860 / 1630
  • Number of attempts: 2
Just the middle - 11484 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2423 / 4209
  • Number of attempts: 2
Make HTML List - 1061 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 39
  • Position: #86 / 274
  • Number of attempts: 2
Format java properties - 88 entries

Format java properties to a different format. The value which is the string following the first '=' cannot & should not change. All periods in the key get replaced with an underscore "_" and get a prefix of "b_".

  • Best score: 27
  • Best player score: 36
  • Position: #25 / 35
  • Number of attempts: 2
Basic renumbering - 5683 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 18
  • Position: #685 / 1269
  • Number of attempts: 3
Combines all items - 313 entries

For each line that starts with the same number I want to combine its contents

  • Best score: 9
  • Best player score: 10
  • Position: #119 / 140
  • Number of attempts: 1
C Reformatting - 690 entries

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

  • Best score: 30
  • Best player score: 56
  • Position: #108 / 163
  • Number of attempts: 2
Order and join - 985 entries

There's something special about the input order.

  • Best score: 10
  • Best player score: 13
  • Position: #185 / 260
  • Number of attempts: 3
Scrambled numbers - 807 entries

Four is NOT 1. One is 1.

  • Best score: 18
  • Best player score: 23
  • Position: #98 / 184
  • Number of attempts: 4
Collect List - 4305 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #303 / 1191
  • Number of attempts: 3
camel riding - 793 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 15
  • Position: #58 / 281
  • Number of attempts: 3
Space out the alphabet - 1659 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 18
  • Position: #226 / 446
  • Number of attempts: 1
Conway sequence - 26 entries

Generate the the first fifteen numbers. See here for more information: http://en.wikipedia.org/wiki/Look-and-say_sequence

  • Best score: 43
  • Best player score: 43
  • Position: #13 / 20
  • Number of attempts: 1
-a-b-c- - 3216 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #981 / 1138
  • Number of attempts: 1
Count both ways - 1022 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #264 / 354
  • Number of attempts: 2
Do you demand a shrubbery? - 1158 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 15
  • Position: #59 / 300
  • Number of attempts: 3
Saving the hashes(#) - 2063 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: #350 / 480
  • Number of attempts: 1
Simple text editing with Vim - 12996 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1596 / 3739
  • Number of attempts: 2
Jerry Wu
Twitter:

People are like snowflakes: Piles of them on the road make it hard to drive.

entered into 26 challenges

contributed 0 challenges