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

Well, swap the values...

  • Best score: 11
  • Best player score: 16
  • Position: #1058 / 1259
  • Number of attempts: 1
One number per line - 18673 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 27
  • Position: #3478 / 3852
  • Number of attempts: 1
From argument to object - 1481 entries

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

  • Best score: 17
  • Best player score: 21
  • Position: #371 / 453
  • 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: 22
  • Position: #497 / 639
  • Number of attempts: 1
Extract argument from function - 2337 entries

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

  • Best score: 13
  • Best player score: 18
  • Position: #657 / 750
  • Number of attempts: 1
Just the middle - 11380 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2586 / 4174
  • Number of attempts: 1
Remember VimGolf Rules ! - 259 entries

Rules, ... and don't forget !

  • Best score: 7
  • Best player score: 8
  • Position: #74 / 139
  • Number of attempts: 1
Vice versa - 7865 entries

Little role switching.

  • Best score: 12
  • Best player score: 24
  • Position: #1964 / 2114
  • Number of attempts: 1
Angular naming conventions - 307 entries

In angular, a directive name follows the camelCase convention. When the directive is used in an HTML template, the words are instead separated by a dash. Go from to the other the fastest!

  • Best score: 18
  • Best player score: 23
  • Position: #93 / 117
  • Number of attempts: 1
Condensed Cases - 794 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: 17
  • Position: #204 / 244
  • Number of attempts: 1
I forgot quotes - 15946 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3241 / 4166
  • Number of attempts: 1
-a-b-c- - 3183 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #992 / 1132
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10652 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 15
  • Position: #3144 / 3677
  • Number of attempts: 1
Words in parens - 12868 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 21
  • Position: #3469 / 3950
  • Number of attempts: 1
Remove noise from HTTP log - 700 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 17
  • Position: #229 / 272
  • Number of attempts: 2
Make it more readable - 1955 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 18
  • Position: #532 / 643
  • Number of attempts: 1
phucvin
Twitter:

game developer

entered into 17 challenges

contributed 0 challenges