Can't limit Ctrl-O to only open current buffers in Vim

I am getting old buffers that need to be opened when I click

Ctrl-O

      

I only want to view the buffers that I have opened in the current Vim session.

How can you quickly view the current buffers in Vim using Ctrl-O?

+1


a source to share


1 answer


Unfortunately, I don't know how to get it CTRL-O

to behave the way you would like it to. But I can offer you a couple of tips that might help you.

  • You can use g;

    and g,

    to go to places where you have made changes , but only in the current buffer .

    I know this is not the same as that CTRL-O/I

    as it only deals with "changes" and it only keeps track of the current buffer, but it might be useful anyway.

  • You can quickly move open buffers by displaying in the .vimrc

    following way:

    nmap <special> <C-Up> :bnext<CR>
    nmap <special> <C-Down> :bprevious<CR>
    
          

I know this doesn't really answer your question, but I thought that maybe these few tips can help you lose weight a little.


Edit: I wanted to add that since you are interested in quickly looking at buffers, I personally recommend the little QuickBuf plugin:



http://www.vim.org/scripts/script.php?script_id=1910

I map it in mine .vimrc

like this:

let g:qb_hotkey = ",b"

      

Try it, it's faster than typing :ls

, and one more neat thing: you can navigate the list with j/k

and press <enter>

to select the buffer.

+2


a source







All Articles