filename matches short file names when using :runtime and :source. (Ms Windows)

14 views
Skip to first unread message

nanashi

unread,
Oct 4, 2010, 6:44:05 AM10/4/10
to vim_dev
$ echo 'let g:test = "ftplugin/vim_01.vimm"' > ~/.vim/ftplugin/
vim_01.vimm
$ gvim -c "echo g:test" test.vim

When only the backup file remains in ~/.vim/ftplugin,
the backup file is sourced.
short file names "VIM_01~1.VIM" matches "test_*.vim".


$ echo 'let g:test = "test01.vimm"' > test01.vimm
$ gvim -u NONE -c "so test*.vim" -c "echo g:test"

short file names "TEST01~1.VIM" matches "test*.vim".

regards,
nanashi

Benjamin R. Haskell

unread,
Oct 4, 2010, 10:30:02 AM10/4/10
to vim_dev
On Mon, 4 Oct 2010, nanashi wrote:

> $ echo 'let g:test = "ftplugin/vim_01.vimm"' > ~/.vim/ftplugin/vim_01.vimm
> $ gvim -c "echo g:test" test.vim
>
> When only the backup file remains in ~/.vim/ftplugin, the backup file
> is sourced.
> short file names "VIM_01~1.VIM" matches "test_*.vim".

You can call your ftplugin files {filetype}_{whatever}.vim (so that you
can have multiple files for each {filetype}). In this case, {filetype}
is 'vim', and the {whatever} is '01~1'. I'm not quite sure what you
mean by backup file. You deleted 'vim_01.vimm'?


> $ echo 'let g:test = "test01.vimm"' > test01.vimm
> $ gvim -u NONE -c "so test*.vim" -c "echo g:test"
>
> short file names "TEST01~1.VIM" matches "test*.vim".

Yes? That's a property of short file names. "test01.vimm" has two
names: "test01.vimm" and "TEST01~1.VIM".

I don't understand why this is a problem. I'm not sure there's a nice
way to exclude short filenames as candidates for globbing, if that's the
suggestion.

--
Best,
Ben

Reply all
Reply to author
Forward
0 new messages