Recomand cscope, e un pic mai avansat decat ctags.<br><br>Un script util pt cscope de adaugat in .bashrc:<br><pre><br>function gen-cscope<br>{<br>    find "${@:-.}" -iregex '.*\.\(c\|h\|cpp\|hpp\|cc\|hh\|cxx\|hxx\|py\)' | cscope -b -i-<br>
}<br></pre><br><br>Ce face? Cauta toate sursele cu extensiile alea si construieste baza de date cu tag-uri din ele. De executat in radacina proiectului.<br>Apoi puneti-va asta in .vimrc:<br><br><pre><br>if has("cscope")<br>
        " Look for a 'cscope.out' file starting from the current directory,<br>        " going up to the root directory.<br>        <br>        let s:dirs = split(getcwd(), "/")<br>        while s:dirs != []<br>
                let s:path = "/" . join(s:dirs, "/")<br>                if (filereadable(s:path . "/cscope.out"))<br>                        execute "cs add " . s:path . "/cscope.out " . s:path . " -v"<br>
                        break<br>                endif<br>                let s:dirs = s:dirs[:-2]<br>        endwhile<br><br>        set csto=0<br>        set cst<br>        set csverb<br><br>        nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR><br>
        nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR><br>        nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR><br>        nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR><br>
        nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR><br>        nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR><br>        nmap <C-\>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR><br>
        nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR><br><br>        map <F10> :copen<CR><br>        map <F11> :cprevious<CR><br>        map <F12> :cnext<CR><br>
<br>        " Open a quicfix window for the following queries.<br>        set cscopequickfix=s-,c-,d-,i-,t-,e-,g-<br>endif<br></pre><br><br>Ce face?<br>1) cand editati un fisier, cauta si incarca automat fisierul cu taguri incepand cu directorul curent si continuand in sus.<br>
2) multe scurtaturi utile (exemplu: Ctrl + \ urmat de s contruieste o lista cu toate locatiile unde e folosit simbolul de pe cursor).<br><br>Cosmin.<br><br>PS: emacs sucks!<br><br>