Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indenting consistent with Rstudio #53

Open
dlebauer opened this issue May 24, 2016 · 1 comment
Open

Indenting consistent with Rstudio #53

dlebauer opened this issue May 24, 2016 · 1 comment

Comments

@dlebauer
Copy link

This looks very helpful it does not indent the lines that it does in the same way that Rstudio or emacs ESS does by default.

For example, this line:

old.priors <- db.query(paste("select prior_id from pfts_priors where pft_id =", parent.pft.id, ";"), con = con)

is converted to tidy_source() as

old.priors <- db.query(paste("select prior_id from pfts_priors where pft_id =", 
    parent.pft.id, ";"), con = con)

while Rstudio converts it to

  old.priors <- db.query(paste("select prior_id from pfts_priors where pft_id =", 
                               parent.pft.id, ";"), con = con)

the Rstudio way makes it easier to see that the arguments on line 2 are arguments to the paste functions.

Is there a way around this? I've reviewed many isues in this repository and suspect that the answer is 'no' but couldn't find a reference to this in particular.

@yihui
Copy link
Owner

yihui commented May 26, 2016

You are (unfortunately) correct -- the answer is no. All tidy_source() magic comes from deparse(). Since deparse() cannot do this, neither can tidy_source().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants