sponsor Vim development Vim logo Vim Book Ad

tselectbuffer : A quick buffer selector/switcher

 script karma  Rating 881/223, Downloaded by 4096  Comments, bugs, improvements  Vim wiki

created by
Tom Link
 
script type
utility
 
description
This plugin provides a simple buffer selector. It doesn't have all the
features other buffer selectors have but can be useful for quickly
switching to a different buffer or for deleting buffers.

The idea is to view the buffer list, to do something, and to close the
buffer list. If you really want to permanently watch the buffer list to
see whether it's changed, you might want to use a different plugin.

Features:
    - list buffers, dynamically filter buffers matching a pattern
    - switch to a buffer
    - rename a buffer (you may need to use :saveas! or :w! when writing
    the renamed buffer to disk)
    - delete one or more buffer(s)

:[N]TSelectBuffer[!]
    List buffers. With a count or a !, show also hidden buffers.
    Keys:
    <cr>  ... Select (close the buffer list)
    <c-s> ... Open in split window
    <c-v> ... Open in vertically split window
    <c-t> ... Open in new tab
    <c-w> ... Show in original window (continue with the buffer list)
    <c-d> ... Delete a buffer
    <c-u> ... Rename a buffer
    <     ... Jump to opened buffer in window/tab

Suggested keymaps (put something like this into ~/.vimrc):
    noremap <m-b> :TSelectBuffer<cr>
    inoremap <m-b> <c-o>:TSelectBuffer<cr>
 
install details
vimscript #1863 is required.

Copy the vim file to ~/.vim/plugin/


Also available via git
http://github.com/tomtom/tselectbuffer_vim
 

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
tselectbuffer.vba 0.7 2010-10-02 7.0 Tom Link - Moved the definition of some variables from plugin/tselectbuffer.vim to autoload/tselectbuffer.vim
- Delete buffer: New options: None, all
- Support for g:tselectbuffer#order = "basename"
- Require tlib 0.40
tselectbuffer.vim 0.6 2008-12-02 7.0 Tom Link - Alternate buffer wasn't initially selected after 0.4
- FIX: <c-s> and similar keys didn't work.
- MRU order (set g:tselectbuffer_order to "mru")
tselectbuffer.vim 0.4 2007-09-11 7.0 Tom Link - <c-w> ... View file in original window
- < ... Jump to already opened window, preferably on the current tab
page (if any)
- Enabled <c-t> to open buffer in tab
- Require tlib 0.13
- Initially select the alternate buffer
- Make a count act as bang.
- Can be "suspended" (i.e. you can switch back to the orignal window)
tselectbuffer.vim 0.3 2007-07-17 7.0 Tom Link - <c-u>: Rename buffer (and file on disk)
- <c-v>: Show buffers in vertically split windows
- Require tlib 0.9
- "Delete buffer" will wipe-out unloaded buffers.
tselectbuffer.vim 0.2 2007-05-17 7.0 Tom Link - Minor improvements
tselectbuffer.vim 0.1 2007-04-18 7.0 Tom Link Initial upload
ip used for rating: 3.139.81.58

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