sponsor Vim development Vim logo Vim Book Ad

LustyJuggler : Switch very quickly among your active buffers

 script karma  Rating 154/53, Downloaded by 9026  Comments, bugs, improvements  Vim wiki

created by
Stephen Bach
 
script type
utility
 
description
*** Download the newest version of this plugin on Github: https://github.com/sjbach/lusty ***

LustyJuggler is a high speed buffer juggler.  Having to consciously think about which buffer you need to switch to sucks, so use this instead.

Someone made a screen cast showing it in action (jump to 6:20):

      http://lococast.net/archives/185

      Also, a quick video demo:
      http://www.youtube.com/watch?v=vQuF0Vm0EG4

      Older stuff:
      http://sjbach.com/lusty-juggler-animated.gif
      http://sjbach.com/lusty-juggler-annotated.png

Launch the juggler with this key combo:

      <Leader>lj

The command bar at bottom is replaced with a new bar showing the names of your currently opened buffers in most-recently-used order.

The buffer names are mapped to these keys:

      1st --> a or 1
      2nd --> s or 2
      3rd --> d or 3
      4th --> f or 4
      5th --> g or 5
      6th --> h or 6
      7th --> j or 7
      8th --> k or 8
      9th --> l or 9
      10th --> ; or 0

So if you type "f" or "4", the fourth buffer name will be highlighted and the bar will shift to center it as necessary (and show more of the buffer names on the right).

If you want to switch to that buffer, press "f" or "4" again or press "<ENTER>".  Alternatively, press one of the other mapped keys to highlight another buffer.

If you changed your mind, cancel the juggler with any of "q", "<ESC>", "<C-c", "<BS>", "<Del>", or "<C-h>".

If you like LustyJuggler, you may also like LustyExplorer: vimscript #1890

Development repository: http://github.com/sjbach/lusty
 
install details
Copy the plugin/ and autoload/ directories into your $HOME/.vim/ directory.

NOTE: This plugin requires Vim be compiled with Ruby interpretation.  If you do not currently have this functionality, see the "Install Details:" section of the script for directions on adding it.  It's not too tough.

Also: prior to Vim 7.3.32, LustyJuggler can interact poorly with plugins such as YankRing or SuperTab that remap common normal mode keys such as "d" (for dd, dw, etc.)
 

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
lusty-juggler-1.6.zip 1.6 2018-07-25 7.0 Stephen Bach Many minor fixes over the last six years.
lusty-juggler.vim 1.5.1 2012-02-29 7.0 Stephen Bach Fixed "Missing quote" error message introduced in v1.5. (Guy Haskin Fernald)
lusty-juggler.vim 1.5 2012-02-25 7.0 Stephen Bach Added support for Dvorak keyboard layout.  Enable it with 'let g:LustyJugglerKeyboardLayout = "dvorak"'. (Chris Lasher)
lusty-juggler.vim 1.4 2011-11-25 7.0 Stephen Bach - Open buffers in a new window split: "b" for horizontal, "v" for vertical. (Leonid Shevtsov)
- Added arrow key navigation. (Giuseppe Rota)
- Further fixes to saving/restoring key bindings. (Giuseppe Rota)
- Added g:LustyJugglerDefaultMappings configuration. (Göran Gustafsson)
lusty-juggler.vim 1.3 2011-04-29 7.0 Stephen Bach - 'i' now cancels the juggler rather than putting Vim in an uncertain state. (Thanks to Adam Rutkowski)
- Improve restoring of keymappings for Vim versions >= 7.3.32.  This allows LustyJuggler to be used effectively with e.g. YankRing and SuperTab. (Thanks to Carlo Teubner)
lusty-juggler.vim 1.2 2010-12-17 7.0 Stephen Bach - Don't show unlisted buffers. (Thanks to Johannes Holzfuß)
- New Alt-Tab mode to emulate window manager switching.  See g:LustyJugglerAltTabMode in documentation. (Thanks to Martin Wache)
- Save and restore keymappings. (Thanks to Vincent Driessen)
lusty-juggler.vim 1.1.4 2010-06-03 7.0 Stephen Bach - don't error if ENTER is pressed before selection
- avoid a "Press ENTER to continue" message.  (Thanks to Bartosz Leper)
- don't error when the QuickFix buffer is open.  (Thanks to Marco Barberis)
lusty-juggler.vim 1.1.3 2010-03-05 7.0 Stephen Bach - Fix portability with the updated Vim->Ruby data type conversion in devhead Vim.
- Fix portability with Ruby 1.9.
lusty-juggler.vim 1.1.2 2009-07-16 7.0 Stephen Bach Fix ENTER key to select the active buffer.  Thanks to Bartosz Leper.
lusty-juggler.vim 1.1.1 2009-07-16 7.0 Stephen Bach Fix a startup bug in OS X and Windows.  Thanks to Bartosz Leper.
lusty-juggler.vim 1.1.0 2009-05-27 7.0 Stephen Bach - Substantially shorten displayed buffer names; usually only the basename is shown.  Thanks to Matt Tolton for the idea.
- Add GetLatestVimScripts compatibility.
lusty-juggler.vim 1.0.4 2008-11-15 7.0 Stephen Bach The g:LustyJugglerShowKeys option should not be required to be set.
lusty-juggler.vim 1.0.3 2008-09-27 7.0 Stephen Bach Added g:LustyJugglerShowKeys for prefixing buffer names.  Thanks to Juan Frias for the original patch.
lusty-juggler.vim 1.0.2 2008-08-25 7.0 Stephen Bach - Colouring for path elements.
- Added :JugglePrevious, a smarter version of the :b# command.
- Refactoring.
lusty-juggler.vim 1.0.1 2007-10-26 7.0 Stephen Bach - Fixed the layout algorithm so as not to veer right.
- Disabled showmode when juggler is active.
lusty-juggler.vim 1.0 2007-10-23 7.0 Stephen Bach Initial upload
ip used for rating: 142.132.191.50

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