[R-SIG-Mac] Pasting Code in Editor has Wrong Colors

Brandon Hurr brandon.hurr at gmail.com
Mon Mar 7 06:01:24 CET 2016


Simon,

Thanks for the shortcut keys. I'll definitely use them.

As for your question about where it's coming from, mostly Chrome via
ggplot2/manipulatr mailing lists, and stackoverflow. As you say it will
retain the fonts and sizes and everything. I had tried CMD + Shift + V as
it is in gmail and it didn't work.

Coming from a naive standpoint, I'm unsure why pasting as plain text isn't
the default here. Is it inherited from OSX, and you have no choice?

I've thought about it a few times and I can't imagine why having decorated
text is useful in R-GUI at all but particularly the editor window. It
overrides colors, fonts, font sizes, until you save and reopen. Then
everything is like if you had pasted as plain text.

Thanks,
Brandon




On Sun, Mar 6, 2016 at 09:46 Simon Urbanek <simon.urbanek at r-project.org>
wrote:

>
> On Mar 4, 2016, at 12:10 PM, Brandon Hurr <brandon.hurr at gmail.com> wrote:
>
> > As mentioned in the exchange with Frederico, I've been using Solarized
> Dark
> > colors for the console and editor to hopefully make long days of coding
> > easier on my eyes.
> >
> > The issue is when I paste code from a webpage or email it appears to
> revert
> > to the original colors interspersed with the new background color. See
> this
> > image for an example: http://i.imgur.com/4n32Hx9.png
> >
> > If I save the script and reload it, everything looks the way it should.
> > When the same code is pasted into R-GUI, everything is as it should be.
> >
>
> The paste option supports pasting attributes, so I wonder what is your
> source. If the source includes colors, the the source colors override your
> GUI setting - that is a standard Mac behavior (for better or worse). If you
> don't want that to happen, use "Paste as plain text" instead (<cmd><alt><V>)
>
> Cheers,
> Simon
>
>
>
> > Thanks,
> > Brandon
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-SIG-Mac mailing list
> > R-SIG-Mac at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >
>
>

	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list