Skip to content

mattn/vim-goimpl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

vim-goimpl

:GoImpl command for Go

Usage

When you have an interface

type Foo interface {
     DoSomething()
}

Implement struct of struct/interface under the cursor

:GoImpl
type FooImpl struct {
}

type (f *FooImpl) DoSomething() {
    panic("not implemented") // TODO: Implement
}

Implement struct of struct/interface with given interface

:GoImpl io.Reader
func (r *Reader) Read(p []byte) (n int, err error) {
	panic("not implemented") // TODO: Implement
}

Implement struct of struct/interface with given interface and given name

:GoImpl io.Reader Bar
type Bar struct {
}

func (b *Bar) Read(p []byte) (n int, err error) {
	panic("not implemented") // TODO: Implement
}

Installation

For vim-plug plugin manager:

Plug 'mattn/vim-goimpl'

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