Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
I had thought most folks likely knew this already, but if you are user of RStudio dailies (this may apply to regular RStudio, but I only use the dailies) and are missing ligatures in the editor (for some s), the “fix” is pretty simple (some misguided folks think ligatures are daft).
RStudio, like VS Code and many other editors/apps, is just a special purpose web browser. That means ligatures are controlled via CSS. RStudio also supports themes. There are many built-in themes. I use this third-party one. We can use these themes to sneak in some CSS that gives you granular control over ligatures.
The CSS class we need to target is .ace_scroller
. That’s the contents of the editor pane, console, and any other monospaced “scrolled text” components. If you’re wondering, “Why …ace…?”_, that’s die to RStudio’s use of the Ace editor component. Say all the nice things you want to about the Monaco editor component used by VS Code (et al.), but the wizards at Posit wield Ace better than I’ve seen any other app dev team.
You can start here to learn about all the ways you can, and, may need to customize ligatures, but the following worked for [my new fav family(https://github.com/githubnext/monaspace):
.ace_scroller { -variant-ligatures: discretionary-ligatures; -feature-settings: "dlig" 1; }
There are many possible values for -variant-ligatures
, and you can fully customize the -feature-settings
to target only the ligatures you want (for example, the previous linked has eight stylistic sets).
FIN
If you were missing out before, hopefully this brings you back into the ligature fold.
The post Ligatures In RStudio Dailies appeared first on rud.is.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.