Hi,

On 9/6/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
Sibin P. Thomas wrote:
> Thank a lot to everyone!
> I added the following to my _vimrc file to get what I wanted
>
> nmap <C-F9> :Makecompile<CR>
> nmap <F5> :Makexec<CR> :!%<.exe<CR>
> command Makecompile :se makeprg=gcc\ -o\ %<.o\ % | :make!
> command Makexec :se makeprg=gcc\ -o\ %<\ % | :make!
>

We're not within a makefile: I don't believe %< will be interpreted.
Passing %<.o (with % interpreted by Vim) to the shell would mean "the

As explained under the help for ":make_makeprg":

----------------------------------xxx---------------------------------------------------------
{makeprg} is the string given with the 'makeprg' option.  Any command can be
used, not just "make".  Characters '%' and '#' are expanded as usual on a
command-line.  You can use "%<" to insert the current file name without
extension, or "#<" to insert the alternate file name without extension.
----------------------------------xxx---------------------------------------------------------

You can use %< and #< in the 'makeprg' setting for the current and alternate
file name without the extension.

- Yegappan

Reply via email to