frabjous wrote:
Hi all,

I'm here to report what looks like a bug to me. Hopefully I'm not
wasting your time.

Here are the conditions.

1. Edit a blank file with no ft set (and hence no filetype plugins
loaded).

2. Attempt to save the file with an extension which causes a filetype
plugin to be loaded. (It seems to help if the filename chosen has
slashes in it for directories.)

3. The plugin in question must be one that changes the active
directory (through a command like `lcd %:p:r` or `set autochdir`).

4. Then rather than saving the file with the filename specified in
step 2, it saves the file under a seemingly random name, often using
what appears to be a line of code from the plugin as if it were the
filename (though not the same line as mentioned in line 3).

Anyway, I've recorded an animated .gif of the apparent bug in action,
which you can view here:

http://people.umass.edu/phil592w-klement/vimbug.gif

You can see the file is being saved with a very strange filename, and
not all the one specified.

I'm using 7.3 on Arch Linux (x86_64).
I tried creating an empty file via :enew, saving it to /tmp/junk.tex, and that went as one would expect it should. I think that you need to track down which ftplugin is giving you problems. Given that you have what appears to be a line of text from it, perhaps you could do a search for that text and locate where that text came from -- perhaps that ftplugin is the one causing problems. Disable it (mv whatever.vim whatever.vvim) and try it out. If it the process still results in problems, then try disabling more ftplugins until you find your culprit.

Alternatively, t may well be an unfortunate interaction with settings you may have, so try using

 vim -u NONE -N
 :set nocp
 :filetype plugin on
 :w /tmp/junk.tex
 :q

and see if that creates your unwanted filename.

Regards,
Chip Campbell


--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui