assembly - emacs:如何关闭自动缩进?
问题描述
谁能告诉我如何关闭自动缩进emacs
?
我尝试的是推荐的-
(when (fboundp 'electric-indent-mode)
(electric-indent-mode -1))
在我的模式挂钩中不起作用。什么也不行是设置(electric-indent-mode 0)
。而且,我的方法也没有帮助切换电动缩进(setq electric-indent-inhibit t)
。
什么是正确的方法?
解决方案
对于nasm-mode
,我只需调用(electric-indent-local-mode -1)
我的模式挂钩,这应该足够了。
对于asm-mode
,它默认绑定RET到newline-and-indent
,因此您可以在模式挂钩中重新定义键(define-key asm-mode-map (kbd "RET") #'newline)
和禁用electric-indent-local-mode
。
推荐阅读
- ruby-on-rails - 如何使用 Devise 发出经过身份验证的 ajax 请求?
- c# - 用于 SharePointOnlineCredentials 的 WWF 自定义活动绑定
- java - 如何使用 Java 11 启动 JavaFX 应用程序?
- ios - 具有 2 个目的地的视图控制器
- python - 使用python在mongodb中上传本地json文件
- matlab - 来自分类和非分类变量的相关矩阵(Matlab)
- elasticsearch - localstack 能否支持 Elasticsearch 的 S3 快照存储库?
- java - Spring Boot - 部分更新最佳实践?
- python - How does tf.layers create variables?
- google-apps-script - 使用 Google Apps 脚本的 GMail 暂停