emacs - 如何在当前目录中打开终端?

标签 emacs

当我使用 M-x shell 打开一个新终端时,它有时会将当前目录设置为文件所在的目录。但有时不会。那么是否有一个功能可以在当前目录中始终打开一个新终端?

最佳答案

有包裹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也可以轻松弹出并弹出一个shell缓冲区窗口。 ELPA 中可能还有更多!

关于emacs - 如何在当前目录中打开终端?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20673836/

相关文章:

emacs - 使用语法表在 emacs 模式下的单行和多行注释

Mac OS Lion 终端中的 Emacs - 将右命令键映射到 meta

c - 如何在源代码中正确定位不平衡的括号?

Emacs 25 从带有键盘的 x windows PRIMARY 剪贴板缓冲区中拉出

function - 有没有办法获取当前函数的函数名?

emacs - 如何在 Emacs 中添加/删除标记区域周围的括号?

python - 如何在 emacs 中使用 elpy 正确设置 Jedi?

linux - Kieran Healy 在 Linux (fedora19) 中的 emacs 入门工具包 : "/bin/bash: osascript: command not found" message

python - Emacs 中的单元模式

Emacs:Bernt Hansen 的明文生活 - 示例 git repo?