Created
March 4, 2013 06:48
-
-
Save hage/5080476 to your computer and use it in GitHub Desktop.
Eshellをpopwinで ref: http://qiita.com/items/0939787fcd8fb9efbba1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(when (featurep 'popwin) | |
(push '("*eshell*" :height 0.5) popwin:special-display-config) | |
(defun eshell-pop (universal-argument) | |
"open eshell window using popwin-elf" | |
(interactive "P") | |
(let* ((eshell-buffer-name "*eshell*") | |
(eshell-buffer (get-buffer eshell-buffer-name)) | |
(file-name (buffer-file-name (current-buffer))) | |
(current-directory (with-current-buffer (current-buffer) default-directory))) | |
(if eshell-buffer | |
(popwin:display-buffer eshell-buffer) | |
(eshell)) | |
(when (and universal-argument file-name) | |
(eshell-kill-input) | |
(insert (concat "cd " current-directory)) | |
(eshell-send-input) | |
(end-of-buffer)))) | |
(global-set-key "¥C-w¥C-w" 'eshell-pop)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment