sponsor Vim development Vim logo Vim Book Ad

switch buffer quickly : A simple way to switch buffer quickly

 script karma  Rating 0/0, Downloaded by 441  Comments, bugs, improvements  Vim wiki

created by
dong hongbo
 
script type
utility
 
description
A simple way to switch buffer quickly .

it may be very helpful if you often need to switch buffer in a lot of buffers.

1. basic usage

:e a.txt
:w
za

:e b.txt
:w
za

:e c.txt
:w
za

press <c-j> or <c-k> then you can switch buffer in the list that contain a.txt , b.txt , c.txt.

2. group the buffer list

when you open a new tab page , you will switch to another group automatic , the number of group is the number of tab page number . that mean you can manage multiple buffer list

3. edit your .vimrc like this:

nnoremap za :call SBQ_PushBuffer()<cr>                     # add current buffer to buffer list
nnoremap zd :call SBQ_PopBuffer()<cr>                      # delete current buffer from buffer list
nnoremap zs :call SBQ_ShowBufferList()<cr>                 # show the list of buffer list
nnoremap <c-j> :call SBQ_SelectBuffer(1)<cr>               # switch buffer
nnoremap <c-k> :call SBQ_SelectBuffer(2)<cr>               # switch buffer
 
install details
copy switchBufferQuickly.vim to ~/.vim/plugin
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
selectBufferQuickly.vim 0.01 2012-01-18 7.0 dong hongbo Initial upload
ip used for rating: 18.118.164.151

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github