2013-12-19 4 views

ответ

2

Там в пакете shell-here доступен в ELPA: M-x list-packages, искать shell-here, отметка для установки (i) и выполнить (x).

Отрывок из ридми:

Open a shell buffer in (or relative to) default-directory, 
e.g. whatever directory the current buffer is in. If you have 
find-file-in-project installed, you can also move around relative 
to the root of the current project. 

I use Emacs shell buffers for everything, and shell-here is great 
for getting where you need to quickly. The =find-file-in-project= 
integration makes it very easy to manage multiple shells and 
maintain your path/history/scrollback when switching between 
projects. 

GitHub дома: https://github.com/ieure/shell-here

И я тоже люблю shell-pop, всплывал и выскочить окно буфера оболочки с одним легко. И в ELPA может быть больше!

0

M-x shell переключится на существующую оболочку, если есть уже один запуск, что может быть вашей проблемой. Если вы не против создания большого количества буферов оболочки, ниже команда будет создавать новые буфера каждый раз, когда он не может найти один посещение данного каталога:

(require 'cl-lib) 

(defun shell-at-dir (dir) 
    "Open a shell at DIR. 
If a shell buffer visiting DIR already exists, show that one." 
    (interactive (list default-directory)) 
    (let ((buf (car (cl-remove-if-not 
        (lambda (it) 
        (with-current-buffer it 
         (and (derived-mode-p 'shell-mode) 
          (equal default-directory dir)))) 
        (buffer-list))))) 
    (if buf 
     (switch-to-buffer buf) 
     (shell (generate-new-buffer-name "*shell*"))))) 
Смежные вопросы