Friday, December 24, 2010

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

On 12/21/10, Christian Brabandt <cblists@256bit.org> wrote:
> On Tue, December 21, 2010 8:38 am, H Xu wrote:
>> 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.
>
> (Please don't top poste).
> Don't use expand(). It's easier if you use simple ex-commands, e.g.
> :e %<.exe
> would edit the .exe file for the file currently edited (silly example,
> as this does not make sense to edit binary files).
> Or an example I use regularly when editing latex files:
> :! xpdf %<.pdf
> (from the faq: http://vimhelp.appspot.com/vim_faq.txt.html#faq-16.1)
>
> regards,
> Christian

Hi,
That doesn't suit my case. Now I have used another way to make it.
Thanks all the same.
Hong Xu

--
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:

Post a Comment