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 @GuitarMusash616:

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

43 active golfers, 154 entries

Solutions by @GuitarMusash616:
94
#13 - Austin Willliams / @GuitarMusash616

11/12/2022 at 08:03PM

94
#>13 - Austin Willliams / @GuitarMusash616

11/12/2022 at 08:09PM

103
#>17 - Austin Willliams / @GuitarMusash616

11/12/2022 at 07:54PM

131
#>36 - Austin Willliams / @GuitarMusash616

11/12/2022 at 07:44PM

145
#>39 - Austin Willliams / @GuitarMusash616

11/12/2022 at 07:21PM

151
#>40 - Austin Willliams / @GuitarMusash616

11/12/2022 at 07:16PM

151
#>40 - Austin Willliams / @GuitarMusash616

11/12/2022 at 07:18PM