vim - Load gtags with given gtags root -


i have log file(in /home/logs) file names , line numbers. want files in project rooted @ /x/projects/project12/ . how use gtags files while log file opened in vim ? 1 clumsy way copy log file in project directory.

is there better way, while log file opened in vim set gtagsroot /x/projects/project12/ , lookups happen in project ?

edit: gtags created gtags command in project root.

the gtags-scope.vim plugin uses global -pq find location of gtags file. easiest solution set current working directory project directory via :cd ~/project.

but there better way! use gf. can add project root 'path' option , gf, <c-w>f, :find, , friends work. doing following:

:set path+=~/project 

or if want adjust 'path' option buffer do:

:setlocal path+=~/project 

for more see:

:h 'path :h gf :h :cd 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -