jsfaint / gen_tags.vim

Async plugin for vim and neovim to ease the use of ctags/gtags
https://vim.sourceforge.io/scripts/script.php?script_id=5499
MIT License
312 stars 42 forks source link

ctags can't add g:gen_tags#ctags_opts parameter , it would pop "-f option may not follow a file name" #56

Closed maxtcy closed 6 years ago

maxtcy commented 6 years ago

Hi Sir,

gen_tags.vim version is image It shoud be the latest one.

If add g:gen_tags#ctags_opts in my vimrc, it would pop up ctags: -f option may not follow a file name Message as below test

As comparison, Remove g:gen_tags#ctags_opts in vimrc , there is no such message popup.

Right now, i am remove it as workaround. Since there is no such issue in previous version. Can you take a look ?

jsfaint commented 6 years ago

I can't reproduce on both windows and linux. image

image

maxtcy commented 6 years ago

How should i do to provide more information for you about this problem?

jsfaint commented 6 years ago

Please provides the following information:

  1. vim version, ctags version
  2. value of g:gen_tags#ctags_opts
  3. Run ctags command directly with the parameters on your image
maxtcy commented 6 years ago

1. vim version image ctags version image

  1. value of g:gen_tags#ctags_opts image

  2. Not quite sure about the answer of it. Do you mean "keyin what i see popup message in the root folder " ? test ex:$ctags --extras=+r --fields=+niazS -f /folder_path/.git/tags_dir/prj_tags -R /folder_path Do you mean this way ? If yes, it seems like i manually keyin these command , it can generate the prj_tags out.

THX

jsfaint commented 6 years ago

I reproduced it with vim 8.1, but neovim 0.3.0 works well. That's weird.

jsfaint commented 6 years ago

And when I modified your g:gen_tags#ctags_opts setting. Modify let g:gen_tags#ctags_opts = ' --fields=+niazS' to let g:gen_tags#ctags_opts = '--fields=+niazS' Just remove the space before --fields

It works... WTF

maxtcy commented 6 years ago

Hi Sir, how about multiple g:gen_tags#ctags_opts As you can see, there are several opts marked out in my setting. If i would like to use more than 1 opts, Is my setting correct ? THX

jsfaint commented 6 years ago

I'm not sure the meaning of multiple g:gen_tags#ctags_opts. Can you explain?

maxtcy commented 6 years ago

As screen-shot show in the below , only --fields=+niazS , there are 5 opts more , i just marked out. image

jsfaint commented 6 years ago

Your setting is correct. But as I said above, vim has some issues to support your first line. You need to remove the space before --fields

maxtcy commented 6 years ago

Hi Sir, Can you hlep me try it with all my setting?

Since i still encounter some error, but if i key in in command in the terminal. There is no such error.

If save file, it would pop up below error in my side. ctags: Warning: Unsupported parameter ' ' for "fields" option ctags: Warning: Unsupported parameter '=' for "fields" option ctags: Warning: Unsupported parameter 'q' for "fields" option ctags: Warning: Unsupported parameter ' ' for "fields" option ctags: Warning: Unsupported parameter 'c' for "fields" option ctags: Warning: Unsupported parameter 'd' for "fields" option ctags: Warning: Unsupported parameter '=' for "fields" option ctags: Warning: Unsupported parameter ' ' for "fields" option ctags: Warning: Unsupported parameter 'c' for "fields" option ctags: Warning: Unsupported parameter 'd' for "fields" option ctags: Warning: Unsupported parameter '=' for "fields" option

jsfaint commented 6 years ago

I tried all your ctags_opts yesterday, but it works for me. image image

jsfaint commented 6 years ago

@maxtcy I refactor this part for better compatibility. Please try the latest code. Thanks

maxtcy commented 6 years ago

Will try it later. Stack in the middle of something

Jia Sui notifications@github.com 於 2018年6月14日 週四 上午11:01寫道:

@maxtcy https://github.com/maxtcy I refactor this part for better compatibility. Please try the latest code. Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jsfaint/gen_tags.vim/issues/56#issuecomment-397155126, or mute the thread https://github.com/notifications/unsubscribe-auth/AHIBFJx1rlYa-kvKL11K-eA518ACd_bvks5t8dIMgaJpZM4UlxIA .

maxtcy commented 6 years ago

Hi Sir,

Thanks for your support to refactor. There is no problem after test it. Both string and list are working fine.

Thanks ,

jsfaint commented 6 years ago

Thanks for your contribution to make gen_tags.vim better 👍