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

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

  • Best score: 12
  • Best player score: 14
  • Position: #979 / 1658
  • Number of attempts: 3
Swap assigned value - 675 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 11
  • Position: #153 / 260
  • Number of attempts: 4
VimGolfNight - 575 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #87 / 352
  • Number of attempts: 1
Letter case trickery - 1650 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: #211 / 521
  • Number of attempts: 4
quotes inside quotes - 3191 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: #542 / 1088
  • Number of attempts: 3
Words in parens - 13024 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #1983 / 3983
  • Number of attempts: 2
Pairs of numbers - 364 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: #56 / 137
  • Number of attempts: 7
Assign list - 193 entries

Assign list elements to matrix

  • Best score: 30
  • Best player score: 52
  • Position: #43 / 62
  • Number of attempts: 1
The name of the game - 679 entries

End up with the name of the game.

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

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

  • Best score: 21
  • Best player score: 27
  • Position: #535 / 774
  • Number of attempts: 2
Exchanging Quotes - 864 entries

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

  • Best score: 30
  • Best player score: 40
  • Position: #190 / 232
  • Number of attempts: 2
replacing each line of a block selection - 3040 entries

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

  • Best score: 18
  • Best player score: 25
  • Position: #539 / 785
  • Number of attempts: 1
Switch function arguments - 2195 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #248 / 678
  • Number of attempts: 2
Append semicolon after expressions - 1067 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #198 / 423
  • Number of attempts: 2
switch variable - 5110 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1104 / 1758
  • Number of attempts: 1
Make it more readable - 2028 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Position: #386 / 656
  • Number of attempts: 2
Remember FizzBuzz? - 789 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 50
  • Position: #57 / 205
  • Number of attempts: 7
Change the content of a string - 1761 entries

This docstring is a complete lie. Fix it.

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

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

entered into 18 challenges

contributed 0 challenges