How to use ctags for golang?
Asked Answered
B

4

6

I depend heavily upon ctags to traverse between my code.

Can anyone suggest how to use ctags with golang in Mac.

I tried using gotags, but I did not see any tag file generated and I was not able to traverse between the structure definition in vice versa.

Ballman answered 22/1, 2016 at 4:37 Comment(2)
godef (github.com/rogpeppe/godef) with emacs and go-mode works very well. Other editors use it as well as far as I knowBrachiopod
If you're looking for an editor, check sublime text + gosublime or visual studio code + go extension, far more superior to using ctags.Gunslinger
C
5

gotags work for me: gotags -R ./* > tags

Crisper answered 11/4, 2019 at 10:19 Comment(0)
G
3

You need to edit ~/.ctags for ctags to generate tags with golang. Check following link ctag database for Go. Then do the usual ctags -R

Garfield answered 5/10, 2018 at 10:3 Comment(0)
A
2

The usual ctags -R works for me.

Alyosha answered 6/8, 2017 at 16:31 Comment(0)
Y
2

Universal-ctags (https://ctags.io), an unofficial fork of Exuberant-ctags has built-in Go parser. It is not regex based (== not .ctags based).

Yajairayajurveda answered 11/4, 2019 at 17:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.