Emacs 中的 Python 缩进

标签 python emacs indentation

谷歌搜索这个问题很无聊 - 如何在 emacs 中为 python 设置缩进偏移? 尝试了很多变体,但没有任何帮助。 http://jomp.ru/@s.png - python模式?

最佳答案

在你的 .emacs 中输入:

(setq python-indent 12)

其中 12 是您想要的缩进数。

顺便说一句:您还可以使用精美的“自定义 Emacs”菜单 - 这是“编程”->“语言”->“Python”下的第一个选项。

关于Emacs 中的 Python 缩进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9981773/

相关文章:

python - 在循环中创建实例变量返回 None 对象

python - 选择名称遵循 pandas 中给定模式的 DataFrame 列

emacs - 在 GNU Emacs 中执行 LISP 程序

python - 用 Python 编写的 HTML 缩进器

python - Python 中的截断与下限划分

python - Pandas 数据框

emacs - 我怎么能在输入内容时使用像 isearch-forward 这样的查询替换

vim - 艰难地学习 Emacs/Slime(来自 Vim 10 年)

Java DocumentBuilder - XML 文件中的错误缩进

php - 你如何缩进你的HTML?