Hello Neil Bird
>> autocmd BufReadPre $temp/RAR* setlocal noswapfile
>> In spite of all this care, vim ignores the autocmd :-(
> Just as a test case, could you set 'temp' correctly *in* the
> environment before calling vim, and comment out the assignments
> in the vimrc?
As I said: TEMP is set correctly, but is converted into 8.3
convention -- not by vim, but by Billy's Software. I can do nothing
against it. Therefore I defined a new variable TMP. Alas, this was
converted too :-( Therefore, I defined yet another variable: TMPDIR.
This was not converted anymore :-)
I can see this conversion in a CMD window by typing
as well as within vim by typing
vim doesn't make any conversions, even the path separators \ aren't
But wait -- now I found the reason: autocmd _does_ some conversions
by its own!!! It changes all \ into /. This is why my lines
let $temp = substitute($TMPDIR, ';', ',', 'g')
let $temp = substitute($temp, '\\', '/', 'g')
let $temp = substitute($temp, ' ', '\\ ', 'g')
are simply too much. I have only to write
autocmd BufReadPre $TMPDIR/* setlocal noswapfile
and then all things are fine. Hmmm ... one has to find all this
magic metamorphosis first :-\
But nevertheless I have some feature requests for vim under windows:
- autocmd pattern doesn't recognize short 8.3 path names and can't
compare them against long path names.
- autocmd pattern do only compare names, but not interpret their
meanings. This is why the two paths "C:/bar" and "C:/foo/../bar"
are treated as different locations. This is why contructions like
autocmd XYZ $SOME_PATH/../*
never do work.
With kind regards and thanks for help