R-Box icon indicating copy to clipboard operation
R-Box copied to clipboard

Reindent patches

Open imanuelcostigan opened this issue 11 years ago • 4 comments

When I re-indent a function like:

function_example <- function (a) 
  a + 1

I get

function_example <- function (a) 
a + 1

It should not do this.

imanuelcostigan avatar May 24 '14 23:05 imanuelcostigan

This is hard to fix. The best solution is to add { and }.

randy3k avatar May 24 '14 23:05 randy3k

Additionally, the following should not be changed following a re-indent:

variable <- a + a_very_long_function_name() + 
   another_very_long_function_name()

imanuelcostigan avatar May 24 '14 23:05 imanuelcostigan

I will keep them in mind, but fixing them is not easy because of the way the syntax highlight works.

randy3k avatar May 24 '14 23:05 randy3k

If you are interested, you can have a look of this file. This is the file which manages the indentation.

randy3k avatar May 25 '14 03:05 randy3k