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

Search and Replace 0 - 4676 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #912 / 1549
  • Number of attempts: 3
Swap assigned value - 561 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 11
  • Position: #140 / 236
  • Number of attempts: 4
VimGolfNight - 505 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #87 / 330
  • Number of attempts: 1
Letter case trickery - 1553 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 11
  • Position: #202 / 500
  • Number of attempts: 4
quotes inside quotes - 3030 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: 16
  • Position: #516 / 1045
  • Number of attempts: 3
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #1941 / 3919
  • Number of attempts: 2
Pairs of numbers - 345 entries

Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"

  • Best score: 26
  • Best player score: 33
  • Position: #53 / 129
  • Number of attempts: 7
Assign list - 150 entries

Assign list elements to matrix

  • Best score: 30
  • Best player score: 52
  • Position: #38 / 56
  • Number of attempts: 1
The name of the game - 629 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #139 / 344
  • Number of attempts: 1
Vertical Limit - 2370 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 27
  • Position: #496 / 718
  • Number of attempts: 2
Exchanging Quotes - 791 entries

Sometimes you need to exchange a choice of quotes in some code.

  • Best score: 30
  • Best player score: 40
  • Position: #179 / 218
  • Number of attempts: 2
replacing each line of a block selection - 2800 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 25
  • Position: #511 / 735
  • Number of attempts: 1
Switch function arguments - 1982 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #230 / 627
  • Number of attempts: 2
Append semicolon after expressions - 953 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #184 / 387
  • Number of attempts: 2
switch variable - 4944 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1074 / 1708
  • Number of attempts: 1
Make it more readable - 1905 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Position: #368 / 625
  • Number of attempts: 2
Remember FizzBuzz? - 589 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 50
  • Position: #43 / 166
  • Number of attempts: 7
Change the content of a string - 1350 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #118 / 521
  • Number of attempts: 4
newton
Twitter:

20, security enthusiast, programmer, aspiring entrepreneur and polymath.

entered into 18 challenges

contributed 0 challenges