Re: compile code from within vim

2006-11-27 Thread Hugh Sasse
On Mon, 27 Nov 2006, Bill Moseley wrote: > I know the OP was asking about vim6, but in vim7 it seems like setting I'm fairly sure they are the same in this respect > > :compiler perl > > has to be done to select the correct compiler script. Is that > expected? Do I need to map, say, .

Re: compile code from within vim

2006-11-27 Thread Bill Moseley
On Mon, Nov 27, 2006 at 10:34:34AM +0800, [EMAIL PROTECTED] wrote: > The feature is already supported by Vim, and I bet that's the Vim native > way to do that. > > See: > :h :make_makeprg > > If you would like to know how this works, > > See also: > $VIMRUNTIME/compiler/*.vim > For example: $VIM

Re: compile code from within vim

2006-11-26 Thread panshizhu
"atstake atstake" <[EMAIL PROTECTED]> 写于 2006-11-27 09:37:40: > 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, vim would be able to compile > the code based on the

Re: compile code from within vim

2006-11-26 Thread Jean-Rene David
* atstake atstake [2006.11.26 20:45]: [...] > 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. To cha

Re: compile code from within vim

2006-11-26 Thread Peter Hodge
Hello, Probably the most straightforward way to do this in your ~/.vimrc file: nnoremap :call CompileScript() function! CompileScript() " the name of the current file let fname = expand('%') " can't compile unless the file is saved if &modified echo printf('Please sav

compile code from within vim

2006-11-26 Thread atstake atstake
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, 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 t