[ESS] indentation not working if parentheses are already closed

Jannis bt_jannis at yahoo.de
Tue Apr 16 17:02:57 CEST 2013


Hi Ista,


thanks for your reply!

On 16.04.2013 14:58, Ista Zahn wrote:

> pressing enter does start an indented line, but completing the
> function shows that the closing bracket is not indented, i.e.,
> pressing enter and inserting the closing brace results in:
>
> foo <- function() {
> }
>
>
> In the second case you insert the closing bracket and press enter,
> which gives you the same thing. If you start typing the body of the
> function and press tab it will indent correctly, i.e., if I type
> 'print("bar")<TAB> I end up with
>
> foo <- function() {
>    print("bar")}
>

You are right. When I press <TAB>, the indentation is correct. I was 
looking for a way to have the automatic indendation without pressing 
<TAB> right after pressing <RETURN> as it is the case when the 
prantheses are not yet closed. I.e. if i first type:

foo <- function() {<cursor>}

hiting return would yield:

foo <- function() {
      <cursor>}

instead of

foo <- function() {
<cursor>}

Any ideas?


Cheers
Jannis



More information about the ESS-help mailing list