sublime3 ctags 支持golang windows

參考: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/
相關文章
相關標籤/搜索