在 Windows 上的 gvim 中使用 taglist 插件

发布于 2024-12-01 07:34:41 字数 746 浏览 0 评论 0原文

我开始在 windows7(64 位)上的 gvim 中使用 taglist 插件,

这是我输入 TlistToggle 时的路径

path of ctags: C:\ctags58
path of gvim: C:\Program Files (x86)\Vim\vim73

,我收到以下错误消息。

Error detected while processing function <SNR>17_Tlist_WIndow_Toggle..<SNR>17_Tlist_Window_Open..<SNR>17_Tlist_Window_Refresh..<SNR>17_Tlist_Window_Refresh_File..<SNR>17_Tlist_Process_File:
E484: Can't open file C:/Users/*username*/AppData/Local/Temp/VIo9212.tmp
Taglist: Failed to generate tags for *path of test.cpp*
E484: Can't open file C:/Users/*username*/AppData/Local/Temp/VIo935B.tmp
Taglist: Failed to generate tags for *path of makefile*

这是斜杠/反斜杠问题吗?

如果是这样,我该如何解决?

im started using taglist plugin in gvim on windows7(64bit)

here is the path

path of ctags: C:\ctags58
path of gvim: C:\Program Files (x86)\Vim\vim73

when i typed TlistToggle, i got following error message.

Error detected while processing function <SNR>17_Tlist_WIndow_Toggle..<SNR>17_Tlist_Window_Open..<SNR>17_Tlist_Window_Refresh..<SNR>17_Tlist_Window_Refresh_File..<SNR>17_Tlist_Process_File:
E484: Can't open file C:/Users/*username*/AppData/Local/Temp/VIo9212.tmp
Taglist: Failed to generate tags for *path of test.cpp*
E484: Can't open file C:/Users/*username*/AppData/Local/Temp/VIo935B.tmp
Taglist: Failed to generate tags for *path of makefile*

is this slash/backslash problem?

if so, how can i solve it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

紫罗兰の梦幻 2024-12-08 07:34:41

检查您的 shellshellcmdflag 选项。

:set shell?
:set shellcmdflag?

我遇到了同样的问题。我在 Windows 机器上安装了 Cygwin,但没有在其下运行 Gvim。然而,由于某种原因,shell选项被设置为/bin/bash,这显然是错误的,所以它当然无法实际运行ctags工具。我必须将覆盖添加到我的 _vimrc 中,如下所示:

set shell=cmd.exe
set shellcmdflag=/C

Check your shell and shellcmdflag options.

:set shell?
:set shellcmdflag?

I ran into the same issues. I had Cygwin installed on my Windows machine, but I wasn't running Gvim under it. Yet, for some reason, the shell option was set to /bin/bash, which is obviously wrong, and so of course it couldn't actually run the ctags tool. I had to add the overrides to my _vimrc like so:

set shell=cmd.exe
set shellcmdflag=/C
迷爱 2024-12-08 07:34:41

您好,这是我在 .vimrc 中针对不同环境的设置:

if has("unix") " For environment at work (compiled locally)
  let Tlist_Ctags_Cmd = "~/mytools/bin/ctags"
elseif has("win32")
  let Tlist_Ctags_Cmd="C:/cygwin/bin/ctags.exe"
elseif has("win32unix") " For Cygwin
  let Tlist_Ctags_Cmd="/usr/bin/ctags"
endif

您可以尝试使用 Tlist_Ctags_Cmd 以这种方式提供 ctags 的路径
希望这有帮助。

Hello here is my settings in .vimrc for the different environment I have:

if has("unix") " For environment at work (compiled locally)
  let Tlist_Ctags_Cmd = "~/mytools/bin/ctags"
elseif has("win32")
  let Tlist_Ctags_Cmd="C:/cygwin/bin/ctags.exe"
elseif has("win32unix") " For Cygwin
  let Tlist_Ctags_Cmd="/usr/bin/ctags"
endif

You could try to give the path to ctags in thi way with Tlist_Ctags_Cmd
Hope this help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文