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

The name of the game - 597 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 1
switch variable - 4777 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 1
replacing each line of a block selection - 2706 entries

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

  • Best score: 18
  • Best player score: 25
  • Number of attempts: 1
Change the content of a string - 1270 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Number of attempts: 4
Swap assigned value - 525 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 4
VimGolfNight - 478 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 1
Switch function arguments - 1893 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 2
Remember FizzBuzz? - 548 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 50
  • Number of attempts: 7
Letter case trickery - 1481 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
  • Number of attempts: 4
Append semicolon after expressions - 898 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 2
Assign list - 146 entries

Assign list elements to matrix

  • Best score: 30
  • Best player score: 52
  • Number of attempts: 1
Vertical Limit - 2264 entries

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

  • Best score: 21
  • Best player score: 27
  • Number of attempts: 2
Pairs of numbers - 340 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
  • Number of attempts: 7
Exchanging Quotes - 779 entries

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

  • Best score: 30
  • Best player score: 40
  • Number of attempts: 2
Search and Replace 0 - 4479 entries

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

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 3
quotes inside quotes - 2973 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
  • Number of attempts: 3
Make it more readable - 1818 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 2
Words in parens - 12378 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 2
newton
Twitter:

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

entered into 18 challenges

contributed 0 challenges