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

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

  • Best score: 7
  • Best player score: 14
  • Position: #994 / 1680
  • Number of attempts: 3
Swap assigned value - 696 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 11
  • Position: #154 / 264
  • Number of attempts: 4
VimGolfNight - 604 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #87 / 357
  • Number of attempts: 1
Letter case trickery - 1688 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: #216 / 526
  • Number of attempts: 4
quotes inside quotes - 3210 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: 7
  • Best player score: 16
  • Position: #547 / 1097
  • Number of attempts: 3
Words in parens - 13063 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #1991 / 3995
  • Number of attempts: 2
Pairs of numbers - 388 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: #58 / 139
  • Number of attempts: 7
Assign list - 227 entries

Assign list elements to matrix

  • Best score: 30
  • Best player score: 52
  • Position: #46 / 65
  • Number of attempts: 1
The name of the game - 707 entries

End up with the name of the game.

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

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

  • Best score: 10
  • Best player score: 27
  • Position: #540 / 781
  • Number of attempts: 2
Exchanging Quotes - 878 entries

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

  • Best score: 30
  • Best player score: 40
  • Position: #191 / 234
  • Number of attempts: 2
replacing each line of a block selection - 3070 entries

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

  • Best score: 7
  • Best player score: 25
  • Position: #544 / 791
  • Number of attempts: 1
Switch function arguments - 2235 entries

How to switch two arguments of a function.

  • Best score: 7
  • Best player score: 12
  • Position: #250 / 687
  • Number of attempts: 2
Append semicolon after expressions - 1088 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #199 / 427
  • Number of attempts: 2
switch variable - 5136 entries

how fast can you switch two variable ?

  • Best score: 9
  • Best player score: 13
  • Position: #1110 / 1767
  • Number of attempts: 1
Make it more readable - 2041 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Position: #387 / 659
  • Number of attempts: 2
Remember FizzBuzz? - 837 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 50
  • Position: #62 / 214
  • Number of attempts: 7
Change the content of a string - 1810 entries

This docstring is a complete lie. Fix it.

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

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

entered into 18 challenges

contributed 0 challenges