开发者

using taglist plugin in gvim on windows

开发者 https://www.devze.com 2023-03-30 03:25 出处:网络
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

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/Te开发者_如何学JAVAmp/VIo935B.tmp
Taglist: Failed to generate tags for *path of makefile*

is this slash/backslash problem?

if so, how can i solve it?


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号