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

RE: vi commands in bash

Expand Messages
  • Denio, Michael (IT)
    You may want to try zsh. I ve found the the vi mode to be superior to bash. ... NOTICE: If received in error, please destroy and notify sender. Sender does
    Message 1 of 8 , Dec 1, 2005
    • 0 Attachment
      You may want to try zsh. I've found the the vi mode to be superior to
      bash.

      > -----Original Message-----
      > From: Chris Allen [mailto:c.d.allen@...]
      > Sent: Thursday, December 01, 2005 9:42 AM
      > To: r.cussons@...
      > Cc: vim@...
      > Subject: Re: vi commands in bash
      >
      > On 01/12/05, Robert Cussons <r.cussons@...> wrote:
      > > I just found out about putting: set -o vi in my .bashrc
      > to get vim
      > > style command line editing in bash, I have the feeling that
      > this could
      > > be very useful, but it doesn't work exactly how I would like it to.
      >
      > Ironically, the vi key bindings are the only key binding set
      > required of a sh-style shell by the Single Unix
      > Specification. Equally ironically, they have a long and
      > glorious history of being badly and inconsistently
      > implemented, despite being part of the SUS. While there is
      > something to be said for consistency (and I certainly try to
      > use Bash as though it were vi somtimes), you will probably
      > find, in the long run, that it is far more awkward and
      > painful to use vi bindings than it is to accept the default
      > Emacs-like bindings. This is especially true if you use
      > different implementations of sh and even different versions
      > of bash, since almost none of them will behave in quite the same way.
      >
      > > I hope it is OK to post on this list about this as I think it is a
      > > useful feature to users of Vim.
      >
      > Undoubtedly okay, but Bash/sh/etc are completely unrelated to
      > Vim, so your suggestions are likely to go unimplemented. It
      > might be possible to re-bind things under Bash using
      > Readline, but you'd probably have better luck posting to a
      > Bash or Readline mailing list.
      >
      > HTH,
      > Chris Allen
      >
      >
      --------------------------------------------------------

      NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.
    • Robert Cussons
      ... Hi Jean, thanks for the advice, it wasn t so much a request to modify bash, it was a request for advice on how to work around bash in its present state
      Message 2 of 8 , Dec 1, 2005
      • 0 Attachment
        Jean-Rene David wrote:

        >* Robert Cussons <r.cussons@...>:
        >
        >
        >>I just found out about putting: set -o vi in
        >>my .bashrc
        >>
        >>
        >
        >Two thoughts:
        >
        >- although useful on this list for informational
        > purposes, I think requests to modify bash will
        > be more useful on a bash-related list;
        >
        >- I personnally find zsh's vi-mode far better
        > than bash's, and more flexible to boot. For
        > example, you could do what you are asking fairly
        > easily.
        >
        >But let's not get too far off-topic...
        >
        >
        >
        Hi Jean,

        thanks for the advice, it wasn't so much a request to modify bash, it
        was a request for advice on how to work around bash in its present state
        with mappings etc. and I thought people well versed in Vim might know
        how to perform the relevant action as they might have tried to do it
        themselves. But I will try submitting to a bash related list and see if
        I have any joy.
        Rob.
      • Charles E. Campbell, Jr.
        ... Hopefully no one has received your email in error! However, how does one notify a sender that has been destroyed already? Besides, is there a preferred
        Message 3 of 8 , Dec 1, 2005
        • 0 Attachment
          Denio, Michael (IT) wrote:

          >You may want to try zsh. I've found the the vi mode to be superior to
          >bash.
          >
          >
          >--------------------------------------------------------
          >
          >NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.
          >
          >
          Hopefully no one has received your email in error! However, how does
          one notify a sender that has been destroyed already? Besides, is there
          a preferred method for destroying the sender? Perhaps cruise
          missiles? Hmm, the use of what is prohibited? Did I just use
          something? Uh oh...

          Don't y'all just love the legal argle bargle disclaimers... at least
          this one was short.
          Chip Campbell
        • Mark Volkmann
          ... Cool! But how do you do command-line completion? The tab key no longer does that when in vi mode. -- R. Mark Volkmann Partner, Object Computing, Inc.
          Message 4 of 8 , Jan 24, 2006
          • 0 Attachment
            On 12/1/05, Robert Cussons <r.cussons@...> wrote:
            > Hi all,
            >
            > I just found out about putting: set -o vi in my .bashrc to get vim
            > style command line editing in bash

            Cool! But how do you do command-line completion? The tab key no
            longer does that when in vi mode.

            --
            R. Mark Volkmann
            Partner, Object Computing, Inc.
          Your message has been successfully submitted and would be delivered to recipients shortly.