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 5957c3356f7e17045b00002c

Add Go XML to structure tags

The Go programming language can directly map XML to structure fields. Add the correct XML tag after each field.

Start file
package main

// FooXML mapping from XML to struct
type FooXML struct {
	Field1 string
	Field2 string
	Field3 string
}
End file
package main

// FooXML mapping from XML to struct
type FooXML struct {
	Field1 string `xml:"field1"`
	Field2 string `xml:"field2"`
	Field3 string `xml:"field3"`
}

View Diff

5,7c5,7
< 	Field1 string
< 	Field2 string
< 	Field3 string
---
> 	Field1 string `xml:"field1"`
> 	Field2 string `xml:"field2"`
> 	Field3 string `xml:"field3"`

Solutions by @pikjes2:

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

66 active golfers, 152 entries

Solutions by @pikjes2:
24
#14 - pikjes / @pikjes2

03/25/2021 at 03:11PM

25
#>23 - pikjes / @pikjes2

03/25/2021 at 03:10PM

26
#>25 - pikjes / @pikjes2

03/25/2021 at 03:10PM

27
#>25 - pikjes / @pikjes2

03/25/2021 at 03:09PM

28
#>32 - pikjes / @pikjes2

03/25/2021 at 03:05PM

29
#>36 - pikjes / @pikjes2

03/25/2021 at 03:01PM

30
#>44 - pikjes / @pikjes2

03/25/2021 at 03:00PM

31
#>50 - pikjes / @pikjes2

03/25/2021 at 02:58PM

39
#>61 - pikjes / @pikjes2

03/25/2021 at 02:46PM