Question

I have installed vim 7.4 in a windows 7 machine. The ctags that comes with it seems to be broken. When I do :!ctags -R . from within vim I get :

C:\WINDOWS\system32\cmd.exe /c (ctags -R .)
Input file specified two times.

ctags: cannot sort tag file : No such file or directory
shell returned 1
Hit any key to close this window...

In this case ctags creates a tags file that is empty. I then installed ctags from sourceforge And it works.

But I could not find how I should tell vim to use the ctags I just doenloaded.

ctags installed in vim is 5.2.3

ctags from sourceforge is 5.8

I tried:

enter link description here

let g:netrw_ctags = "C:/Users/aslavcd/Program Files/ctags58/ctags.exe"

To wherever ctags is. But it doesn't change it.

Problem Resolved. I had an older version of ctags installed by another program and added to Path.

Was it helpful?

Solution 2

OK. Silly answer. I had an older version installed by QNX Momentics and, of course, added to path.

Further information: QNX 6.5.0 puts its unix executables (like ls, mkdir, etc.) in the path, which is aproblem because I then ended up with two ctags executables in the path. In QNX 6.6.0. and later the instalation doesn't put the QNX executables in the path directly but uses a .bat file that is has to be executed in order to have them (like when you need compilation).

OTHER TIPS

Put the ctags path into environment variable PATH. In powershell (administrative) do

[Environment]::SetEnvironmentVariable("PATH", $Env:PATH + ";<ctags_dir_path>", "MACHINE")

The version I have works normally. I don't use it directly but via TagBar plugin.

Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Jul  9 2009, 17:05:35
  Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
  Optional compiled features: +win32, +regex, +internal-sort

I installed it via Chocolatey: cinst ctags. If you isntall it this way, you don't have to do anything else as choco installer handles that. You can also put this into your vimrc such as:

if !executable("ctags")
    call system('cinst ctags')
en
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top