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

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

  • Best score: 12
  • Best player score: 12
  • Position: #332 / 1507
  • Number of attempts: 6
Sorting database text output - 194 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 / 75
  • Number of attempts: 4
I forgot quotes - 15639 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3135 / 4095
  • Number of attempts: 3
Neither Fizz nor Buzz - 205 entries

Not your regular increment macro! The gaps are tricky.

  • Best score: 13
  • Best player score: 20
  • Position: #36 / 93
  • Number of attempts: 6
Do you demand a shrubbery? - 1081 entries

Use :redir and crush the emacsgolfers.

  • Best score: 8
  • Best player score: 15
  • Position: #10 / 286
  • Number of attempts: 11
A HAPPY NEW YEAR 2014 ! - 10507 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #404 / 3626
  • Number of attempts: 8
quotes inside quotes - 2996 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: 3
  • Best player score: 14
  • Position: #159 / 1037
  • Number of attempts: 6
Words in parens - 12678 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #391 / 3904
  • Number of attempts: 10
Hole-in-one - 963 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: #133 / 294
  • Number of attempts: 5
Delete unwanted lines - 350 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #135 / 210
  • Number of attempts: 1
Word frequency alignment - 232 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 / 141
  • Number of attempts: 1
abcd > a b c d - 250 entries

transform the single spaces into 4 spaces repeat for each line

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

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #308 / 1688
  • 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 - 1168 entries

Correct the capitalization of each word

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

Data Scientist

entered into 15 challenges

contributed 0 challenges