Tuesday, December 13, 2022

Re: How to quickly move to a specific buffer?

good stuff. also, `:b` completion shows your open buffers. and ^6 is not only good for going between two, not if you have three and can remember their buffer numbers via :ls, <n>^6 takes you to buffer number n.

On Tue, Dec 13, 2022, 20:21 Tim Chase <vim@tim.thechases.com> wrote:
On 2022-12-13 20:09, Steve Litt wrote:
> I typically use :bn and :bp to move between buffers, but I have five
> buffers open on my current project, which requires a heck of a lot of
> keystrokes to move to a specific buffer. So I'd like a command to bring
> up a list of buffers so I can chose a specific one.

I usually use

  :ls

though there's also similarly

  :files
  :buffers

with details at

  :help :files

to list the buffers I currently have open, and then use "#" followed
by the buffer-number to edit that particular buffer-number or split
it in a new window:

  :e #38
  :sp #38

as detailed at

  :help :_#n

If I have two that I'm flipping back and forth between, I'll use
control+^ (:help CTRL+^) to toggle between the current file and the
alternate file.

  :help alternate-file

Hopefully that gives you some reasonable built-in solutions.  I'm
sure there are all sorts of file-navigation plugins, but the stock
functionality works fine for me.

-tim




--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Y5klK91M1LNLWBed%40thechases.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJdN7KicKCjEZ40%3DjAjHhKzcvkMAx400GXVdp%3DORoEsNXeF8uQ%40mail.gmail.com.

No comments: