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

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

69 active golfers, 170 entries

Solutions by @TerryDing77:
25
#24 - Terry Ding / @TerryDing77

08/24/2017 at 11:47AM

28
#>34 - Terry Ding / @TerryDing77

08/24/2017 at 11:42AM

29
#>37 - Terry Ding / @TerryDing77

08/24/2017 at 11:40AM

31
#>52 - Terry Ding / @TerryDing77

08/24/2017 at 11:36AM

36
#>64 - Terry Ding / @TerryDing77

08/24/2017 at 11:35AM