Loading ...
Sorry, an error occurred while loading the content.

Re: Vim Shell

Expand Messages
  • Antoine J. Mechelynck
    ... somehow I feel that it should be possible to make a script to interpret the dos prompt directly in vim (it is available as $PROMPT), even mimic the dos
    Message 1 of 7 , Jan 2, 2003
    • 0 Attachment
      Dan Sharp <dwsharp@...> wrote:
      > > From: "A. S. Budden" <vim.mail@...>
      > >
      > > I am a hardened dos user (sorry!) and do everything I can using a
      > > combination of Vim and the WinXP command prompt, including running
      > > windows programs and any file manipulation etc. I was wondering if
      > > anyone had come up with a plugin or alternative version of Vim that
      > > would act as a command prompt - anything you typed would be run and the
      > > result appended to the buffer file that was visible at the top. I know
      > > you can do this crudely with :.!, but you then have to go to the end of
      > > the output before typing another command or it's all back to front, or
      > > worse, overwritten...
      >
      > Instead of using :.! to write the output at the current line, try using
      > :$! to write the output starting on the last line. Actually, that will
      > replace the last line, so try something like
      >
      > :$put ='<cr>' | $! <your command here>
      >
      > This will add a blank line to the end of the buffer, then replace it with
      > the output of the command.
      >
      > Dan Sharp
      >
      > _________________________________________________________________
      > Protect your PC - get McAfee.com VirusScan Online
      > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

      somehow I feel that it should be possible to make a script to interpret the
      dos prompt directly in vim (it is available as $PROMPT), even mimic the dos
      shell, using, let's say, a home-written function InterpretPrompt() and a
      loop on :input(InterpretPrompt($PROMPT)) but is it worth it? I'm also a DOS
      old-timer, but I keep my dos-box and gvim separate.

      Tony.
    • Brian Sturk
      ... I ve written such an animal and it is called vimsh. It does, however, need a python enabled vim. http://vim.sourceforge.net/script.php?script_id=165 --
      Message 2 of 7 , Jan 2, 2003
      • 0 Attachment
        On Thu, Jan 02, 2003 at 09:57:12PM +0100, Antoine J. Mechelynck wrote:
        > From: "Antoine J. Mechelynck" <antoine.mechelynck@...>
        > To: <vim@...>
        > Subject: Re: Vim Shell
        > Date: Thu, 2 Jan 2003 21:57:12 +0100
        >
        > Dan Sharp <dwsharp@...> wrote:
        > > > From: "A. S. Budden" <vim.mail@...>
        > > >
        > > > I am a hardened dos user (sorry!) and do everything I can using a
        > > > combination of Vim and the WinXP command prompt, including running
        > > > windows programs and any file manipulation etc. I was wondering if
        > > > anyone had come up with a plugin or alternative version of Vim that
        > > > would act as a command prompt - anything you typed would be run and the
        > > > result appended to the buffer file that was visible at the top. I know
        > > > you can do this crudely with :.!, but you then have to go to the end of
        > > > the output before typing another command or it's all back to front, or
        > > > worse, overwritten...
        > >
        > > Instead of using :.! to write the output at the current line, try using
        > > :$! to write the output starting on the last line. Actually, that will
        > > replace the last line, so try something like
        > >
        > > :$put ='<cr>' | $! <your command here>
        > >
        > > This will add a blank line to the end of the buffer, then replace it with
        > > the output of the command.
        > >
        > > Dan Sharp
        > >
        > > _________________________________________________________________
        > > Protect your PC - get McAfee.com VirusScan Online
        > > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
        >
        > somehow I feel that it should be possible to make a script to interpret the
        > dos prompt directly in vim (it is available as $PROMPT), even mimic the dos
        > shell, using, let's say, a home-written function InterpretPrompt() and a
        > loop on :input(InterpretPrompt($PROMPT)) but is it worth it? I'm also a DOS
        > old-timer, but I keep my dos-box and gvim separate.

        I've written such an animal and it is called vimsh. It does, however,
        need a python enabled vim.

        http://vim.sourceforge.net/script.php?script_id=165

        --
        .--------------------------------------------------,---------.
        | Brian Sturk - http://users.adelphia.net/~bsturk \ C/C++ | .> )\,^a__
        |-------------------------. bsturk<AT>adelphia.net | Python |( _ _)/ /-." ~
        | http://www.telengard.com `------------------------`--------| `( )_ )/
        | Telengard Technologies Inc. - NT/*nix UI & device drivers |_<_s_<_s
        `------------------------------------------------------------'
      Your message has been successfully submitted and would be delivered to recipients shortly.