c++ - Emacs C++ 模式缩进

标签 c++ emacs indentation

Possible Duplicate:
Make Emacs less aggressive about indentation

每当我在 Emacs 的 C++ 模式中键入左括号或右括号时,它都会缩进整个表达式。我不希望这种情况发生。我怎样才能关闭这个功能?我可以关闭所有自动缩进功能吗?

最佳答案

尝试:(c-toggle-electric-state -1)

来自文档:

c-toggle-electric-state is an interactive compiled Lisp function in `cc-cmds.el'.

(c-toggle-electric-state &optional ARG)

Toggle the electric indentation feature. Optional numeric ARG, if supplied, turns on electric indentation when positive, turns it off when negative, and just toggles it when zero or left out.

关于c++ - Emacs C++ 模式缩进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11566600/

相关文章:

c++ - 在 Windows 上为 glut 3.7 构建静态库

c++ - 如何在不同的功能中使用队列?

php - 使用 Jquery/javascript 添加大量 HTML

Python:使用 4 个空格进行缩进。为什么?

c++ - 将返回表达式隐式转换为 bool

c++ - 如何在 C++ 中约束可调用对象的签名?

function - 在 dolist 中扩展宏

emacs - 组织模式忽略 HTML 导出中的分页 latex 命令

emacs - 如何控制 Emacs 中的新内容使用哪个窗口?

indentation - sublime text 2 中的可见制表符宽度