Closed ksmithbaylor closed 6 years ago
Hey there @ksmithbaylor.
Thanks for this! Is there any reason you prefer cat('\f')
to ctrl + L
? I'm thinking it might be more convenient to not pollute the code that is being sent? But then again, I don't usually use this type of workflow so, I'm happy to hear opinions.
If we go-ahead with his future, I would also like to include this for some of the other applications (I can do that myself, unless you want to take a crack at it).
I made this PR while in a class using R, which I haven't used since. With that in mind, I'm going to go ahead and close this, as it's unlikely that I'll have time or motivation to come back and add support for other applications (which is definitely the right way to go).
When running and iterating on large chunks of code, I find it nice to clear the console each time before it runs so the code I previously ran isn't distracting. In RStudio, this can be done with
ctrl+L
, or the commandcat("\f")
. This new option prepends that command to any code that is sent to RStudio, so that the console is cleared each time.It should also be possible to make this more generic so the consoles can be cleared on other targets as well, instead of just RStudio.