我几天前开始使用emacs,但是在使用emacs shell(M-x shell)的时候遇到了一个问题。当我执行'git commit'或者'git commit --amend'命令时,它会打开vim用于编辑并保存提交信息。虽然我可以接受这个操作,但我找不到一种方法来保存并退出vim,因为按下ESC键并不能触发vim的Normal模式,而ESC键是emacs的元键。我尝试将git编辑器更改为emacs,但也不起作用,似乎emacs shell无法运行emacs,并且它没有像我想象中那样打开一个新缓冲区。
有没有办法在emacs shell中使用git命令行(我不想使用像magit这样的git前端客户端)?
谢谢, Robin
emacs: Terminal type "dumb" is not powerful enough to run Emacs.
有没有办法在emacs shell中使用git命令行(我不想使用像magit这样的git前端客户端)?
谢谢, Robin
<C-o>
来退出插入模式,以便在单个命令中执行<C-o>:wq<CR>
或<C-o>:x<CR>
或<C-o>ZZ
。 - romainl