:buffers -- I'm probably doing something wrong ;)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

:buffers -- I'm probably doing something wrong ;)

Kennedy, Marcus A.

Hi All,

 

Hope you are all maintaining sanity with day 3,592,487 of quarantine.

 

A question about :buffers.  :buffers shows the buffers that are

available within a given session.  In my case, I open my vim with the

command:

 

vim -O3 $(find -name '*.h') $(find -name '.*c') $(find -name '*.cpp')

 

I then cycle through my various buffers with :buf <somefile>.  Today,

something is wrong.  I've got a file bc.h. So, I do

 

:buf bc.h

 

and I get back "E93: More than one match for bc.h".  So, I think, hmm,

wonder what I did.  I'll look at the buffers.  But, I have more than 75

buffers on the command line.  When I go to see why I have duplicate bc.h

files, I cannot find them due to the number of buffers.  Unfortunately,

if I press any key, the buffers window exits and I cannot see anything.

I've done some searching on the web but cannot find the correct way to

scroll through the buffers list.

 

What is the correct way to scroll the buffers list?

 

Thanks,

Andy

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/5ADFF93892EDB147B66FCBABC8E4F27F4424B70E%40prgmbx01.
Reply | Threaded
Open this post in threaded view
|

Re: :buffers -- I'm probably doing something wrong ;)

Dominique Pellé
Kennedy, Marcus A. <[hidden email]> wrote:

> :buf bc.h
>
> and I get back "E93: More than one match for bc.h".  So, I think, hmm,
> wonder what I did.  I'll look at the buffers.  But, I have more than 75
> buffers on the command line.  When I go to see why I have duplicate bc.h
> files, I cannot find them due to the number of buffers.  Unfortunately,
> if I press any key, the buffers window exits and I cannot see anything.
> I've done some searching on the web but cannot find the correct way to
> scroll through the buffers list.
>
> What is the correct way to scroll the buffers list?

When looking at buffers with :ls   you can scroll with
the keys f and b  (forward & backward).

But more efficient in your case would be to do:

:filter /bc.h/ ls

... which will filter the :ls command to show only result
matching the regex bc.h

Regards
Dominique

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAON-T_hRjw_%3DppJonGNwT3nvtM%3DFEaa4D5uqrtr4o_TZPMnW0w%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: :buffers -- I'm probably doing something wrong ;)

Tony Mechelynck
On Tue, May 5, 2020 at 12:03 AM Dominique Pellé
<[hidden email]> wrote:

>
> Kennedy, Marcus A. <[hidden email]> wrote:
>
> > :buf bc.h
> >
> > and I get back "E93: More than one match for bc.h".  So, I think, hmm,
> > wonder what I did.  I'll look at the buffers.  But, I have more than 75
> > buffers on the command line.  When I go to see why I have duplicate bc.h
> > files, I cannot find them due to the number of buffers.  Unfortunately,
> > if I press any key, the buffers window exits and I cannot see anything.
> > I've done some searching on the web but cannot find the correct way to
> > scroll through the buffers list.
> >
> > What is the correct way to scroll the buffers list?
>
> When looking at buffers with :ls   you can scroll with
> the keys f and b  (forward & backward).
>
> But more efficient in your case would be to do:
>
> :filter /bc.h/ ls

Since the pattern is a Vim search pattern (not a shell glob pattern)
the dot should be backslash-escaped. I would try

        :filter /\<bc\.h\>/ ls

>
> ... which will filter the :ls command to show only result
> matching the regex bc.h
>
> Regards
> Dominique

Best regards,
Tony.

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXt259kfLtzi30GEQMBU_5u6BuOZvw4iFS2qih-VCmYTcw%40mail.gmail.com.