I'm using vim 6.4.7 on Fedora Core 5. I would like to compile C, Perl, ruby & bash script from within vim. I want vim to recognize a file by extenstion and if I map it to, say, <F3> vim would be able to compile the code based on the extension; eg. if it's a .pl file it would do "perl filename", show the result and if there's any error it would take me to the line where the error is.
Is there any easy way to do this with functions? Any example would be greatly appreciated. Thanks.
