sebdah/vim-delve

VimLeave: E488: Trailing characters

Closed this issue ยท 5 comments

I recently added this plugin to my vimrc and I upon neovim exit I started noticing the following error message:

Error detected while processing VimLeave Auto commands for "*":
E488: Trailing characters

If I disable this plugin, the message does not appear. Do you think this is related to this plugin?

Hmm, I think there is some interference between plugins here. vim-delve is making a call on VimLeave (https://github.com/sebdah/vim-delve/blob/master/plugin/delve.vim#L80). But I don't see how the trailing characters thing is relevant.

What that call is doing is to remove a temporary file created if the user has in fact used vim-delve during the session.

Two questions:

  1. Did you use the vim-delve plugin in the session or do you get the error always when leaving?
  2. If you disable all other plugins, does this happen anyway?

I can't reproduce it in my environment.

I am seeing the same behavior. The error message flashes, but Neovim exits so you can't really see it. If I set debug logging, though, I can see it. It happens whether or not I use vim-delve in the session.

If I remove the <cr> from the end of line 80, the error goes away. Per this link, the <cr> is unnecessary: https://stackoverflow.com/questions/5059458/vim-autocommand-produces-e488-trailing-characters

@hoop33 / @balta2ar I somehow can't reproduce this even in debug mode. Could any of you please try with removing the <cr> manually OR by using the branch in PR #21.

With master:

continuing in VimLeave Auto commands for "*"
autocommand call delve#removeInstructionsFile()<cr>

Error detected while processing VimLeave Auto commands for "*":
E488: Trailing characters

Manually removing <cr>:

continuing in VimLeave Auto commands for "*"
autocommand call delve#removeInstructionsFile()

Using branch bugfix/vim-leave-trailing-chars:

continuing in VimLeave Auto commands for "*"
autocommand call delve#removeInstructionsFile()

(For each run, I launched using nvim -V9delve.log)

Thanks!

Wonderful! Thanks for the thorough testing @hoop33. I'm merging this change now ๐Ÿš€.