Loading ...
Sorry, an error occurred while loading the content.

Re: ctags or cscope

Expand Messages
  • Bill McCarthy
    ... I used your snippet with cscope without a problem. I called the snippet prog.cpp and set up with cscope -b prog.cpp . ... brought me to the correct line.
    Message 1 of 48 , Dec 1, 2007
    • 0 Attachment
      On Sat 1-Dec-07 11:12am -0600, epanda wrote:

      > When I do a simple grep text with cscope it does not found string
      > "WriteFile" and says File does not have expected format !
      >
      > The string is in this sample source wich is here D:
      > \Dev_PC_DEV1\communs_he\SRC\utilitaires\RTX
      >
      > //##ModelId=393CB8FA0240
      > const int RtFile::write(char buffer_p[],long taille_p)
      > {
      > bool retour_l=false;
      > DWORD number_l = 0;
      > if (hFile!=0)
      > {
      > int retourBOOL;
      > //on prend la taille du buffer plus 1 à cause du \0
      >
      > retourBOOL=WriteFile(hFile,buffer_p,taille_p,&number_l,NULL);
      > retour_l=(retourBOOL==1?true:false);
      > }
      > else
      > {
      > retour_l=false;
      > }
      > return retour_l;
      >
      > }

      I used your snippet with cscope without a problem. I called
      the snippet prog.cpp and set up with "cscope -b prog.cpp".

      To find WriteFile:

      :cs find e WriteFile

      brought me to the correct line.

      :cs find s retour_l

      showed me all four in a quickfix window.

      :cs find g write

      Put me on the "const int RtFile::write" line.

      In my vimrc, I have the following (only the "set
      csprg=c:/util/cscope" needs to be changed):

      " Cscope

      if has("cscope")
      set csprg=c:/util/cscope
      set csto=0
      set cst
      set nocsverb
      " add any database in current directory
      if filereadable("cscope.out")
      cs add cscope.out
      " else add database pointed to by environment
      elseif $CSCOPE_DB != ""
      cs add $CSCOPE_DB
      endif
      set csverb
      endif

      set cscopequickfix=s-,c-,d-,i-,t-,e-

      nmap <C-_>s :cs find s <C-R>=expand("<cword>")<CR><CR>
      nmap <C-_>g :cs find g <C-R>=expand("<cword>")<CR><CR>
      nmap <C-_>c :cs find c <C-R>=expand("<cword>")<CR><CR>
      nmap <C-_>t :cs find t <C-R>=expand("<cword>")<CR><CR>
      nmap <C-_>e :cs find e <C-R>=expand("<cword>")<CR><CR>
      nmap <C-_>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
      nmap <C-_>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
      nmap <C-_>d :cs find d <C-R>=expand("<cword>")<CR><CR>

      --
      Best regards,
      Bill


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • epanda
      Vimlball ok, the link f cecscope does not work On 20 fév, 03:03, Charles E. Campbell, Jr. ... --~--~---------~--~----~------------~-------~--~----~ You
      Message 48 of 48 , Feb 20, 2008
      • 0 Attachment
        Vimlball ok, the link f cecscope does not work

        On 20 fév, 03:03, "Charles E. Campbell, Jr."
        <drc...@...> wrote:
        > epanda wrote:
        > >Charles
        >
        > >The link is ko for cecscope
        > >http://mysite.verizon.net/astronaut/vim/vbafiles
        >
        > Hmm -- the problem was with vimball extraction, not cecscope; so the
        > link I gave was, if I may repeat:
        >
        >  http://mysite.verizon.net/astronaut/vim/index.html#VIMBALL
        >
        > I just tried the link out and it worked for me.
        >
        > Hope that helps,
        > Chip Campbell
        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.