Skip to content

ppalucki/gotags

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gotags

gotags is a ctags-compatible tag generator for Go.

Build Status

Installation

Go version 1.1 or higher is required. Install or update gotags using the go get command:

go get -u github.com/jstemmer/gotags

Usage

gotags [options] file(s)

-L="": source file names are read from the specified file.
-silent=false: do not produce any output on error
-sort=true: sort tags
-tree=false: print syntax tree (debugging)
-v=false: print version

Vim Tagbar configuration

Put the following configuration in your vimrc:

let g:tagbar_type_go = {
	\ 'ctagstype' : 'go',
	\ 'kinds'     : [
		\ 'p:package',
		\ 'i:imports:1',
		\ 'c:constants',
		\ 'v:variables',
		\ 't:types',
		\ 'n:interfaces',
		\ 'w:fields',
		\ 'e:embedded',
		\ 'm:methods',
		\ 'r:constructor',
		\ 'f:functions'
	\ ],
	\ 'sro' : '.',
	\ 'kind2scope' : {
		\ 't' : 'ctype',
		\ 'n' : 'ntype'
	\ },
	\ 'scope2kind' : {
		\ 'ctype' : 't',
		\ 'ntype' : 'n'
	\ },
	\ 'ctagsbin'  : 'gotags',
	\ 'ctagsargs' : '-sort -silent'
\ }

Screenshot

vim Tagbar gotags

About

ctags-compatible tag generator for Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%