Emacs ESS模式 - 评论区域的标签 [英] Emacs ESS Mode - Tabbing for Comment Region
问题描述
例如,我有:
#评论
现在,把光标放在该行并按Enter键,我得到:
#评论
感谢任何提示。
使用'###'如果你不想让评论缩进。根据手册,
默认情况下,以
'###开头的注释与
的开头对齐。以'##'
开始的注释与
的当前级别的
缩进相同,该块包含
的注释。最后,以'#'开头的
的注释与右侧的
列对齐(默认为第40列
,但该值为
,由变量$ b $控制b comment-column,)或刚刚在包含
注释的
表达式之后,如果它超出
缩进列。
I am using the Emacs-Speaks-Statistics (ESS) mode for Emacs. When editing R code, any comment lines (those starting with #) automatically get tabbed to the far right when I create a new line above it. How should I change my .emacs.el file to fix this?
For example, I have:
# Comment
Now, after putting my cursor at the beginning of the line and pressing Enter, I get:
# Comment
Thanks for any hints.
Use '###' if you don't want the comments indented. According to the manual,
By default, comments beginning with ‘###’ are aligned to the beginning of the line. Comments beginning with ‘##’ are aligned to the current level of indentation for the block containing the comment. Finally, comments beginning with ‘#’ are aligned to a column on the right (the 40th column by default, but this value is controlled by the variable comment-column,) or just after the expression on the line containing the comment if it extends beyond the indentation column.
这篇关于Emacs ESS模式 - 评论区域的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!