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 5e3c99466ea90a00096b2efb

Add text at some column

Complete golang struct statement.

Start file
// Product contains information about one product
type Product struct
    ID  int64   id
    Name    string  name
    Info    string  info,omitempty
    Price   float64 price
End file
// Product contains information about one product
type Product struct {
    ID  int64   `json:"id"`
    Name    string  `json:"name"`
    Info    string  `json:"info,omitempty"`
    Price   float64 `json:"price"`
}

View Diff

2,6c2,7
< type Product struct
<     ID  int64   id
<     Name    string  name
<     Info    string  info,omitempty
<     Price   float64 price
---
> type Product struct {
>     ID  int64   `json:"id"`
>     Name    string  `json:"name"`
>     Info    string  `json:"info,omitempty"`
>     Price   float64 `json:"price"`
> }

Solutions by @Rom1deTroyes:

Unlock 11 remaining solutions by signing in and submitting your own entry
Created by: @xiote2

54 active golfers, 144 entries

Solutions by @Rom1deTroyes:
31
#5 - Romain Heller / @Rom1deTroyes

02/13/2020 at 10:13PM

31
#>5 - Romain Heller / @Rom1deTroyes

02/13/2020 at 10:15PM

32
#>20 - Romain Heller / @Rom1deTroyes

02/13/2020 at 10:07PM

34
#>42 - Romain Heller / @Rom1deTroyes

02/13/2020 at 09:54PM

36
#>48 - Romain Heller / @Rom1deTroyes

02/13/2020 at 09:40PM

36
#>48 - Romain Heller / @Rom1deTroyes

02/13/2020 at 09:46PM

36
#>48 - Romain Heller / @Rom1deTroyes

02/13/2020 at 09:49PM

39
#>50 - Romain Heller / @Rom1deTroyes

02/13/2020 at 09:38PM

44
#>52 - Romain Heller / @Rom1deTroyes

02/13/2020 at 09:33PM

63
#>54 - Romain Heller / @Rom1deTroyes

02/13/2020 at 09:26PM

66
#>54 - Romain Heller / @Rom1deTroyes

02/13/2020 at 09:30PM