Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我最近宣布 emacs 破产,并在重建我的配置时从旧的切换python-mode.el到内置的python.el.
python-mode.el
python.el
我缺少的一件事是在点击时自动缩进到正确级别的旧行为RET。有没有办法重新启用它?
RET
由于electric-indent-mode. 由于 Emacs 24.4 的功能冻结已经有一段时间了,应该不会留下重大的破坏性错误,因此您已经可以进行切换了。
electric-indent-mode
尝试这个:
(add-hook 'python-mode-hook 'my-python-hook) (defun my-python-hook () (define-key python-mode-map (kbd "RET") 'newline-and-indent))