Skip to content

mattn/vim-goaddtags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

vim-goaddtags

:GoAddTags command for Go

Usage

When you have struct

type Foo struct {
     Name  string
     Value int
}

Add json/db tags to the struct under the cursor

:GoAddTags json db
type Foo struct {
    Name string `json:"name" db:"name"`
    Age  int    `json:"age" db:"age"`
}

If you prefer to use camelCase instead of snake_case for the values, you can use the g:go_addtags_transform variable to define a different transformation rule. The following example uses the camelCase transformation rule.

let g:go_addtags_transform = 'camelcase'

Installation

For vim-plug plugin manager:

Plug 'mattn/vim-goaddtags'

License

MIT

Author

Yasuhiro Matsumoto (a.k.a. mattn)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published