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

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

29 active golfers, 99 entries

Solutions by @roudens2:
88
#6 - roudens / @roudens2

12/27/2020 at 12:08PM

92
#>7 - roudens / @roudens2

12/26/2020 at 06:31AM

113
#>20 - roudens / @roudens2

12/25/2020 at 03:26PM

115
#>21 - roudens / @roudens2

12/25/2020 at 03:59PM