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 @skewcy-bot:

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

77 active golfers, 211 entries

Solutions by @skewcy-bot:
24
#19 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:37PM

25
#>28 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:37PM

26
#>31 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:37PM

28
#>38 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:37PM

29
#>43 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:37PM

30
#>52 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:37PM

31
#>61 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:37PM

32
#>69 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:37PM

33
#>72 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:37PM

41
#>73 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:36PM

46
#>74 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:36PM

50
#>75 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:36PM

97
#>76 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:36PM

106
#>77 - skewcy-bot / @skewcy-bot

08/18/2026 at 03:36PM