Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How do you run your scripts with vim (or emacs)?

by parv (Priest)
on Sep 14, 2008 at 14:11 UTC ( #711283=note: print w/ replies, xml ) Need Help??


in reply to How do you run your scripts with vim (or emacs)?

Seems like you are just starting out with vim|emacs. Both require some quality time to be spent with them to have them bent per your desires (almost). Please see :help on :buffers, :map, :make & :cwindow (which I found via tips search section of Vim home), among other commands.

I don't run a program through vim, only to check if perl will compile it (map <F5> :setlocal makeprg=perl\ -c\ %\|make<CR>). I do have an occasionally exercised key binding to run the program: map <F6> :setlocal makeprg=perl\ %\|make<CR>.

Yes, edit-Ctrl-Z-run-fg cycle is indeed tedious for more than thrice. I much prefer to use two xterm windows: one for the editor; other to run and redirect output as I like. Along with command history as pointed out earlier, there is also xterm buffer space to temporarily hold some adjustable number of lines of text.

I don't like a split window (in any of vim or emacs) which causes small viewport, thus much scrolling. On a big monitor (or two side by side), both windows will be side by side. Else, I just use my window manager's key binding to flip between the windows.

I must admit that if I were to be working on console (about 25x80 resolution) with access to only one tty, I would be extremely motivated to run a program within vim and to find a way to save output in a file which would linger around and be inserted in buffer list.


Comment on Re: How do you run your scripts with vim (or emacs)?
Select or Download Code
Replies are listed 'Best First'.
Re^2: How do you run your scripts with vim (or emacs)?
by Perlbotics (Canon) on Sep 14, 2008 at 18:09 UTC

    When working with limited *nix consoles, I find it very convenient to use a virtual window manager like screen.

    Especially when dealing with multiple remote logins, it can help to keep the working environment clear. I often use one xterm for emacs and another xterm PuTTY terminal that runs screen with multiple logins on the same or different hosts.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://711283]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (11)
As of 2015-07-08 05:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls