Error editing perl source file with filetype plugin indent on in my _vimrc

45 views
Skip to first unread message

Knute Johnson

unread,
Apr 14, 2020, 3:54:49 AM4/14/20
to v...@vim.org
If I attempt to edit a perl source file with "filetype plugin indent on"
in my _vimrc file I get the following error:

"test.pl" 4L, 69CJohnson\AppData\Local\Temp\VIo1F34.tmp was unexpected
at this t
ime.

Error detected while processing C:\Program Files
(x86)\Vim\vim82\ftplugin\perl.v
im:
line   50:
E484: Can't open file C:\Users\Knute Johnson\AppData\Local\Temp\VIo1F34.tmp
Error detected while processing function <SNR>6_LoadFTPlugin:
line   17:
E170: Missing :endfor
Error detected while processing function dist#ft#FTpl:
line   10:
E171: Missing :endif
Press ENTER or type command to continue

Then when I press ENTER and edit the file I can't use ZZ to save and
exit because it shows another error:

E13: File exists (add ! to override)

This all used to work just fine.  I've uninstalled, cleaned out all the
files I could find and reinstalled and still have the problem.  Using
8.2, Windows 10, I don't have this problem on Linux.

My _vimrc file:

syntax on
filetype plugin indent on
set showmatch
set tabstop=4
set shiftwidth=4
set expandtab

Any ideas where to start?

Thanks,

--

Knute Johnson

Tony Mechelynck

unread,
Apr 14, 2020, 4:54:23 AM4/14/20
to vim_use, vim-perl
• Which Vim version, including major.minor.patch? (As of this writing,
the latest version is 8.2.577)
• The Perl filetype-plugin ($VIMRUNTIME/ftplugin/perl.vim) hasn't
changed much recently AFAIK — the version on the master repository is
dated "Last Change: 2015-02-09" which I find weird.
• The function whose name starts with <SNR>6_ was defined in the 6th
script sourced in that particular run of Vim. Next time you get that
error, check the output of the :scriptnames command for the script
with the same number as the one following <SNR>. The function was
defined in that script with <SID> instead of <SNR>6_ at the start of
its name.

I'm adding the address listed as "maintainer" of the Perl ftplugin as
a CC, let's hope someone is still listening at that address.

Best regards,
Tony.

Knute Johnson

unread,
Apr 14, 2020, 12:37:47 PM4/14/20
to v...@vim.org
On 4/14/2020 03:54, Tony Mechelynck wrote:
> • Which Vim version, including major.minor.patch? (As of this writing,
> the latest version is 8.2.577)

I was using 8.2.480 but I had been having the problem for a while, just
hadn't been editing perl files so didn't worry about it.  Uninstalled
8.2.480 and installed 8.2 and that is what is in the post.  Uninstalled
8.2 and installed 8.2.577(64) and it is unusable from a terminal for a
bunch of reasons.  gvim seems to be fine.  Uninstalled 8.2.577 and
reinstalled 8.2.480 and now I don't have the problem any more.

I thought I had cleaned out all the left over files when I uninstalled
8.2.480 originally but maybe there was something I didn't get or maybe
the later uninstallers are more thorough.

I'll deal with the 8.2.577 issues later.

> • The Perl filetype-plugin ($VIMRUNTIME/ftplugin/perl.vim) hasn't
> changed much recently AFAIK — the version on the master repository is
> dated "Last Change: 2015-02-09" which I find weird.
> • The function whose name starts with <SNR>6_ was defined in the 6th
> script sourced in that particular run of Vim. Next time you get that
> error, check the output of the :scriptnames command for the script
> with the same number as the one following <SNR>. The function was
> defined in that script with <SID> instead of <SNR>6_ at the start of
> its name.
Will do.
>
> I'm adding the address listed as "maintainer" of the Perl ftplugin as
> a CC, let's hope someone is still listening at that address.
>
> Best regards,
> Tony.
>
Thanks Tony.  I hope I didn't put you on to a wild goose chase.

--

Knute Johnson

Knute Johnson

unread,
Apr 18, 2020, 2:14:04 PM4/18/20
to v...@vim.org
Turns out I was wrong, the problem didn't go away, I took the filetype
plugin indent on line out of my _vimrc file. So let's run through this
again.

Window 10 64bit
Vim 8.2.587 64bit

Enabled:
All Enhancements
Remap a few keys
Windows button behavior

_vimrc file:

syntax on
filetype plugin indent on
set showmatch
set tabstop=4
set shiftwidth=4
set expandtab

Open any file with a .pl extension and this is the error:

"test.pl" 6L, 110CJohnson\AppData\Local\Temp\VIo639C.tmp was unexpected
at this
time.

Error detected while processing C:\Program
Files\Vim\vim82\ftplugin\perl.vim:
line 50:
E484: Can't open file C:\Users\Knute Johnson\AppData\Local\Temp\VIo639C.tmp
Error detected while processing function <SNR>6_LoadFTPlugin:
line 17:
E170: Missing :endfor
Error detected while processing function dist#ft#FTpl:
line 10:
E171: Missing :endif
Press ENTER or type command to continue

Tony wrote: "Next time you get that
error, check the output of the :scriptnames command for the script
with the same number as the one following <SNR>. The function was
defined in that script with <SID> instead of <SNR>6_ at the start of
its name."

I ran :scriptnames and this is what I got. I don't think that is
exactly what he was looking for as there are no numbers listed?

1: ~\_vimrc
2: C:\Program Files\Vim\vim82\syntax\syntax.vim
3: C:\Program Files\Vim\vim82\syntax\synload.vim
4: C:\Program Files\Vim\vim82\syntax\syncolor.vim
5: C:\Program Files\Vim\vim82\filetype.vim
6: C:\Program Files\Vim\vim82\ftplugin.vim
7: C:\Program Files\Vim\vim82\indent.vim
8: C:\Program Files\Vim\vim82\plugin\getscriptPlugin.vim
9: C:\Program Files\Vim\vim82\plugin\gzip.vim
10: C:\Program Files\Vim\vim82\plugin\logiPat.vim
11: C:\Program Files\Vim\vim82\plugin\manpager.vim
12: C:\Program Files\Vim\vim82\plugin\matchparen.vim
13: C:\Program Files\Vim\vim82\plugin\netrwPlugin.vim
14: C:\Program Files\Vim\vim82\plugin\rrhelper.vim
15: C:\Program Files\Vim\vim82\plugin\spellfile.vim
16: C:\Program Files\Vim\vim82\plugin\tarPlugin.vim
17: C:\Program Files\Vim\vim82\plugin\tohtml.vim
18: C:\Program Files\Vim\vim82\plugin\vimballPlugin.vim
19: C:\Program Files\Vim\vim82\plugin\zipPlugin.vim
20: C:\Program Files\Vim\vim82\autoload\dist\ft.vim
21: C:\Program Files\Vim\vim82\syntax\perl.vim
22: C:\Program Files\Vim\vim82\syntax\pod.vim
23: C:\Program Files\Vim\vim82\ftplugin\perl.vim
Press ENTER or type command to continue

gvim has the same problem.

I'm going to try different options on the install to see if that makes a
difference and will report back.

Thanks,

--

Knute Johnson

Knute Johnson

unread,
Apr 18, 2020, 4:00:24 PM4/18/20
to v...@vim.org
OK, I went back and tried all the other option combination. Then I went
into my archives and installed vims back to 7.3.46 and they all still
have the same problem. It has to be in my computer. The error says it
is starting from the inability to open a temporary file.

E484: Can't open file C:\Users\Knute Johnson\AppData\Local\Temp\VIo9084.tmp

What can cause this?

I installed 8.2.587 to another Windows computer and it works fine. The
problem is somewhere in my computer. If I had a way to reload Windows I
would but this version has been through several disk changes and there
is no recovery possible. I'm afraid I'm going to have to buy some media
and load it from scratch.

I think this is going to be impossible to find.

Thanks for looking.

--

Knute Johnson

Tom M

unread,
Apr 18, 2020, 6:08:53 PM4/18/20
to vim_use
I would try editing a *.pl file under a different user account - an account that has no spaces. On the same system. Preferably with the same VIM installation. Or at least an identical VIM installation and config. So that we see whether the problems has something to do with the space in "C:\Users\Knute Johnson\AppData\Local\Temp".

Tom

Knute Johnson

unread,
Apr 18, 2020, 10:49:22 PM4/18/20
to vim...@googlegroups.com
Thanks for the followup.  I would gladly comply if I hadn't completely
destroyed my Windows box trying to reinstall Windows. I had to load
Linux on this box so the problem is now moot.

--

Knute


--

Knute Johnson

Reply all
Reply to author
Forward
0 new messages