Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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.

Replies are listed 'Best First'.
Re^2: How do you run your scripts with vim (or emacs)?
by Perlbotics (Chancellor) 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://711283]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2017-10-22 03:26 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (272 votes). Check out past polls.