http://qs321.pair.com?node_id=245359


in reply to Environments extended with embeded Perl: are they for real?

I decided to look back at vi; or more precisely to its vim avatar. Except for the lack a of a decent pager and the ability to run shell or debugger. It seems pretty nifty.

Do you mean by this that you think vim lacks the ability to run a shell? My vim lets me do this! Just prefix the command with :!.

:!/bin/sh [No write since last change] sh-2.05b$
Maybe you have rvim a restricted vim that doesn't let you do this? Or maybe I am misunderstanding?

Replies are listed 'Best First'.
Re: Re: Environments extended with embeded Perl: are they for real?
by stefp (Vicar) on Mar 24, 2003 at 02:53 UTC
    Do you mean by this that you think vim lacks the ability to run a shell? My vim lets me do this! Just prefix the command with :!.

    That's not what I meant. Please, excuse my vagueness and let me reformulate.

    My grief against vim is that one can't run a process (like a shell) and interact with it within a vim buffer so that you can (for example) record the session. Such feature is available with emacs. See its shell-mode for example.

    Simply starting a shell from vim has the additional inconvenience that you can easily stack a vim on top a shell on top a vim... I know that some shells have environment variables like SHLVL that you can manage to display as part of the prompt so that you can see when you stack stuff like that. But that is not addressing the real problem: the shell session should be available as a vim buffer.

    -- stefp

      vim is an editor ;), not a terminal emulator. You can use screen(1) to log interactive (and non.) sessions to a file, scroll the buffer, copypaste on the screen within the session and so on.

      This is generally where vim's mindset differs from emacs' - it doesn't try to do everything under the sun (and on the Sun) on its own, but usually easily integrates with something that does what you want.

      screen understands the vi movement keys in scroll mode, so one can get used to it quite quickly if one knows vim well.

      Makeshifts last the longest.