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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 20 remaining solutions by signing in and submitting your own entry
#21 Jurica / @Jurica34581259 - Score: 90 - 11/16/18 @ 17:01
/(<CR>nli<CR><Esc>$i<CR><Esc>k:s/, /,\r        /g<CR><Esc>kk0i    <Esc>/(<CR>a<CR>    <Esc>0llll$i<CR><BS>    <Esc>k:s/, /,\r        /g<CR>ZZ

0 comments


Created by: @Comradesmith

21 active golfers, 81 entries

Leaderboard (lowest score wins):
33
#1 - Jon Krause / @jkrause314

08/27/2018 at 07:05AM

33
#2 - Saki Gw / @Sakigw

08/27/2018 at 08:05AM

33
#3 - John Braxler / @braxler

08/27/2018 at 05:00PM

33
#4 - Jean George / @JeanGeo20504212

03/23/2022 at 10:31PM

33
#5 - Peppa Pig / @PeppaPi95550250

07/01/2024 at 02:14AM

33
#6 - nickGPT / @nickandbro

08/27/2024 at 05:08AM

35
#7 - Viktor Voronin / @voroninman

08/22/2018 at 07:56PM

35
#8 - Smylers / @Smylers2

08/22/2018 at 08:32PM

35
#9 - Charles Sun / @charles_sun90

08/24/2018 at 04:59AM

35
#10 - Pedro Santos / @pedrosans

08/27/2018 at 11:04PM

35
#11 - Cameron Jones / @Deimyts

10/01/2018 at 04:08PM

35
#12 - Mihai / @mihaicristiant

01/16/2019 at 10:30AM

35
#13 - Mrmclarrinson / @mrmclarrinson

12/13/2022 at 02:47PM

38
#14 - Luoyb / @Luoyb

11/03/2023 at 08:07AM

46
#15 - Valacar / @valacar

08/23/2018 at 06:10PM

46
#16 - Francois Marais / @maraisf

05/17/2021 at 05:26PM

51
#17 - RockerZZY / @rocker_zzy

09/03/2020 at 12:59PM

54
#18 - Sergey Fedorov / @Shade30

09/03/2018 at 08:18PM

56
#19 - Roberto Martínez / @nilp0inter

08/26/2018 at 09:15PM

56
#20 - Timur Celik / @clktmr

12/21/2018 at 07:31PM

90
#21 - Jurica / @Jurica34581259

11/16/2018 at 05:01PM