From acf43459d8717f512e9194dc4b4478102ca189fe Mon Sep 17 00:00:00 2001 From: wsk Date: Mon, 15 Jun 2015 16:33:39 +0800 Subject: [PATCH 1/2] sr-speedbar remove unused item from TOC remove unused item rename sr-speedbar-show-or-hide to spacemacs/sr-speedbar-show-or-hide Evilify keybindings move --- layers/+tools/sr-speedbar/README.org | 25 +++++++++++++++++++++++ layers/+tools/sr-speedbar/packages.el | 29 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 layers/+tools/sr-speedbar/README.org create mode 100644 layers/+tools/sr-speedbar/packages.el diff --git a/layers/+tools/sr-speedbar/README.org b/layers/+tools/sr-speedbar/README.org new file mode 100644 index 000000000000..2449360f0c8c --- /dev/null +++ b/layers/+tools/sr-speedbar/README.org @@ -0,0 +1,25 @@ +#+TITLE: sr-speedbar contribution layer for Spacemacs + +* Table of Contents :TOC@4: + - [[#description][Description]] + - [[#install][Install]] + - [[#layer][Layer]] + - [[#usage][Usage]] + +* Description + +sr-speedbar is mode make SpeedBar show in Current Frame. + +* Install + +** Layer + +To use this contribution add it to your =~/.spacemacs= + +#+BEGIN_SRC emacs-lisp + (setq-default dotspacemacs-configuration-layers '(sr-speedbar)) +#+END_SRC + +* Usage + +M-x spacemacs/sr-speedbar-show-or-hide diff --git a/layers/+tools/sr-speedbar/packages.el b/layers/+tools/sr-speedbar/packages.el new file mode 100644 index 000000000000..45a6620ce04f --- /dev/null +++ b/layers/+tools/sr-speedbar/packages.el @@ -0,0 +1,29 @@ +;;; packages.el --- sr-speedbar Layer packages File for Spacemacs +;; +;; Copyright (c) 2012-2014 Sylvain Benner +;; Copyright (c) 2014-2015 Sylvain Benner & Contributors +;; +;; Author: wsk +;; URL: https://github.com/syl20bnr/spacemacs +;; +;; This file is not part of GNU Emacs. +;; +;;; License: GPLv3 + +(setq sr-speedbar-packages + '(sr-speedbar)) + +(defun sr-speedbar/post-init-sr-speedbar () + (defun spacemacs/sr-speedbar-show-or-hide () + (interactive) + (cond ((sr-speedbar-exist-p) (kill-buffer speedbar-buffer)) + (t (sr-speedbar-open) (linum-mode -1) (speedbar-refresh))))) + +(defun sr-speedbar/init-sr-speedbar () + (use-package sr-speedbar + :init + (setq sr-speedbar-width 30) + (setq sr-speedbar-right-side nil) + :config + (spacemacs|evilify-map speedbar-mode-map))) + From 3eb60031a5a65e84b5b97e65e8b669351aad9b41 Mon Sep 17 00:00:00 2001 From: Eric Drechsel Date: Tue, 20 Oct 2015 12:33:42 -0700 Subject: [PATCH 2/2] Add SPC f t keybinding. --- layers/+tools/sr-speedbar/README.org | 10 +++++----- layers/+tools/sr-speedbar/packages.el | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/layers/+tools/sr-speedbar/README.org b/layers/+tools/sr-speedbar/README.org index 2449360f0c8c..3ed15754f75d 100644 --- a/layers/+tools/sr-speedbar/README.org +++ b/layers/+tools/sr-speedbar/README.org @@ -3,8 +3,8 @@ * Table of Contents :TOC@4: - [[#description][Description]] - [[#install][Install]] - - [[#layer][Layer]] - [[#usage][Usage]] + - [[#key-bindings][Key Bindings]] * Description @@ -12,8 +12,6 @@ sr-speedbar is mode make SpeedBar show in Current Frame. * Install -** Layer - To use this contribution add it to your =~/.spacemacs= #+BEGIN_SRC emacs-lisp @@ -21,5 +19,7 @@ To use this contribution add it to your =~/.spacemacs= #+END_SRC * Usage - -M-x spacemacs/sr-speedbar-show-or-hide +* Key Bindings +| Key Binding | Description | +|-------------+------------------------------| +| ~SPC f t~ | Toggle sr-speedbar | diff --git a/layers/+tools/sr-speedbar/packages.el b/layers/+tools/sr-speedbar/packages.el index 45a6620ce04f..f9cddc85694b 100644 --- a/layers/+tools/sr-speedbar/packages.el +++ b/layers/+tools/sr-speedbar/packages.el @@ -25,5 +25,7 @@ (setq sr-speedbar-width 30) (setq sr-speedbar-right-side nil) :config + (evil-leader/set-key + "ft" 'spacemacs/sr-speedbar-show-or-hide) (spacemacs|evilify-map speedbar-mode-map)))