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 - 18889 entries

Just give me the numbers.

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

Easy challenge.

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

Simply add a semicolon at the end of each line

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

easy stuff

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

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #108 / 1897
  • Number of attempts: 4
From argument to object - 1552 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 / 469
  • Number of attempts: 4
Search and Replace 0 - 5107 entries

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

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

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #209 / 708
  • Number of attempts: 5
comment and uncomment code inline - 1158 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 / 329
  • Number of attempts: 4
Adam's challenge - 1018 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 / 278
  • Number of attempts: 4
ninja substitution - 1436 entries

How can you reuse a previous substitution ?

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

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #471 / 2153
  • Number of attempts: 5
One to Ten - 2247 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 / 685
  • Number of attempts: 3
I forgot quotes - 16178 entries

Oops.

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

Put hyphens everywhere.

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

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1392 / 3711
  • Number of attempts: 2
quotes inside quotes - 3198 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 / 1090
  • Number of attempts: 4
BunFluffman
Twitter:

entered into 17 challenges

contributed 0 challenges