Emacs ESS模式TAB停止缩进 [英] Emacs ESS Mode TAB stops indenting

查看:118
本文介绍了Emacs ESS模式TAB停止缩进的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上使用Emacs 24来编写一些R代码。直到大约30分钟前,每当我写一个新功能时,ESS会自动缩进功能声明之后的行,并按下新的空白行上的标签键将跳转到声明内的适当缩进的起始位置。



EG:

  foo<  -  function() b $ b第一行从这里开始
第二行在这里。 .etc
}

现在,很难将所有内容都包装在左边,没有回复通过自动缩进功能声明后或当我按Tab键。

  foo<  -  function(){
第一行
第二行
}

我已经google了,但是我的google-fu在这个失败了。任何人都知道如何在Emacs中恢复ESS的默认标签行为?

解决方案

尝试在#之后添加一个空格。
我不认为ESS模式处理#作为注释,除非你有空格。


I'm using Emacs 24 on Windows to write some R code. Up until about 30 minutes ago, whenever I would write a new function, ESS would automatically indent the lines following the function declaration and pressing the tab key on a new blank line would jump me to the appropriately indented starting position inside the declaration.

EG:

foo <- function() {
    first line started here
    second line here.  .etc
}

Now, it is hard wrapping everything to the left, and not responding by automatically indenting after the function declaration or when I hit the tab key.

foo <- function() {
first line
second line
}

I've googled, but my google-fu is failing me on this. Anyone know how to restore default tab behavior to ESS in Emacs?

解决方案

Try to add a space after "#". I don't think ESS-mode handles # as a comment unless you have space after it.

这篇关于Emacs ESS模式TAB停止缩进的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆