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

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

39 active golfers, 143 entries

Solutions by @VegetaLu:
124
#29 - 盧小小 / @VegetaLu

04/02/2022 at 09:55AM

129
#>30 - 盧小小 / @VegetaLu

04/02/2022 at 09:52AM

135
#>32 - 盧小小 / @VegetaLu

04/02/2022 at 09:47AM

142
#>34 - 盧小小 / @VegetaLu

04/02/2022 at 09:32AM

147
#>35 - 盧小小 / @VegetaLu

04/02/2022 at 09:50AM

158
#>37 - 盧小小 / @VegetaLu

04/02/2022 at 09:24AM