spacemacs下的shell,使用vi后,如何退出?

RT,SPC '之后,可以打开终端,还是挺方便的.问题是用vi打开文件后,怎么退出呢?一般退出命令都是针对spacemacs主界面的.

再按一次 SPC ' 就可以退出了。

嗯,再按一次是退出shell.

我的意思是:我在shell中用vi打开文件了,比如我修改了某文件.这个时候,我想保存退出vi,回到shell界面.请问该怎么操作呢?

我知道在 shell 里面是直接 c-z, 但是在 Emacs 的 shell 里面不太清楚,我也少在 Emacs 里面开 vim…

我现在几乎已经抛弃 Emacs 里面的 shell 了,因为速度的原因,我还是喜欢用原生的 shell

进入 eshell之后,解绑 : 按键?

(add-hook 'eshell-mode-hook
          (lambda ()
            (define-key eshell-mode-map (kbd ":") nil)))

忽然想到,在 eshell 里运行 emacs 会怎样?结果

~$ emacs
emacs: Terminal type "dumb" is not powerful enough to run Emacs.
It lacks the ability to position the cursor.
If that is not the actual type of terminal you have,
use the Bourne shell command 'TERM=...; export TERM' (C-shell:
'setenv TERM ...') to specify the correct type.  It may be necessary
to do 'unset TERMINFO' (C-shell: 'unsetenv TERMINFO') as well.
1 个赞

在emacs下面开shell基本感觉上只能打打酱油,还是原生的比较好用.不知道是不是我姿势不对…