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 9v0066fde7b000000000046f

extract struct tag in go

Can you extract all struct tags in the fewest keystrokes possible?

Start file
import "time"

type User struct {
	ID             int       `json:"id" db:"user_id"`
	Name           string    `json:"name" db:"username"`
	Email          string    `json:"email" db:"email"`
	CreatedAt      time.Time `json:"created_at" db:"created_at"`
	Password       string    `json:"-" db:"password"` // Omit password from JSON serialization
	Address        string    `json:"address" db:"address"`
	City           string    `json:"city" db:"city"`
	State          string    `json:"state" db:"state"`
	Country        string    `json:"country" db:"country"`
	ZipCode        string    `json:"zip_code" db:"zip_code"`
	PhoneNumber    string    `json:"phone_number" db:"phone_number"`
	ProfilePicture string    `json:"profile_picture" db:"profile_picture"`
	Roles          []string  `json:"roles" db:"roles"`
	CreatedAt      time.Time `json:"created_at" db:"created_at"`
	UpdatedAt      time.Time `json:"updated_at" db:"updated_at"`
}
End file
import "time"

type User struct {
	ID             int       `json:"id" db:"user_id"`
	Name           string    `json:"name" db:"username"`
	Email          string    `json:"email" db:"email"`
	CreatedAt      time.Time `json:"created_at" db:"created_at"`
	Password       string    `json:"-" db:"password"` // Omit password from JSON serialization
	Address        string    `json:"address" db:"address"`
	City           string    `json:"city" db:"city"`
	State          string    `json:"state" db:"state"`
	Country        string    `json:"country" db:"country"`
	ZipCode        string    `json:"zip_code" db:"zip_code"`
	PhoneNumber    string    `json:"phone_number" db:"phone_number"`
	ProfilePicture string    `json:"profile_picture" db:"profile_picture"`
	Roles          []string  `json:"roles" db:"roles"`
	CreatedAt      time.Time `json:"created_at" db:"created_at"`
	UpdatedAt      time.Time `json:"updated_at" db:"updated_at"`
}
{"user_id", "username", "email", "password", "address", "city", "state", "country", "zip_code", "phone_number", "profile_picture", "roles", "created_at", "updated_at"}

View Diff

19a20
> {"user_id", "username", "email", "password", "address", "city", "state", "country", "zip_code", "phone_number", "profile_picture", "roles", "created_at", "updated_at"}

Solutions

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 40 remaining solutions by signing in and submitting your own entry
#41 brao72 / @brao72 - Score: 208 - 12/14/25 @ 05:46
<Esc>jjjjjjjkkkkkkkjjjjjjjjjjjjjjjjjjo{"user_id", "username", "email", "password", "address", "city", "state", "country", "zip_code", "phone_number", "profile_picture", "roles", "created_at", "updated_at"}<Tab><BS><Esc>:wq<CR>

0 comments


Created by: @__ngtrongkha

41 active golfers, 149 entries

Leaderboard (lowest score wins):
52
#31 - Michael Cuffaro / @maiku1008

11/23/2024 at 06:12PM

55
#32 - Caleb Denio / @cjdenio

09/01/2025 at 04:03PM

56
#33 - Benjamin / @b2vqbw

07/29/2025 at 09:47PM

64
#34 - dennis / @nagolove

12/21/2025 at 02:38PM

69
#35 - SRINIVASU SALADI / @SRINIVASUS22587

03/24/2025 at 04:10AM

71
#36 - Dani Bengl / @cb341

12/22/2025 at 09:32PM

80
#37 - Alex Mihov / @AlexMihov

10/25/2024 at 09:49AM

85
#38 - Matthew Cooper / @mkcmkc

08/07/2025 at 03:18AM

91
#39 - Adrien Beudin / @beudbeud

03/13/2025 at 04:11PM

109
#40 - Adelgeda / @LKoczProgramming

01/23/2026 at 01:19PM

208
#41 - brao72 / @brao72

12/14/2025 at 05:46AM