参考:html
https://segmentfault.com/a/1190000009037471git
https://blog.csdn.net/chenbaoke/article/details/50848283vim
这里所说的“Windows的Home”实际指的是C:\Users\wangsan这样的路径segmentfault
可是这个路径下若是创建.ctags这样的文件是不被容许的(windows),windows
所以须要你借助git bash 或者Linux系统经过vim的方式生成一个.ctags文件,bash
配置完后,查看系统是否支持了go语言,在cmd中输入spa
ctags --list-languages ctags --list-kinds ctags --list-maps
并将这段代码写入,也能够参考http://ctags.sourceforge.net/EXTENDING.html官网.net
--langdef=Go --langmap=Go:.go --regex-Go=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0->9_]+)/\2/f,func/ --regex-Go=/var[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/v,var/ --regex-Go=/type[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/t,type/