Asm 模式下的 Emacs 缩进

标签 emacs indentation

我正在寻找 c-indent-levelruby-indent-level 的等效项,用于 asm-mode。也就是说,我想强制缩进到 4 个空格,并且我希望将它们替换为空格。

我所看到的告诉我它不存在于 asm 模式。谁能告诉我这是错的吗?

我也试过这个:Set 4 Space Indent in Emacs in Text Mode , 没有 av.

我试过:

(setq tab-width 4)
(setq indent-line-function 'insert-tab)
(setq asm-indent-level 4)

但这有效:

(custom-set-variables
 '(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))))

但我想知道是否有一种方法可以只为 asm-mode 定义它。如果我想保留其他模式的默认选项卡行为怎么办?

最佳答案

asm-mode 为 indentation 使用函数制表符到制表符停止,这就是 tab-stop-list 起作用的原因。据我所知,您无能为力。您可能会考虑使用一些“更高级”的 asm 模式,例如 - gas-modeasm86-mode .

关于Asm 模式下的 Emacs 缩进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2668563/

相关文章:

emacs - Emacs 中的长线模式

emacs - ESS和EC2错误“R进程已终止”

linux - 如何使用来自外部服务器 linux 的数据启动本地程序

java - 有没有办法在 Eclipse 中创建一个快捷方式,将光标跳转到当前行的第 n 列?

c++ - 我可以避免超过 3 个级别的缩进吗?

python - python中简单while循环的问题(缩进)

emacs - 如何防止 emacs 打开新窗口进行编译输出?

emacs - 如何让 Cocoa Emacs 从外部应用程序跳转到行号?

c++ - 如何使用 clang 格式自动缩进具有 4 个空格的 C++ 类?

javascript - 逐行缩进Javascript文件?