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 - 34012 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: 24
  • Position: #2938 / 7513
  • Number of attempts: 2
Swap values - 4705 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 14
  • Position: #711 / 1293
  • Number of attempts: 2
V to the i - 4883 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1220 / 1914
  • Number of attempts: 1
Split line with dots - 2175 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 25
  • Position: #521 / 639
  • Number of attempts: 3
Every other line - 2951 entries

AaAaAaA

  • Best score: 12
  • Best player score: 17
  • Position: #470 / 712
  • Number of attempts: 3
Start coding format - 168 entries

I used to start coding with following format: int main(){ -(cursor here) }

  • Best score: 22
  • Best player score: 22
  • Position: #22 / 76
  • Number of attempts: 2
Search and Replace 0 - 5159 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #473 / 1674
  • Number of attempts: 3
That hyphen - 2646 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #147 / 711
  • Number of attempts: 3
Just the middle - 11616 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2347 / 4255
  • Number of attempts: 4
Make HTML List - 1072 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 41
  • Position: #108 / 276
  • Number of attempts: 7
Basic renumbering - 5733 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 18
  • Position: #687 / 1279
  • Number of attempts: 2
FoodCritic023: Prefer conditional attributes - 193 entries

FoodCritic (www.foodcritic.io) is a lint tool for your Chef (learn.chef.io) cookbooks. FC023 indicates that you should prefer Chef guards over Ruby conditions. This challenge expects you to be able to fix this issue in a sample cookbook, given the FoodCritic output: ================================================================ FC023: Prefer conditional attributes: cookbooks/foo/recipes/default.rb:25 ================================================================ See http://www.foodcritic.io/#FC023 for more details about the changes being made.

  • Best score: 25
  • Best player score: 37
  • Position: #50 / 56
  • Number of attempts: 4
replace 2nd column blanks with values in same column if blank - 258 entries

Where ,SOMELOGB and ,SOMELOGC replaces each /r carriage return if 2nd column is blank. The replace only happens if 2nd column is blank though and should replace up to the non blank row.

  • Best score: 15
  • Best player score: 20
  • Position: #76 / 86
  • Number of attempts: 3
underscore_to_camelCase - 197 entries

Pointy haired boss decided we need to switch to camelCase. Let's get this over with.

  • Best score: 14
  • Best player score: 24
  • Position: #81 / 86
  • Number of attempts: 2
Vice versa - 8019 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #239 / 2157
  • Number of attempts: 6
C Reformatting - 712 entries

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

  • Best score: 30
  • Best player score: 38
  • Position: #61 / 167
  • Number of attempts: 11
Sort files from hosts - 210 entries

Resume files by host. I hope you enjoy with this challenge

  • Best score: 15
  • Best player score: 18
  • Position: #53 / 80
  • Number of attempts: 2
Order and join - 1032 entries

There's something special about the input order.

  • Best score: 10
  • Best player score: 12
  • Position: #163 / 265
  • Number of attempts: 2
Paragraph breaks - 550 entries

Swap the blank lines and the aaa lines.

  • Best score: 10
  • Best player score: 14
  • Position: #148 / 172
  • Number of attempts: 2
lipsum lines - 315 entries

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

  • Best score: 28
  • Best player score: 32
  • Position: #60 / 98
  • Number of attempts: 2
Mirror Symmetry - 844 entries

Add backslashes.

  • Best score: 7
  • Best player score: 14
  • Position: #246 / 272
  • Number of attempts: 2
Collect List - 4341 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 16
  • Position: #833 / 1200
  • Number of attempts: 3
camel riding - 815 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 18
  • Position: #238 / 284
  • Number of attempts: 2
Happy TvvO - 439 entries

Don’t forget the past, learn from it. Happy New Year.

  • Best score: 12
  • Best player score: 12
  • Position: #120 / 211
  • Number of attempts: 4
I forgot quotes - 16237 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1698 / 4224
  • Number of attempts: 1
-a-b-c- - 3241 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #649 / 1146
  • Number of attempts: 3
Do you demand a shrubbery? - 1207 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 18
  • Position: #149 / 309
  • Number of attempts: 4
A HAPPY NEW YEAR 2014 ! - 10755 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2175 / 3715
  • Number of attempts: 2
Ninjas Leaderboard - 114 entries

The two lines in "Start file" has an obfuscated email address. Second line give an index (from 1 to 30) to the chars list of the first line, for example, the first char of email (n) is in position 25, second char (i) is in position 19 and s.o.

  • Best score: 25
  • Best player score: 31
  • Position: #14 / 45
  • Number of attempts: 5
quotes inside quotes - 3202 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 15
  • Position: #475 / 1093
  • Number of attempts: 5
Words in parens - 13053 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2366 / 3991
  • Number of attempts: 3
maximun and minimun - 88 entries

Find the maximum and minimum of the rows.

  • Best score: 50
  • Best player score: 55
  • Position: #14 / 28
  • Number of attempts: 5
Append semicolon after expressions - 1086 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #236 / 426
  • Number of attempts: 3
switch variable - 5128 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1205 / 1764
  • Number of attempts: 1
Whitespace, empty lines and tabs - 4044 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 22
  • Position: #349 / 862
  • Number of attempts: 6
Flodder-challenge - 1500 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 36
  • Position: #201 / 378
  • Number of attempts: 3
Marcel Akkerman
Twitter:

developer, gamer, reader, parent

entered into 36 challenges

contributed 0 challenges