Skip to content

Instantly share code, notes, and snippets.

@ateucher
Last active May 11, 2017 21:38
Show Gist options
  • Save ateucher/c6fe5da036b7d2b766b562c2310f8a92 to your computer and use it in GitHub Desktop.
Save ateucher/c6fe5da036b7d2b766b562c2310f8a92 to your computer and use it in GitHub Desktop.
Enable ligatures in RStudio
#!/bin/sh
## Enables ligatures in RStudio. This is for Windows. You will need to open this in a shell with admin priveleges (with sed available).
## On other OSes you will need to change the path to 'www/index.htm' and possibly run with sudo.
## source: https://github.com/tonsky/FiraCode/wiki/RStudio-instructions
sed -e "s/<body>/<body><style>*{text-rendering: optimizeLegibility;}<\/style>/" "c:\Program Files\Rstudio\www\index.htm" > \
"c:\Program Files\Rstudio\www\index.htm.tmp" && \
mv "c:\Program Files\Rstudio\www\index.htm.tmp" "c:\Program Files\Rstudio\www\index.htm"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment