Debian 9 上的 Emacs 错误自动缩进
Emacs bad auto indent on Debian 9
我已经安装了新的 Debian 9 Stretch 和 Emacs GNU Emacs 24.5.1,当我尝试将 docker-compose.yml 从 github(原始模式)粘贴到带或不带扩展名(yml、conf 等...)的 emacs 文件没有自动缩进,这就是我所拥有的:
有我的.emacs
文件
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq c-basic-offset 4)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(tab-stop-list (quote (4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120))))
这是文件 https://raw.githubusercontent.com/plexinc/pms-docker/master/docker-compose-bridge.yml.template
的 link
正如德鲁在他的回答中所说:https://emacs.stackexchange.com/a/5941
Disable electric-indent-mode
:
(when (fboundp 'electric-indent-mode) (electric-indent-mode -1))
That
works with any Emacs version. This annoyance or shiny-new-feature,
depending on your point of view, was introduced as the default in
Emacs 24.4.
我已经安装了新的 Debian 9 Stretch 和 Emacs GNU Emacs 24.5.1,当我尝试将 docker-compose.yml 从 github(原始模式)粘贴到带或不带扩展名(yml、conf 等...)的 emacs 文件没有自动缩进,这就是我所拥有的:
有我的.emacs
文件
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq c-basic-offset 4)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(tab-stop-list (quote (4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120))))
这是文件 https://raw.githubusercontent.com/plexinc/pms-docker/master/docker-compose-bridge.yml.template
的 link正如德鲁在他的回答中所说:https://emacs.stackexchange.com/a/5941
Disable
electric-indent-mode
:
(when (fboundp 'electric-indent-mode) (electric-indent-mode -1))
That works with any Emacs version. This annoyance or shiny-new-feature, depending on your point of view, was introduced as the default in Emacs 24.4.