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

2 quick changes and a numbered list - 573 entries

The ascii will not be lost, but rather numbered in 4 digit blocks with leading zeros.

  • Best score: 37
  • Best player score: 43
  • Position: #63 / 138
  • Number of attempts: 2
hello-world-vimgolf - 2294 entries

Simple number generation

  • Best score: 10
  • Best player score: 14
  • Position: #495 / 648
  • Number of attempts: 7
One number per line - 18611 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #2009 / 3840
  • Number of attempts: 3
Box it - 7818 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 24
  • Position: #968 / 1861
  • Number of attempts: 3
Copy three lines - 2839 entries

If the site is up (by some miracle), make the text under every header identical.

  • Best score: 13
  • Best player score: 20
  • Position: #423 / 634
  • Number of attempts: 5
Start coding format - 147 entries

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

  • Best score: 22
  • Best player score: 24
  • Position: #60 / 70
  • Number of attempts: 2
comment and uncomment code inline - 1060 entries

It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.

  • Best score: 9
  • Best player score: 10
  • Position: #210 / 312
  • Number of attempts: 3
Adam's challenge - 950 entries

Change both normal to bold and 4 by 2. Adam Wathan challenge this on twitter . He did it in 11 keystrokes on Sublime.

  • Best score: 18
  • Best player score: 19
  • Position: #126 / 265
  • Number of attempts: 6
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: #158 / 287
  • Number of attempts: 3
JS notation to Immutable.js notation - 161 entries

Now Immutable.js made its way into many frontends. This challenge consists of a typical refactoring that many of us are facing now.

  • Best score: 34
  • Best player score: 34
  • Position: #1 / 60
  • Number of attempts: 6
Vice versa - 7761 entries

Little role switching.

  • Best score: 12
  • Best player score: 17
  • Position: #1676 / 2093
  • Number of attempts: 1
Collect List - 4260 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 18
  • Position: #1086 / 1184
  • Number of attempts: 2
learn vim in short time - 228 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #126 / 156
  • Number of attempts: 1
Letter case trickery - 1594 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 9
  • Position: #38 / 511
  • Number of attempts: 7
abcd > a b c d - 279 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #196 / 217
  • Number of attempts: 3
Reformat long lines - 340 entries

Rearrange this ruby method call to put each parameter on its own line. Could become a useful macro.

  • Best score: 15
  • Best player score: 16
  • Position: #36 / 130
  • Number of attempts: 7
The Cake is a Lie - 1283 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #276 / 511
  • Number of attempts: 5
vladanscy
Twitter:

entered into 17 challenges

contributed 0 challenges