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

RUST match with enum for Coin

RUST match with enum for Coin rusty practice on vimgolf

Start file
enum Coin {
       
Penny,
       
Nickel,
       
Dime,
       
Quarter,
}
End file
enum Coin {
       
Penny,
       
Nickel,
       
Dime,
       
Quarter,
}

fn value_in_cents
(coin: Coin) -> u32 {
        match coin
{
               
Coin::Penny => 1,
               
Coin::Nickel => 5,
               
Coin::Dime => 10,
               
Coin::Quarter => 25,
       
}
}

View Diff

6a7,15
>
> fn value_in_cents(coin: Coin) -> u32 {
>       match coin {
>               Coin::Penny => 1,
>               Coin::Nickel => 5,
>               Coin::Dime => 10,
>               Coin::Quarter => 25,
>       }
> }

Solutions by @RomanPrivalov:

Unlock 12 remaining solutions by signing in and submitting your own entry
Created by: @pykJzzzsmAzloZl

53 active golfers, 183 entries

Solutions by @RomanPrivalov:
84
#1 - Roman Privalov / @RomanPrivalov

09/03/2021 at 02:07PM

85
#>3 - Roman Privalov / @RomanPrivalov

09/03/2021 at 02:20PM

86
#>5 - Roman Privalov / @RomanPrivalov

09/03/2021 at 01:55PM

87
#>6 - Roman Privalov / @RomanPrivalov

09/03/2021 at 01:36PM

88
#>8 - Roman Privalov / @RomanPrivalov

09/03/2021 at 01:02PM

91
#>11 - Roman Privalov / @RomanPrivalov

09/03/2021 at 12:50PM

91
#>11 - Roman Privalov / @RomanPrivalov

09/03/2021 at 12:55PM

93
#>15 - Roman Privalov / @RomanPrivalov

09/03/2021 at 12:46PM

95
#>17 - Roman Privalov / @RomanPrivalov

09/03/2021 at 12:38PM

99
#>19 - Roman Privalov / @RomanPrivalov

09/03/2021 at 12:27PM

107
#>28 - Roman Privalov / @RomanPrivalov

09/03/2021 at 12:07PM

116
#>38 - Roman Privalov / @RomanPrivalov

09/03/2021 at 11:58AM