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

Re: Last visited buffers

Expand Messages
  • Alan Schmitt
    ... Using the Aqua version of Vim on OS X.3.7, neither CTRL-^ no CTRL-6 work (I also tried with Command, but it did not work either). What key combination
    Message 1 of 9 , Jan 3, 2005
    • 0 Attachment
      Le 31 déc. 04, à 13:23, Boucher, Eric a écrit :

      > Also, you can use the edit command:
      > :e#[count]
      > where [count] is then buffer number ('1' if nothing is specified). So,
      > if
      > you want to toggle between the 2 lasts buffers, you can use either
      > 'CTRL-^',
      > 'CTRL-6' or ':e#'

      Using the Aqua version of Vim on OS X.3.7, neither CTRL-^ no CTRL-6
      work (I also tried with Command, but it did not work either). What key
      combination should I use?

      Thanks,

      Alan Schmitt
    • Emily Jackson
      On Mon, 3 Jan 2005 12:36:11 +0100 ... There was a post about this issue on the vim-mac list several months ago, and Bram sent a patch to the list that is
      Message 2 of 9 , Jan 3, 2005
      • 0 Attachment
        On Mon, 3 Jan 2005 12:36:11 +0100
        Alan Schmitt <alan.schmitt@...> wrote:

        > Le 31 déc. 04, à 13:23, Boucher, Eric a écrit :
        >
        > > Also, you can use the edit command:
        > > :e#[count]
        > > where [count] is then buffer number ('1' if nothing is specified).
        > > So, if
        > > you want to toggle between the 2 lasts buffers, you can use either
        > > 'CTRL-^',
        > > 'CTRL-6' or ':e#'
        >
        > Using the Aqua version of Vim on OS X.3.7, neither CTRL-^ no CTRL-6
        > work (I also tried with Command, but it did not work either). What key
        > combination should I use?

        There was a post about this issue on the vim-mac list several months
        ago, and Bram sent a patch to the list that is supposed to fix this
        problem; I don't know if it was ever incorporated into any of the
        official patches, though (I use the X11 version of Vim with OS X). The
        patch is included in this message:
        <http://marc.theaimsgroup.com/?l=vim-mac&m=108764996023234&q=raw>.

        Emily

        --
        "If it seem slow, wait for it; it will surely come, it will not delay."
        Emily Jackson
        <http://home.hiwaay.net/~emilyj/missjackson.html>
      • Hari Krishna Dara
        ... The ctrl-^ command without count goes to the last visited buffer, but the count is not an extrapolation of the same concept. The count is taken as an
        Message 3 of 9 , Jan 3, 2005
        • 0 Attachment
          On Fri, 31 Dec 2004 at 8:45am, panshizhu@... wrote:

          >
          >
          >
          >
          > :help ctrl-^
          >
          > ctrl-^ get you to the nth (default 1) last visited buffer.
          >
          > Hope that helps.

          The ctrl-^ command without count goes to the last visited buffer, but
          the count is not an extrapolation of the same concept. The count is
          taken as an absolute buffer number, not an index into the last visited
          buffer list. In fact, I am not aware of Vim maintaining such a list, but
          there are a number of plugins that implement this functionality of an
          MRU list and you should be able to take advantage of them to implement a
          command of your own, if there is none already. Do a search on vim.org
          for MRU and you should find a plugin that you should be able to extend.

          Not exactly the same as the OP wants, but my selectbuf.vim plugin has
          some functionality which can also be used for this purpose. If you keep
          the buffer list sorted in the MRU order and use the 'a, 'b and 'c marks,
          you can quickly move cursor to the next, previous and current buffer
          lines (and press <Enter> to switch to them). It should also be possible
          to create commands on the lines of :next and :previous to shortcut this
          process.

          --
          HTH,
          Hari

          >
          >
          >
          >
          > "Singhal, Anil" <anil_singhal@...> wrote on 2004-12-31 04:36:20:
          >
          > >
          > > Hi,
          > >
          > > Any one knows about some scripts/vim commands - as to how I can
          > > move fwd & backward in the last visited buffers.
          > >
          > > Note:
          > > :next
          > > :previous
          > >
          > > scroll through the complete buffers list.
          > >
          > > Anil
          >
          >
          >



          __________________________________
          Do you Yahoo!?
          Read only the mail you want - Yahoo! Mail SpamGuard.
          http://promotions.yahoo.com/new_mail
        • Alan Schmitt
          ... Thanks for the link. I hope it will be included in future versions of Mac Vim. Alan Schmitt
          Message 4 of 9 , Jan 4, 2005
          • 0 Attachment
            Le 3 janv. 05, à 13:25, Emily Jackson a écrit :

            > On Mon, 3 Jan 2005 12:36:11 +0100
            > Alan Schmitt <alan.schmitt@...> wrote:
            >
            >> Le 31 déc. 04, à 13:23, Boucher, Eric a écrit :
            >>
            >>> Also, you can use the edit command:
            >>> :e#[count]
            >>> where [count] is then buffer number ('1' if nothing is specified).
            >>> So, if
            >>> you want to toggle between the 2 lasts buffers, you can use either
            >>> 'CTRL-^',
            >>> 'CTRL-6' or ':e#'
            >>
            >> Using the Aqua version of Vim on OS X.3.7, neither CTRL-^ no CTRL-6
            >> work (I also tried with Command, but it did not work either). What key
            >> combination should I use?
            >
            > There was a post about this issue on the vim-mac list several months
            > ago, and Bram sent a patch to the list that is supposed to fix this
            > problem; I don't know if it was ever incorporated into any of the
            > official patches, though (I use the X11 version of Vim with OS X). The
            > patch is included in this message:
            > <http://marc.theaimsgroup.com/?l=vim-mac&m=108764996023234&q=raw>.

            Thanks for the link. I hope it will be included in future versions of
            Mac Vim.

            Alan Schmitt
          • Antoine J. Mechelynck
            ... If your keyboard hasn t got some key, you can make it available via a mapping, something similar to the following (experiment, and change to ... Best
            Message 5 of 9 , Jan 7, 2005
            • 0 Attachment
              Alan Schmitt wrote:
              > Le 31 déc. 04, à 13:23, Boucher, Eric a écrit :
              >
              >> Also, you can use the edit command:
              >> :e#[count]
              >> where [count] is then buffer number ('1' if nothing is specified). So, if
              >> you want to toggle between the 2 lasts buffers, you can use either
              >> 'CTRL-^',
              >> 'CTRL-6' or ':e#'
              >
              >
              > Using the Aqua version of Vim on OS X.3.7, neither CTRL-^ no CTRL-6 work
              > (I also tried with Command, but it did not work either). What key
              > combination should I use?
              >
              > Thanks,
              >
              > Alan Schmitt

              If your keyboard hasn't got some key, you can make it available via a
              mapping, something similar to the following (experiment, and change to
              suit your taste):

              :map <F9> <C-^>
              :map! <F9> <C-^>

              Best regards,
              Tony.
            Your message has been successfully submitted and would be delivered to recipients shortly.