Emacs ESS Mode - Tabbing for Comment Region

前端 未结 4 1216
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-08 00:00

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

4条回答
  •  天涯浪人
    2020-12-08 00:43

    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.

提交回复
热议问题