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

Fizzbuzz - 511 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 95
  • Position: #122 / 157
  • Number of attempts: 1
Many duplicates - 1284 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #188 / 421
  • Number of attempts: 2
Put a newline after every 10 lines in vim - 1600 entries

Goal is to put a newline after every 10 lines in vim.

  • Best score: 10
  • Best player score: 12
  • Position: #225 / 534
  • Number of attempts: 3
Fill in the chess board - 917 entries

Fill in the name of each square using its file (a-h) and rank (1-8).

  • Best score: 19
  • Best player score: 27
  • Position: #65 / 178
  • Number of attempts: 3
Modernise code - 1343 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 45
  • Position: #181 / 310
  • Number of attempts: 4
Simple, Practical, and Common - 33419 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: 23
  • Position: #2606 / 7374
  • Number of attempts: 3
One number per line - 18635 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 30
  • Position: #3611 / 3847
  • Number of attempts: 1
V to the i - 4759 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #465 / 1882
  • Number of attempts: 4
Extract argument from function - 2318 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 16
  • Position: #508 / 746
  • Number of attempts: 4
That hyphen - 2560 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 19
  • Position: #651 / 696
  • Number of attempts: 1
Basic renumbering - 5591 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 21
  • Position: #826 / 1258
  • Number of attempts: 1
Fiddle percentages into real numbers - 840 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 13
  • Position: #43 / 287
  • Number of attempts: 4
underscore_to_camelCase - 162 entries

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

  • Best score: 14
  • Best player score: 15
  • Position: #45 / 80
  • Number of attempts: 1
Vice versa - 7813 entries

Little role switching.

  • Best score: 12
  • Best player score: 17
  • Position: #1475 / 2106
  • Number of attempts: 2
Pretty format for variable declarations - 155 entries

Project standards demand the equal signs must be aligned for better readability.

  • Best score: 13
  • Best player score: 18
  • Position: #45 / 62
  • Number of attempts: 1
I forgot quotes - 15935 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Position: #2165 / 4163
  • Number of attempts: 5
Count both ways - 1001 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #191 / 351
  • Number of attempts: 1
Gray area - 741 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 13
  • Position: #159 / 269
  • Number of attempts: 4
Don't know what this is - 1987 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: 16
  • Position: #470 / 579
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10637 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #541 / 3671
  • Number of attempts: 3
quotes inside quotes - 3125 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: 17
  • Position: #846 / 1072
  • Number of attempts: 3
Words in parens - 12863 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2163 / 3948
  • 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: #333 / 476
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 6633 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 32
  • Best player score: 38
  • Position: #620 / 1631
  • Number of attempts: 3
Rao Zvorovski
Twitter:

I am a software developer and sometimes play (infosec) CTFs. Prefer tools that were made before I was born. Work with everything from assembler to Haskell.

entered into 24 challenges

contributed 0 challenges