Note: there is no import autoload or symbolic links.
Note: if the directory is not named autoload no error.
vim first.vim
:source
Error detected while processing :source buffer=1[3]../home/err/play/yyy/autoload/second.vim:
line 4:
E492: Not an editor command: val = 42
first.vim
vim9script
import './autoload/second.vim'
echo second.val
second.vim
vim9script
export var val = 11
val = 42
No error
I ran into this in a largish vim9script application while I was cleaning up; I don't think it was a change I made, but it might have been. I can't say for sure it was a recent change.
I haven't looked into the vim code. Plenty of time getting to the simple example;) I took out the symlink code I recently added, still happens.
9.1.353
ubuntu/gtk
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Oops, forgot to mention: the tree looks like
$ tree
..
├── autoload
│ └── second.vim
└── first.vim
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Turns out vim9.0 also behaves this way. I've looked through the :help again, but there's no indication that this behavior is intended.
I thought I had searched for autoload issues. But just did it again, and this might be another example, possibly even a duplicate.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
#13198 may be related
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #14591 as completed via 84f6dc7.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()