Skip to content

E495 No autocommand file and W22 text found after endfunction #221

@reini-1

Description

@reini-1

I use editorconfig-vim installed with Plug and get some errors with the plugin:

$ echo q | /usr/bin/vim -u ~/.vimrc -U NONE -i NONE -V1 -nNes
not found in 'runtimepath': "ftdetect/*.vim"
not found in 'packpath': "pack/*/start/matchit"
not found in 'packpath': "pack/*/start/*"
not found in 'packpath': "pack/*/start/*"
not found in 'runtimepath': "plugin/**/*.vim"
Error detected while processing VimEnter Autocommands for "*"..function <SNR>26_UseConfigFiles:
line    6:
E495: No autocommand file name to substitute for "<afile>"
Entering Ex mode.  Type "visual" to go to Normal mode.
:q

I think this is in the code somewhere here: https://github.com/editorconfig/editorconfig-vim/blob/master/plugin/editorconfig.vim#L214 and happens if vim is opened without a file to edit given.

When giving a file this error is gone but then there is another:

echo q | /usr/bin/vim -u ~/.vimrc -U NONE -i NONE -V1 -nNes test.txt
not found in 'runtimepath': "ftdetect/*.vim"
not found in 'packpath': "pack/*/start/matchit"
not found in 'packpath': "pack/*/start/*"
not found in 'packpath': "pack/*/start/*"
not found in 'runtimepath': "plugin/**/*.vim"
"test.txt" [New]
not found in 'runtimepath': "indent/text.vim"
W22: Text found after :endfunction: !
Entering Ex mode.  Type "visual" to go to Normal mode.
:q

I think this comes from https://github.com/editorconfig/editorconfig-vim/blob/master/autoload/editorconfig_core/ini.vim#L193
When I remove the "!", the message is gone.

I come across this problems because I use topgrade-rs to update my system and the vim update failed so I tried to find out what the problem is.

Maybe you can fix this.

Thanks in advance.
Reini

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions