vim-gutentags icon indicating copy to clipboard operation
vim-gutentags copied to clipboard

Cannot generate the GTAGS at windows platform

Open LeoZhang-ATMEL opened this issue 2 years ago • 5 comments

Describe the bug Cannot generate the GTAGS files on windows, looks like this issue was caused by missing the plat/win32/update_gtags.cmd files. image

It could be fixed by manually adding the missing file with the below content.

$ cat plat/win32/update_gtags.cmd @echo off setlocal EnableExtensions EnableDelayedExpansion rem ========================================== rem PARSE ARGUMENTS rem ========================================== set GTAGS_EXE=gtags set GTAGS_ARGS=%~4 set INCREMENTAL= :ParseArgs if [%1]==[] goto :DoneParseArgs if [%1]==[-e] ( set GTAGS_EXE=%~2 shift goto :LoopParseArgs ) if [%1]==[--incremental] ( set INCREMENTAL=--incremental shift goto :LoopParseArgs ) echo Invalid Argument: %1 goto :Usage :LoopParseArgs shift goto :ParseArgs :DoneParseArgs rem ========================================== rem GENERATE TAGS rem ========================================== echo Running gtags: echo call %GTAGS_EXE% %INCREMENTAL% %GTAGS_ARGS% call %GTAGS_EXE% %INCREMENTAL% %GTAGS_ARGS% echo Done. goto :EOF rem ========================================== rem USAGE rem ========================================== :Usage echo Usage: echo %~n0 ^<options^> echo. echo -e [exe=gtags]: The gtags executable to run. echo -L [cmd=]: The file list command to run echo.

LeoZhang-ATMEL avatar May 19 '22 15:05 LeoZhang-ATMEL

Why not create a PR?

zoumi avatar Jul 11 '22 06:07 zoumi

PR created, https://github.com/ludovicchabant/vim-gutentags/pull/330

LeoZhang-ATMEL avatar Jul 13 '22 01:07 LeoZhang-ATMEL

I encounter same issue. Will it be fixed?

dean-ho avatar Sep 01 '22 14:09 dean-ho

I encounter same issue. But I remember when I use old version before the GTAGS can work.

retzzz avatar Sep 29 '22 01:09 retzzz

please use my fork please: https://github.com/skywind3000/vim-gutentags before my PR https://github.com/ludovicchabant/vim-gutentags/pull/336 get merged.

After https://github.com/ludovicchabant/vim-gutentags/commit/39dc3ee228bb7cc712d95b0130c233451381e3da , gtags became unusable in gutentags because this commit requires a update_gtags.sh or update_gtags.cmd script to execute actual gtags command, but:

  1. update_gtags.sh lacks of execution permission on Linux.
  2. update_gtags.cmd is not provided.

So, after that commit, gtags is no longer usable in gutentags.

my update_gtags.cmd is modified from @LeoZhang-ATMEL 's version but add two thing:

  1. better argument parsing
  2. support newly added -L option.

skywind3000 avatar Oct 08 '22 15:10 skywind3000