ctags & cscope supprot go source code ?

1,941 views
Skip to first unread message

you fu

unread,
Dec 7, 2013, 9:03:33 AM12/7/13
to golan...@googlegroups.com
as the titile.
can use it to find function impl and fuction definition?
like use it for  C .

Aram Hăvărneanu

unread,
Dec 7, 2013, 9:10:00 AM12/7/13
to you fu, golang-nuts
Use Roger Peppe's godef.

--
Aram Hăvărneanu

you fu

unread,
Dec 7, 2013, 9:36:28 AM12/7/13
to golan...@googlegroups.com, you fu
could you give more detail

S.Çağlar Onur

unread,
Dec 7, 2013, 2:27:57 PM12/7/13
to golan...@googlegroups.com
Hi,
You can use Exuberant Ctags (package is called exuberant-ctags) in ubuntu, I've been using it for a while and as long as I see it works just fine. According to their package details page [1] they use an external patch [2] so you can do the same if you are on a different distro.


Best, 

minux

unread,
Dec 7, 2013, 2:49:33 PM12/7/13
to you fu, golang-nuts
On Sat, Dec 7, 2013 at 9:36 AM, you fu <fuyo...@gmail.com> wrote:
could you give more detail

JussiJ

unread,
Dec 9, 2013, 12:38:11 AM12/9/13
to golan...@googlegroups.com
On Sunday, December 8, 2013 1:03:33 AM UTC+11, you fu wrote:
> can use it to find function impl and fuction definition?

On Windows the Zeus IDE uses a version of ctags.exe that supports Go and it has those two features.

More details can be found here: http://www.zeusedit.com/go.html

And the source code for that ctags.exe utility can be found here: http://www.zeusedit.com/z300/ctags_src.zip

Jussi Jumppanen
Author: Zeus IDE

eap...@gmail.com

unread,
Jan 9, 2014, 7:40:11 PM1/9/14
to golan...@googlegroups.com
I wrote a ruby gem called starscope which will generate a cscope database for go
https://rubygems.org/gems/starscope


On Saturday, December 7, 2013 9:03:33 AM UTC-5, you fu wrote:

Jason E. Aten

unread,
Jan 10, 2014, 1:25:48 AM1/10/14
to golan...@googlegroups.com

mattn

unread,
Mar 19, 2014, 10:45:36 PM3/19/14
to golan...@googlegroups.com
cat > ~/.ctags
--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/
^D

Jyoti Rawat

unread,
Feb 19, 2021, 9:46:37 AM2/19/21
to golang-nuts
syntax error near unexpected token `['
-bash: /home/necuser/.ctags: line 3: `regex-Go=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0-9_]+)/\2/d,func/'

Ian Lance Taylor

unread,
Feb 19, 2021, 10:04:18 AM2/19/21
to Jyoti Rawat, golang-nuts
On Fri, Feb 19, 2021 at 6:46 AM Jyoti Rawat <jraw...@gmail.com> wrote:
>
> syntax error near unexpected token `['
> -bash: /home/necuser/.ctags: line 3: `regex-Go=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0-9_]+)/\2/d,func/'

You are replying to a message that is seven years old. Something may
have changed.

I suggest that you restate your actual question in a new thread in the
hopes of getting a more up to date answer.

Ian



> On Thursday, March 20, 2014 at 8:15:36 AM UTC+5:30 mattn wrote:
>>
>> cat > ~/.ctags
>> --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/
>> ^D
>>
>> On Saturday, December 7, 2013 11:03:33 PM UTC+9, you fu wrote:
>>>
>>> as the titile.
>>> can use it to find function impl and fuction definition?
>>> like use it for C .
>
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/00156d05-ef16-4b46-9c51-be8b5f1d66bcn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages