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

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Number of attempts: 4
Increment, increment, increment.... - 492 entries

Vim likes macros

  • Best score: 10
  • Best player score: 13
  • Number of attempts: 2
Just the middle - 9547 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 1
One to Ten - 1191 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: 14
  • Number of attempts: 2
switch variable - 4385 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 4
V to the i - 4054 entries

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

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 2
abcd > a b c d - 241 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 1
-a-b-c- - 2670 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
I forgot quotes - 12465 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Number of attempts: 1
quotes inside quotes - 2826 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: 17
  • Number of attempts: 1
Hello ${world} - 232 entries

Migrate a JavaScript String from concatenation to ES6 interpolation.

  • Best score: 24
  • Best player score: 33
  • Number of attempts: 1
Swap values - 3696 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 16
  • Number of attempts: 1
Edan Sneh
Twitter:

entered into 12 challenges

contributed 0 challenges