Harsh Rathee
Harsh Rathee

Reputation: 1

How do I store a golang template macro in vim

I want to store the following code permanently in the .vimrc file. Can anyone provide me the code to do so?

package main

import "fmt"

func main() {
        fmt.Println("Hello World")
}

Upvotes: -1

Views: 193

Answers (1)

Sam Smith
Sam Smith

Reputation: 31

The plugin vim-go does this automatically and provides other useful features for go development like running gofmt on save and adding commands for go imports

Upvotes: 0

Related Questions