From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Espen Newsgroups: gmane.emacs.help Subject: Re: How do you run your scripts efficiently? Date: Tue, 16 Sep 2008 09:50:32 -0400 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221576092 26160 80.91.229.12 (16 Sep 2008 14:41:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Sep 2008 14:41:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 16 16:42:28 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kfbkn-0000Yh-Ig for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Sep 2008 16:42:09 +0200 Original-Received: from localhost ([127.0.0.1]:54560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kfbjm-0007K7-He for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Sep 2008 10:41:06 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.erje.net!news.k-dsl.de!aioe.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-NNTP-Posting-Host: 4AE4AuUNcHSN/2S3W1b6lg.user.aioe.org Original-X-Complaints-To: abuse@aioe.org Cancel-Lock: sha1:PcvJ7htUaG3HFfOgQLdSIn6TBrI= User-Agent: Gnus/5.090015 (Oort Gnus v0.15) XEmacs/21.4 (Educational Television, i686-pc-linux) Original-Xref: news.stanford.edu gnu.emacs.help:162355 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57699 Archived-At: "Ben Aurel" 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.