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

Well, swap the values...

  • Best score: 11
  • Best player score: 14
  • Position: #725 / 1293
  • Number of attempts: 5
One number per line - 18903 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #1722 / 3904
  • Number of attempts: 4
V to the i - 4883 entries

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

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

This line is too long, split it.

  • Best score: 15
  • Best player score: 22
  • Position: #457 / 639
  • Number of attempts: 1
From argument to object - 1566 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: 18
  • Position: #189 / 471
  • Number of attempts: 4
That hyphen - 2646 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 13
  • Position: #531 / 711
  • Number of attempts: 2
comment and uncomment code inline - 1182 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: 13
  • Position: #284 / 332
  • Number of attempts: 1
Just the middle - 11616 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2459 / 4255
  • Number of attempts: 1
Adam's challenge - 1042 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: 22
  • Position: #184 / 281
  • Number of attempts: 3
Remove hard line breaks - 86 entries

Text files with Hard breaks are not good for e-readers. We need remove all hard line breaks and have long lines.

  • Best score: 10
  • Best player score: 19
  • Position: #28 / 36
  • Number of attempts: 1
Square numbers - 141 entries

Boring math puzzle.

  • Best score: 16
  • Best player score: 36
  • Position: #36 / 46
  • Number of attempts: 1
I forgot quotes - 16237 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2599 / 4224
  • Number of attempts: 1
abcd > a b c d - 308 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #162 / 231
  • Number of attempts: 2
Checkerboard case pattern - 186 entries

All the squares are white. Make some of them black. But only the right ones.

  • Best score: 15
  • Best player score: 23
  • Position: #45 / 63
  • Number of attempts: 1
NATO phonetic alphabet - 547 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 21
  • Position: #102 / 199
  • Number of attempts: 3
Create a pandoc compatible table - 241 entries

In [this vimcast][1], a featured gist from Tim Pope shows how to quickly make a simple table structure. How fast can you convert it to pandoc's markdown style? [1]: http://vimcasts.org/episodes/aligning-text-with-tabular-vim/

  • Best score: 32
  • Best player score: 56
  • Position: #45 / 58
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 456 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 12
  • Position: #177 / 199
  • Number of attempts: 1
A Simple One - 1088 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #452 / 679
  • Number of attempts: 1
Reverse Simple Deletion - 871 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #332 / 465
  • Number of attempts: 3
PEP8 Python Wrapping Comments and Code - 241 entries

According to PEP8, long flowy text and code should have different max line lengths. Code: 79 characters max Long flowy text: 72 characters max

  • Best score: 21
  • Best player score: 37
  • Position: #61 / 74
  • Number of attempts: 2
squdle
Twitter:

entered into 21 challenges

contributed 0 challenges