help-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cscope Plugin Context Field


From: Jamie Bainbridge
Subject: cscope Plugin Context Field
Date: Mon, 7 Jul 2014 15:30:33 +1000

I usually swap between using cscope tags and GNU Global tags in Vim,
but I really would just rather use Global.

The thing I find useful from cscope is the "context" field. This is
really useful to get some idea of where a tag is called from.

Here I'm doing ":cs find s pcap_setdirection_linux" on libpcap.

Results with cscope cross-reference:

   #   line  filename / context / line
   1    328  pcap-linux.c <<GLOBAL>>
             static int pcap_setdirection_linux(pcap_t *, pcap_direction_t);
   2   1225  pcap-linux.c <<pcap_activate_linux>>
             handle->setdirection_op = pcap_setdirection_linux;
   3   2495  pcap-linux.c <<pcap_setdirection_linux>>
             pcap_setdirection_linux(pcap_t *handle, pcap_direction_t d)

Results with GNU Global gtags:

   #   line  filename / context / line
   1   2495  pcap-linux.c <<pcap_setdirection_linux>>
             pcap_setdirection_linux(pcap_t *handle, pcap_direction_t d)
   2    328  pcap-linux.c <<pcap_setdirection_linux>>
             static int pcap_setdirection_linux(pcap_t *, pcap_direction_t);
   3   1225  pcap-linux.c <<pcap_setdirection_linux>>
             handle->setdirection_op = pcap_setdirection_linux;

Notice the <<context>> is the parent function or definition in cscope,
however the <<context>> is just the search term in Global.

Is it possible to get Global to fill in the cscope-vim context field?

Cheers,
Jamie



reply via email to

[Prev in Thread] Current Thread [Next in Thread]