bug-global
[Top][All Lists]
Advanced

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

Re: make gtags.vim work for any dir


From: Andrey Butirsky
Subject: Re: make gtags.vim work for any dir
Date: Thu, 24 Jan 2019 17:34:25 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Thunderbird/65.0

On 24.01.2019 03:46, Shigio YAMAGUCHI wrote:
> Is not it achievable with ':cd %:h' alone?
>
> :e /xxx/a.c                     Load a file.
> :cd %:h                         From now on, use /xxx/GTAGS.
> :Gtags main
> :e /yyy/x.c                     Load another file.
> :Gtags main                     Stil use /xxx/GTAGS
>
> You can control project changes freely with this method.
> What do you think?

The problem with this it's not always desirable to stay in the directory
with sources itself when you use :! command for debugging your code.

For example, I have Bash scripts project in Git repository.
The scripts produces several output files and dirs during it's run.
I don't want the output to polluting my Git repo, so I rather run
:!<path_to_script> command from my other random "working" directory
created specially for that purposes.

So I think user should not be needed to :cd <project_dir> just to make
Global work - Global can find out it's project dirs by itself.
All that user has to do is just open a file from desirable project it
current window/buffer. But he already has it, most of the cases.

That's my idea.




reply via email to

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