diff --git a/spacemacs/keybindings.el b/spacemacs/keybindings.el index c1092f057..5d5fe94c4 100644 --- a/spacemacs/keybindings.el +++ b/spacemacs/keybindings.el @@ -48,8 +48,8 @@ "ac" 'calc-dispatch "ad" 'dired "ap" 'proced - "ase" 'eshell - "asi" 'shell + "ase" 'shell-pop-eshell + "asi" 'shell-pop-shell "au" 'undo-tree-visualize) ;; buffers -------------------------------------------------------------------- (evil-leader/set-key diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 3d8b7db3b..b928b55a0 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -90,6 +90,7 @@ recentf rfringe shell + shell-pop smartparens smooth-scrolling subword @@ -2602,6 +2603,23 @@ It is a string holding: (add-hook 'eshell-mode-hook (lambda () (setq pcomplete-cycle-completions nil)))) +(defun spacemacs/init-shell-pop () + (use-package shell-pop + :defer t + :init + (defmacro make-shell-pop-command (type &optional shell) + (let* ((name (symbol-name type))) + `(defun ,(intern (concat "shell-pop-" name)) (index) + (interactive "P") + (require 'shell-pop) + (shell-pop--set-shell-type 'shell-pop-shell-type (backquote (,name + ,(concat "*" name "*") + (lambda nil (funcall ',type ,shell))))) + (shell-pop index)))) + (make-shell-pop-command eshell) + (make-shell-pop-command shell) + (make-shell-pop-command term shell-pop-term-shell))) + (defun spacemacs/init-smartparens () (use-package smartparens :defer t