xolox / vim-easytags

Automated tag file generation and syntax highlighting of tags in Vim
http://peterodding.com/code/vim/easytags/
1.01k stars 109 forks source link

Problem with g:easytags_by_filetype #60

Closed aymericbeaumet closed 10 years ago

aymericbeaumet commented 10 years ago

I encountered a problem with the g:easytags_by_filetype option.

When setting it and the scan proceed, I get the following error:

Command line: sh -c '(/usr/local/bin/ctags --fields=+l --c-kinds=+p --c++-kinds=+p '\''-f/vim'\'' --sort=foldcase --extra=+q '\''--language-force=vim'\'' '\''/Users/abeaumet/.dotfiles/vim/vimrc'\'') 1>'\''/var/folders/2w/y0kgsc6j7j1dwh_6v9lwf50h0000gn/T/vGwzlLn/18'\'' 2>' \''/var/folders/2w/y0kgsc6j7j1dwh_6v9lwf50h0000gn/T/vGwzlLn/19'\'''

Output on standard output stream:

ctags: cannot open tag file : Permission denied (at function xolox#easytags#autoload..xolox#easytags#update..89_run_ctags..xolox#misc#os#exec, line 150)

I also try the :TagsByFileType command to get more details. I get the error below followed by the previous error message.

easytags.vim 3.4: Vim(return):E482: Can't create file /vim.easytags.tmp (at function xolox#easytags#by_filetype..89_save_by_filetype..xolox#easytags#write_tagsfile, line 28)

xolox commented 10 years ago

I recognize the temporary directory names in the first command line as coming from a Mac OS X install, is that correct?

The vim-easytags plug-in uses Vim's tempname() function to generate temporary file names. If that function returns broken results then vim-easytags will indeed break.

However the filename referenced in the second error message seems very wrong. What did you set g:easytags_by_filetype to?

aymericbeaumet commented 10 years ago

Ok this is my fault, I misread the documentation. I setted g:easytags_by_filetype to 1, by reading the variable name I thought it was a boolean.

Filling it with a path fixes the problem :)

PS: you were correct, I am on OSX