On Sun, Oct 26, 2008 at 7:07 PM, Martin dum8d0g Kopta <[EMAIL PROTECTED]> wrote:
> Is there any possibility to tell vim to:
>
> If (presed F9)
> {
>  if (Makefile exists){execute make}
>  else { do :!./% }
> }

In my .vimrc I have this:

au FileType c if glob('Makefile') == "" | let &mp="gcc -o %< %" | endif
au FileType cpp if glob('Makefile') == "" | let &mp="g++ -o %< %" | endif

I must have found it in some .vimrc around the web and it works for me.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to