This is a creation in Article, where the information may have evolved or changed.
Ctags tool is used to traverse the source code files generated tags files, these tags files can be used by the editor or other tools to quickly find the location of the source code symbols (Tag/symbol), such as variable name, function name and so on. For example, tags files are the basis for taglist and omnicppcomplete work.
Its installation and use of local do not do too much to repeat.
Now let's talk about how to configure your own ctags to support Golang
Problem Description:
If you find that your ctags cannot support Golang, check the ctags version Ctags first:
Ctags--versionexuberant ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert compiled:sep , 03:28:50 Address es: <dhiebert@users.sourceforge.net>, Http://ctags.sourceforge.net Optional compiled features: +wildcards , +regex
Found to be 5.8, the current official note ctags5.8 stable version is not supported by Golang.
You can view its supported languages from the command:
Ctags--list-languagesantasmaspawkbasicbetacc++c# Coboldosbatcheiffelerlangflexfortranhtmljavajavascriptlispluamakematlabocamlpascalperlphppythonrexxrubyschemeshslangsmlsq Ltcltexveraverilogvhdlvimyacc
Found none of the Golang.
Solution:
Add the following code in the ~/.ctags file (no new)
--langdef=go--langmap=go:.go--regex-go=/func ([\t]+\ ([^)]+\))? [\t]+ ([a-za-z0-9_]+)/\2/d,func/--regex-go=/var[\t]+ ([a-za-z_][a-za-z0-9_]+]/\1/d,var/--regex-go=/type[\t]+ ([ a-za-z_][a-za-z0-9_]+)/\1/d,type/
And then go through Ctags--list-languages To see the discovery can support Golang language, after the ctags to Golang for a pleasant jump and bounce.
The supported file types and suffixes found in ctags can be viewed by following several commands:
Ctags--list-languages
Ctags--list-kinds
Ctags--list-maps
More ctags usage can be viewed through ctags--help.
Reference Link: http://stackoverflow.com/questions/8204367/ctag-database-for-go