[R-SIG-Mac] Pasting Code in Editor has Wrong Colors
Brandon Hurr
brandon.hurr at gmail.com
Mon Mar 7 17:28:56 CET 2016
Simon,
A follow up. On my system, "paste as plain text" does not fix the
color or font size issue when pasting. Below is my system information.
> devtools::session_info()
Session info ----------------------------------------------------------------------------------------------
setting value
version R version 3.2.3 (2015-12-10)
system x86_64, darwin13.4.0
ui AQUA
language (EN)
collate en_US.UTF-8
tz America/Los_Angeles
date 2016-03-07
Packages --------------------------------------------------------------------------------------------------
package * version date source
devtools 1.10.0.9000 2016-02-26 Github (hadley/devtools at b6a23be)
digest 0.6.9 2016-01-08 CRAN (R 3.2.3)
memoise 1.0.0 2016-01-29 CRAN (R 3.2.3)
withr 1.0.1 2016-02-04 CRAN (R 3.2.3)
Brandons-iMac:~ brandonhurr$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.3
BuildVersion: 15D21
Thanks,
Brandon
On Sun, Mar 6, 2016 at 9:01 PM, Brandon Hurr <brandon.hurr at gmail.com> wrote:
> 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
>> >
>>
>
More information about the R-SIG-Mac
mailing list