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 4d28637c4bcd032f1c00003d

Reformat long lines

Rearrange this ruby method call to put each parameter on its own line. Could become a useful macro.

Start file
def default_i18n_subject
  mailer_scope = self.class.mailer_name.gsub('/', '.')
  I18n.t(:subject, :scope => [mailer_scope, action_name], :default => action_name.humanize)
end
End file
def default_i18n_subject
  mailer_scope = self.class.mailer_name.gsub('/', '.')
  I18n.t(:subject,
         :scope => [mailer_scope, action_name],
         :default => action_name.humanize)
end

View Diff

3c3,5
<   I18n.t(:subject, :scope => [mailer_scope, action_name], :default => action_name.humanize)
---
>   I18n.t(:subject,
>          :scope => [mailer_scope, action_name],
>          :default => action_name.humanize)

Solutions by @junfeng:

Unlock 6 remaining solutions by signing in and submitting your own entry
Created by: @sermoa

125 active golfers, 320 entries

Solutions by @junfeng:
15
#6 - Hu Junfeng / @junfeng

07/30/2011 at 02:56PM

17
#>56 - Hu Junfeng / @junfeng

07/30/2011 at 02:53PM

18
#>68 - Hu Junfeng / @junfeng

07/30/2011 at 02:51PM

18
#>68 - Hu Junfeng / @junfeng

07/30/2011 at 02:52PM

21
#>92 - Hu Junfeng / @junfeng

07/30/2011 at 02:49PM

26
#>123 - Hu Junfeng / @junfeng

07/30/2011 at 02:47PM