Skip to content

Instantly share code, notes, and snippets.

@cstrahan
Created March 4, 2012 22:49
Show Gist options
  • Save cstrahan/1975217 to your computer and use it in GitHub Desktop.
Save cstrahan/1975217 to your computer and use it in GitHub Desktop.
Emacs Sr Speedbar
(require 'sr-speedbar)
(setq speedbar-frame-parameters
'((minibuffer)
(width . 40)
(border-width . 0)
(menu-bar-lines . 0)
(tool-bar-lines . 0)
(unsplittable . t)
(left-fringe . 0)))
(setq speedbar-hide-button-brackets-flag t)
(setq speedbar-show-unknown-files t)
(setq speedbar-smart-directory-expand-flag t)
(setq speedbar-use-images nil)
(setq sr-speedbar-auto-refresh nil)
(setq sr-speedbar-max-width 70)
(setq sr-speedbar-right-side nil)
(setq sr-speedbar-width-console 40)
(when window-system
(defadvice sr-speedbar-open (after sr-speedbar-open-resize-frame activate)
(set-frame-width (selected-frame)
(+ (frame-width) sr-speedbar-width)))
(ad-enable-advice 'sr-speedbar-open 'after 'sr-speedbar-open-resize-frame)
(defadvice sr-speedbar-close (after sr-speedbar-close-resize-frame activate)
(sr-speedbar-recalculate-width)
(set-frame-width (selected-frame)
(- (frame-width) sr-speedbar-width)))
(ad-enable-advice 'sr-speedbar-close 'after 'sr-speedbar-close-resize-frame))
@j3j3
Copy link

j3j3 commented May 16, 2012

What an amazing gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment