-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index out of range, 142_save_by_filetype, line 5, proposed fix #98
Comments
Hi @stepds and thanks for the feedback. First I'll try to reply to your original point: The idea behind the Side bar: This discussion does highlight a weak point (bug?) of vim-easytags: I don't use custom language definitions myself so never noticed, but I guess this feature does not go well together with vim-easytags' dependence on the Second I can't resist a more general reply: I don't really get your example, because you're creating a definition for a custom tag generation command, but it's just using |
Hi xolox,
|
Hi @stepds and thanks for the reply, I now have a better understanding of the reasoning that led to the issue you reported. I think I can help out fairly easily, I'll be back in a moment :-) |
I believe the new g:easytags_opts option can resolve your issue and simplify your Vim configuration significantly. Can you try it out? |
Some issue, see if this tells you anything
first and second runs (didn't try more)
|
@xolox Just happened on this while browsing my issues stream. I'm currently deep in Vim script quirks and oddities terrirtory in a project of mine, and I had a kind of déjà-vu reading the error reports, so I thought I'd share my observations. Feel free to shoot me down if I'm off base, but here goes:
|
@stepds: As the documentation says the option expects a list of strings, just like the let g:easytags_opts = '"--options='.$VIM.'\ctags\ctags.cnf"' If you change the above to this it should work: let g:easytags_opts = ['--options=$VIM\ctags\ctags.cnf'] As you may have noticed I just published vim-easytags 3.9.1, this new version contains two changes:
|
@kopischke wrote:
The error in the example may well be caused by a copy/paste error, reformatting or typing out an example. If that error was in the OPs vimrc it would have caused an error at the definition site, not the error the OP quoted: easytags.vim 3.7: Vim(let):E684: list index out of range: 4 (at function xolox#easytags#update..xolox#easytags#update#with_vim..<SNR>142_save_by_filetype, line 5) Given the above, in my opinion this has nothing to do with Vim script quirks and oddities (although I do admit there are _a lot_ of those :-). |
Brilliant, with the revised vimrc easytags works smoothly, thanks! |
@stepds: I'm glad to hear that the revised documentation helps and that you can now easily tell vim-easytags what to do without needing any creative hacks :-). About the Markdown quoting, you do that by starting a paragraph with a |
I think you could change something in file easytags.txt to avoid a run-time error.
File easytags.txt says about g:easytags_languages option
[...]
Each key is a special language definition. The key is a Vim file type in
lowercase. The above snippet shows the defaults; you only need to specify
options that differ.
And so I did, I only specified options that differ, like so (Windows _vimrc):
But something was missing because when I ran :UpdateTags easytags output an error message
I worked around this error by specifying more options for my custom command. I copied some options from the default call to ctags in function s:prep_cmdfile. So now easytags tags .r files just fine with the changed line in _vimrc:
The text was updated successfully, but these errors were encountered: