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

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

  • Best score: 12
  • Best player score: 12
  • Position: #332 / 1541
  • Number of attempts: 6
Sorting database text output - 206 entries

Sometimes it is nice to be able to quickly take column-formatted text output from the SQL command line and turn it into a list of useful data. In this case we want a unique, sorted list of the values from the second column combined into one comma-separated list. What is the fewest strokes you can do this in?

  • Best score: 24
  • Best player score: 24
  • Position: #20 / 79
  • Number of attempts: 4
I forgot quotes - 15728 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3152 / 4114
  • Number of attempts: 3
Neither Fizz nor Buzz - 216 entries

Not your regular increment macro! The gaps are tricky.

  • Best score: 13
  • Best player score: 20
  • Position: #39 / 96
  • Number of attempts: 6
Do you demand a shrubbery? - 1105 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 15
  • Position: #9 / 291
  • Number of attempts: 11
A HAPPY NEW YEAR 2014 ! - 10533 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #404 / 3637
  • Number of attempts: 8
quotes inside quotes - 3026 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: 14
  • Position: #158 / 1044
  • Number of attempts: 6
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #395 / 3919
  • Number of attempts: 10
Hole-in-one - 973 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 18
  • Position: #135 / 297
  • Number of attempts: 5
Delete unwanted lines - 358 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 9
  • Position: #135 / 215
  • Number of attempts: 1
Word frequency alignment - 241 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

  • Best score: 5
  • Best player score: 5
  • Position: #90 / 145
  • Number of attempts: 1
abcd > a b c d - 260 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #134 / 204
  • Number of attempts: 1
switch variable - 4917 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #308 / 1701
  • Number of attempts: 6
Refactor to Helpers - 45 entries

This Rails partial is almost all template escapes. Put it into a helper, and refactor each case to methods so we can build out the controls for each. (I've converted to tabs - fighting with Vimgolf's default config shouldn't be part of the challenge.)

  • Best score: 147
  • Best player score: 386
  • Position: #17 / 22
  • Number of attempts: 4
The Cake is a Lie - 1203 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #181 / 488
  • Number of attempts: 3
magizbox
Twitter:

Data Scientist

entered into 15 challenges

contributed 0 challenges