[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make gtags.vim work for any dir
From: |
Shigio YAMAGUCHI |
Subject: |
Re: make gtags.vim work for any dir |
Date: |
Thu, 24 Jan 2019 00:21:33 +0900 |
Do you mean the following usage?
:e /xxx/a.c Load a file.
:Gtags main From now on, use /xxx/GTAGS.
:e /yyy/x.c Load another file.
:Gtags main From now on, use /yyy/GTAGS.
2019年1月23日(水) 20:42 Andrey Butirsky <address@hidden>:
>
> Hi Shigio, isn't it you who wrote gtags.vim?
> I just use it from Vim as it intended to be used, which is described in
> Global doc:
> https://www.gnu.org/software/global/globaldoc_toc.html#Vim-editor
> The only difference is I can run Vim not only within the project
> directory, but from any place. The Global will still work for my project
> files.
>
> Feel free if you have any more questions!
>
> On 23.01.2019 10:13, Shigio YAMAGUCHI wrote:
> > Hello,
> >
> > How do you use it?
> >
> > Regards,
> > Shigio
> >
> > 2019年1月23日(水) 6:56 Andrey Butirsky <address@hidden>:
> >> Hello,
> >>
> >> Vim is capable to handle tags even if your current directory is not
> >> within the project, because it can deal with the path of
> >> the current file:
> >> http://vimdoc.sourceforge.net/htmldoc/tagsrch.html#tags-option
> >>
> >> I tried to achieve similar capability for GNU GLOBAL.
> >> Here is what I've got:
> >>
> >> --- /usr/share/gtags/gtags.vim 2018-07-19 08:25:46.000000000 +0300
> >> +++ /home/bam/.vim/plugin/gtags.vim 2019-01-22 06:13:10.221680075 +0300
> >> @@ -212,7 +212,7 @@
> >> "
> >> let s:global_command = $GTAGSGLOBAL
> >> if s:global_command == ''
> >> - let s:global_command = "global"
> >> + let s:global_command = "'cd ' . expand('%:h:S') . ' && global -a'"
> >> endif
> >> " Open the Gtags output window. Set this variable to zero, to not open
> >> " the Gtags output window by default. You can open it manually by using
> >> @@ -400,7 +400,7 @@
> >> if l:isfile == 1
> >> let l:cmd = s:global_command . ' ' . l:option . ' ' .
> >> g:Gtags_Shell_Quote_Char . a:pattern . g:Gtags_Shell_Quote_Char
> >> else
> >> - let l:cmd = s:global_command . ' ' . l:option . 'e ' .
> >> g:Gtags_Shell_Quote_Char . a:pattern . g:Gtags_Shell_Quote_Char
> >> + exe 'let l:cmd =' s:global_command ". ' ' . l:option . 'e ' .
> >> g:Gtags_Shell_Quote_Char . a:pattern . g:Gtags_Shell_Quote_Char"
> >> endif
> >>
> >> let l:result = system(l:cmd)
> >>
> >>
> >> Would love to hear your suggestions/comments!
> >>
> >>
> >> _______________________________________________
> >> Bug-global mailing list
> >> address@hidden
> >> https://lists.gnu.org/mailman/listinfo/bug-global
> >
> >
>
>
> _______________________________________________
> Bug-global mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-global
--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint:
26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB
- make gtags.vim work for any dir, Andrey Butirsky, 2019/01/22
- Re: make gtags.vim work for any dir, Shigio YAMAGUCHI, 2019/01/23
- Re: make gtags.vim work for any dir, Andrey Butirsky, 2019/01/23
- Re: make gtags.vim work for any dir,
Shigio YAMAGUCHI <=
- Re: make gtags.vim work for any dir, Andrey Butirsky, 2019/01/23
- Re: make gtags.vim work for any dir, Shigio YAMAGUCHI, 2019/01/23
- Re: make gtags.vim work for any dir, Andrey Butirsky, 2019/01/24
- Re: make gtags.vim work for any dir, Andrey Butirsky, 2019/01/24
- Re: make gtags.vim work for any dir, Andrey Butirsky, 2019/01/24
- Re: make gtags.vim work for any dir, Andrey Butirsky, 2019/01/24
- Re: make gtags.vim work for any dir, Andrey Butirsky, 2019/01/24
- Re: make gtags.vim work for any dir, Shigio YAMAGUCHI, 2019/01/24