help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you run your scripts efficiently?


From: Dan Espen
Subject: Re: How do you run your scripts efficiently?
Date: Tue, 16 Sep 2008 09:50:32 -0400
User-agent: Gnus/5.090015 (Oort Gnus v0.15) XEmacs/21.4 (Educational Television, i686-pc-linux)

"Ben Aurel" <ben.aurel@gmail.com> writes:

> hi
> I work mostly in vim, although I'm not a very advanced vim user. The
> problem is I can't find a simple way to easily run a perl script and
> capture its output.
>
> I've tried different things but I'm still *very* unsatisfied with the
> implementation of the following basic workflow:
>
>      1. Edit a perl script in the editor
>      2. Press one key (eg. F5) to save and run the script
>      3. Print the output to a window below the editor window
>      4. Possibility to easily switch to the output window and scroll
> through the messages
>      5. Possibility to easily switch back to the editor window

Run the Perl script under M-x compile
compile will offer to save the file if it's not already saved.

I bind compile to F1:

(define-key global-map [(f1)] 'compile)

Compile wants to use "make".
If you don't want to use a makefile
put this at the bottom of the perl-file:

# Local Variables:
# compile-command: "./perl-script"
# End:

To switch to the other window, use M-x other-window,
I do this enough that I bind it to F10:

(define-key global-map [(f10)] 'other-window)

I think that covers all 5 issues above.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]