Monday, December 20, 2010

Re: expand('%<.exe') omits the '.exe'?

Hi Marc Weber,
A pair of '%' is the way to access environmental variables.

I want to use '%<.exe' to access the exe file whose title is the same
with the file which is currently edited. For example, current buffer
is a.c, is it possible to access a.exe by expanding '%<.exe'? If I
don't use '%' here, what should I use?
Thanks for your help.
Hong Xu
2010/12/21

On 12/21/10, Marc Weber <marco-oweber@gmx.de> wrote:
> Excerpts from H Xu's message of Tue Dec 21 05:09:15 +0100 2010:
>> The result of expand('%<.exe') only contains the file name without the
>> extension on Windows. How could I keep that .exe? Thanks.
>
> Isn't % the way to access shell vars in cmd.exe? Maybe try escaping it
> somehow (?)
>
> Why do you use a % here?
>
> Marc Weber
>
> --
> You received this message from the "vim_use" 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
>

--
You received this message from the "vim_use" 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

No comments: