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

Just give me the numbers.

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

Easy challenge.

  • Best score: 14
  • Best player score: 14
  • Position: #39 / 560
  • Number of attempts: 6
Add semicolons - 10539 entries

Simply add a semicolon at the end of each line

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

easy stuff

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

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #108 / 1835
  • Number of attempts: 4
From argument to object - 1262 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 / 417
  • Number of attempts: 4
Search and Replace 0 - 4651 entries

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

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

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #209 / 683
  • Number of attempts: 5
comment and uncomment code inline - 995 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 / 296
  • Number of attempts: 4
Adam's challenge - 916 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 / 257
  • Number of attempts: 4
ninja substitution - 1300 entries

How can you reuse a previous substitution ?

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

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #471 / 2044
  • Number of attempts: 5
One to Ten - 2093 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 / 641
  • Number of attempts: 3
I forgot quotes - 15728 entries

Oops.

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

Put hyphens everywhere.

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

A HAPPY NEW YEAR 2014 !

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

entered into 17 challenges

contributed 0 challenges