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 5b7d2a7a55b986000cd6e00f

On Being Stylish

Your PR cannot be accepted if you don't follow our corporate style guide.

Start file
def fun(challenge, my_state, goal):
   
"""
    Wrapper around library magicks, there must be a better way to do this...
    """

    d
= {
       
"s_var": my_state.thing,
       
"g_var": goal.state,
   
}

   
# TODO, break these lines up to fit our style guide
    long_yet_appropriately_precise_variable_name
= lib.Magic(challenge.attribute, challenge.d["count"] - 1, descriptor=d)
    breakable_line
= lib.Miscellaneous.ArcaneFactory.Magic(s_var=int(my_state.thing), g_var=int(goal.state), n=1, strict=True)
   
return long_yet_appropriately_precise_variable_name
End file
def fun(challenge, my_state, goal):
   
"""
    Wrapper around library magicks, there must be a better way to do this...
    """

    d
= {
       
"s_var": my_state.thing,
       
"g_var": goal.state,
   
}

   
# TODO, break these lines up to fit our style guide
    long_yet_appropriately_precise_variable_name
= lib.Magic(
        challenge
.attribute,
        challenge
.d["count"] - 1,
        descriptor
=d
   
)
    breakable_line
= lib.Miscellaneous.ArcaneFactory.Magic(
        s_var
=int(my_state.thing),
        g_var
=int(goal.state),
        n
=1,
        strict
=True
   
)
   
return long_yet_appropriately_precise_variable_name

View Diff

11,12c11,21
<     long_yet_appropriately_precise_variable_name = lib.Magic(challenge.attribute, challenge.d["count"] - 1, descriptor=d)
<     breakable_line = lib.Miscellaneous.ArcaneFactory.Magic(s_var=int(my_state.thing), g_var=int(goal.state), n=1, strict=True)
---
>     long_yet_appropriately_precise_variable_name = lib.Magic(
>         challenge.attribute,
>         challenge.d["count"] - 1,
>         descriptor=d
>     )
>     breakable_line = lib.Miscellaneous.ArcaneFactory.Magic(
>         s_var=int(my_state.thing),
>         g_var=int(goal.state),
>         n=1,
>         strict=True
>     )

Solutions by @mrmclarrinson:

Unlock 10 remaining solutions by signing in and submitting your own entry
Created by: @Comradesmith

21 active golfers, 81 entries

Solutions by @mrmclarrinson:
35
#13 - Mrmclarrinson / @mrmclarrinson

12/13/2022 at 02:47PM

45
#>14 - Mrmclarrinson / @mrmclarrinson

12/13/2022 at 02:45PM

47
#>16 - Mrmclarrinson / @mrmclarrinson

12/13/2022 at 02:44PM

51
#>17 - Mrmclarrinson / @mrmclarrinson

12/13/2022 at 02:40PM

54
#>18 - Mrmclarrinson / @mrmclarrinson

12/13/2022 at 02:36PM

56
#>20 - Mrmclarrinson / @mrmclarrinson

12/13/2022 at 02:31PM

60
#>20 - Mrmclarrinson / @mrmclarrinson

12/13/2022 at 02:33PM

61
#>20 - Mrmclarrinson / @mrmclarrinson

12/13/2022 at 02:35PM

62
#>20 - Mrmclarrinson / @mrmclarrinson

12/13/2022 at 02:30PM

78
#>20 - Mrmclarrinson / @mrmclarrinson

12/13/2022 at 02:22PM