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 56680033ac11043d6306aa07

Replace and keep the case

Replace all instance of plugin and Plugin to device and Device.

Start file
 def plugin
    @plugin, @plugin_found_by = [Plugin.find_by_uid(@plugin_id), :uid] unless @plugin
    @plugin, @plugin_found_by = [Plugin.find_by_aid(@plugin_id), :aid] unless @plugin
    @plugin
 end
End file
 def device
    @device, @device_found_by = [Device.find_by_uid(@device_id), :uid] unless @device
    @device, @device_found_by = [Device.find_by_uid(@device_id), :uid] unless @device
    @device
 end

View Diff

1,4c1,4
<  def plugin
<     @plugin, @plugin_found_by = [Plugin.find_by_uid(@plugin_id), :uid] unless @plugin
<     @plugin, @plugin_found_by = [Plugin.find_by_aid(@plugin_id), :aid] unless @plugin
<     @plugin
---
>  def device
>     @device, @device_found_by = [Device.find_by_uid(@device_id), :uid] unless @device
>     @device, @device_found_by = [Device.find_by_uid(@device_id), :uid] unless @device
>     @device

Solutions by @park_jungy:

Unlock 8 remaining solutions by signing in and submitting your own entry
Created by: @Benoit_Tgt

115 active golfers, 407 entries

Solutions by @park_jungy:
26
#50 - Jung Yeon Park / @park_jungy

02/17/2021 at 12:25AM

27
#>61 - Jung Yeon Park / @park_jungy

02/17/2021 at 12:22AM

28
#>65 - Jung Yeon Park / @park_jungy

02/17/2021 at 12:21AM

29
#>76 - Jung Yeon Park / @park_jungy

02/17/2021 at 12:19AM

31
#>86 - Jung Yeon Park / @park_jungy

02/17/2021 at 12:18AM

32
#>95 - Jung Yeon Park / @park_jungy

02/17/2021 at 12:16AM

36
#>100 - Jung Yeon Park / @park_jungy

02/17/2021 at 12:15AM

38
#>103 - Jung Yeon Park / @park_jungy

02/17/2021 at 12:12AM