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

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

20 active golfers, 75 entries

Solutions by @chocola81394123:
85
#1 - chocolate / @chocola81394123

01/08/2021 at 04:28AM

86
#>1 - chocolate / @chocola81394123

01/06/2021 at 03:39AM

88
#>6 - chocolate / @chocola81394123

01/06/2021 at 02:56AM

89
#>6 - chocolate / @chocola81394123

01/06/2021 at 02:51AM

89
#>6 - chocolate / @chocola81394123

01/06/2021 at 03:26AM

90
#>6 - chocolate / @chocola81394123

01/06/2021 at 02:20AM

90
#>6 - chocolate / @chocola81394123

01/06/2021 at 02:48AM

98
#>9 - chocolate / @chocola81394123

01/06/2021 at 02:09AM

104
#>10 - chocolate / @chocola81394123

01/06/2021 at 02:02AM

170
#>20 - chocolate / @chocola81394123

01/06/2021 at 01:59AM