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

One number per line - 18831 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #526 / 3889
  • Number of attempts: 7
Swap values inside brackets - 2523 entries

Easy challenge.

  • Best score: 13
  • Best player score: 14
  • Position: #40 / 587
  • Number of attempts: 6
Add semicolons - 10916 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #15 / 3085
  • Number of attempts: 2
remove lines containing the word "reader" - 3622 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #214 / 1177
  • Number of attempts: 2
Box it - 7962 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #108 / 1891
  • Number of attempts: 4
From argument to object - 1536 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: 17
  • Position: #111 / 466
  • Number of attempts: 4
Search and Replace 0 - 5031 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #584 / 1638
  • Number of attempts: 2
That hyphen - 2602 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #209 / 704
  • Number of attempts: 5
comment and uncomment code inline - 1151 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: 9
  • Position: #118 / 328
  • Number of attempts: 4
Adam's challenge - 1009 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: 18
  • Position: #81 / 276
  • Number of attempts: 4
ninja substitution - 1427 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 14
  • Position: #25 / 269
  • Number of attempts: 4
Vice versa - 7974 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #471 / 2146
  • Number of attempts: 5
One to Ten - 2241 entries

Generate the sequence of numbers from 1 to 10, one number per line. Inspired by this Reddit thread: https://redd.it/ak4it2

  • Best score: 12
  • Best player score: 12
  • Position: #125 / 682
  • Number of attempts: 3
I forgot quotes - 16093 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #876 / 4202
  • Number of attempts: 6
-a-b-c- - 3225 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Position: #255 / 1140
  • Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 10713 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1392 / 3700
  • Number of attempts: 2
quotes inside quotes - 3185 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: 14
  • Position: #317 / 1086
  • Number of attempts: 4
BunFluffman
Twitter:

entered into 17 challenges

contributed 0 challenges