Hmm, I've been googling around and I finally put together this code:

function RunMe()
       :if filereadable('Makefile')
               make
       :else
               !./%
       :endif
endfunction

map <F9> :w<CR>:call RunMe()<CR>
imap <F9> :w<CR>:call RunMe()<CR>


Maybe is not so pretty, but it does exactly what I need. Thanks to
Tony and myself :-)

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

Reply via email to