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

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

53 active golfers, 183 entries

Solutions by @NicolasPagny:
86
#5 - Nicolas Pagny / @NicolasPagny

01/08/2021 at 10:25AM

87
#>6 - Nicolas Pagny / @NicolasPagny

01/08/2021 at 10:13AM

88
#>8 - Nicolas Pagny / @NicolasPagny

01/08/2021 at 10:07AM

91
#>11 - Nicolas Pagny / @NicolasPagny

01/07/2021 at 10:03AM

93
#>14 - Nicolas Pagny / @NicolasPagny

01/07/2021 at 09:59AM

94
#>15 - Nicolas Pagny / @NicolasPagny

01/07/2021 at 09:49AM

100
#>19 - Nicolas Pagny / @NicolasPagny

01/06/2021 at 08:51PM

108
#>30 - Nicolas Pagny / @NicolasPagny

01/06/2021 at 08:44PM

131
#>42 - Nicolas Pagny / @NicolasPagny

12/21/2020 at 02:07PM