I looked at Fira Code and I wanted to try it out with one of the listed supported editors. So I launched RStudio (Version 0.99.491 on a Win box) and set the font to Fira Code but ... nothing. So how to enable font ligatures in RStudio?
EDIT: The trick in the accepted answer below still works for RStudio Version 1.0.44. I still wish there's a simple button to enable it.
I still wish there's a simple button to enable it.
Wish granted! We've just added this to RStudio 1.1.
You can try the preview release here:
https://www.rstudio.com/products/rstudio/download/preview/
RStudio now have a build in option for ligatures, you do not need these dirty hack any more, cheers!
[OLD CONTENTS]
Close RStudio
Open [RStudio dir]/www/index.htm (If you are using a Linux distribution, the dir may be /usr/lib/rstudio, thanks for the comment of #CosminSaveanu)
Add following code between <head> and </head>:
<style>*{text-rendering: optimizeLegibility;}</style>
Restart your RStudio.
dirty but works.
If you are using Linux then type in your Terminal,
sudo apt install fonts-firacode
Restart Rstudio then in Tools / Appearance / Editor Font: choose Fira Code and Apply.
Related
I'm trying to integrate zsh on my VSC setup but apparently arrows are not recognized by it.
My zsh theme is agnoster and I've already tried adding "terminal.integrated.fontFamily": "Meslo LG M DZ for Powerline" with no success. Anyone experienced something like this and can give me a hand? Thanks.
Following this little guide solved the issue making-powerline-work-in-visual-studio-code-terminal.
IMPORTANT: if you already have a powerline font installed (e.g. it looks fine inside your system terminal), skip step 1.
Install a patched version of your desired font directly from https://github.com/powerline/fonts. Apparently doing the "quick installation" (e.g. sudo apt-get install fonts-powerline) does not work in this case. So you can install manually downloading the .ttf file directly or running the install script ./install.sh provided. For instance you can do the following:
Clone the repository:
git clone https://github.com/powerline/fonts && cd fonts
Run ./install.sh to install them all or install one specific font by going inside its directory and opening the .ttf file. For instance, manually installing DejaVu Sans Mono for Powerline:
cd DejaVuSansMono
Open DejaVu Sans Mono for Powerline.ttf
Install the font
Add the terminal.integrated.fontFamily to your User Settings settings.json in VSCode specifying the powerline font to use. For instance, if I want to use DejaVu Sans Mono for Powerline:
{
[...]
"terminal.integrated.fontFamily": "DejaVu Sans Mono for Powerline",
[...]
}
Restart Visual Studio Code
For me it worked for linux and as well as manjaro (i don't know why others solution weren't working for me).
Download this font download font from here , Then create a folder named "Meslo" and extract all the fonts inside it.
Move this folder to /usr/share/fonts/truetype/
Run this command:
sudo fc-cache -vf /usr/share/fonts/
In settings.json of vscode add this line:
"terminal.integrated.fontFamily": "MesloLGM Nerd Font"
Save and Restart if necessary, it should work. Done.
Finally made it work after going through many blogs and GitHub comments. The below steps works for macOS.
Clone the Menlo for powerline font
git clone https://github.com/abertsch/Menlo-for-Powerline.git
Open this folder in finder. Double click on Menlo for Powerline.ttf file.
Click on Install Font
Open the settings.json file in VSCode and add the below line.
"terminal.integrated.fontFamily": "Menlo for Powerline"
If you still can't see the fonts in the terminal try restarting VSCode.
You can use the above steps to use any font you want.
I had the same exact issue on my Macbook. The problem was that the font I was using in Iterm was not added in the Terminal of VSCode.
Fix
fix was simple, you have to go to open Iterm -> Preferences -> Profiles -> Text and copy the Font Name
now head over to VS Code:
Open settings
In the search bar, type Terminal Font
Paste the font name in Terminal > Integrated: Font Family
and that will fix the issue for you!
If you already have a font installed which is looking fine in your terminal app (for example in iTerm2) and the font is just messed up inside VSCode, you don't have to install any additional fonts. Just add:
{
...,
"terminal.integrated.fontFamily": "YourFontName"
}
to your settings.json
where YourFontName is the name of the font you would like to use. On macOS you can see what fonts you have installed in your font book (search for font book in the spotlight Command + Space) which looks like this:
In my case my settings.json has the following entry:
{
...,
"terminal.integrated.fontFamily": "MesloLGS NF"
}
Yey! This works for me... Ubuntu 20.04
Key: Shared fonts think.
https://cloverinks.medium.com/oh-my-zsh-agnoster-theme-not-showing-correct-font-on-vscode-ubuntu-47b5e8dcbada
Most of the other answers didn't solve the issue for me in Manjaro Linux (KDE).
I eventually found a solution that made the Powerline glyphs visible in my VS Code zsh terminal:
https://forum.manjaro.org/t/kde-powerline-glyphs-missing-in-vscode-integrated-terminal-only/63742/3
Just set the font to NotoSansMono Nerd Font. This font was already installed on my system. I did not need to download any additional fonts.
There are two ways to change the font in VS Code:
Change the following line in settings.json:
"terminal.integrated.fontFamily": "NotoSansMono Nerd Font"
Alternatively, go to Settings -> Features -> Terminal and set Terminal > Integrated: Font Family to:
NotoSansMono Nerd Font
You may need to restart VS Code.
I had the same problem with my VS Code, WSL terminal (PowerLevel10K) on Windows 10. It looked exactly like yours. I found that my Terminal>Integrated:Font Family was named incorrectly. I use "DroidSansMono Nerd Font". I had entered it as "Droid Sans Mono Nerd Font".
That is not the way the font name shows up in programs like Word, Notepad or Photoshop. When I entered as it was shown in notepad,
I closed and reopened my VS Code terminal and everything rendered as expected.
So check your installed font name in your operating system's word processing software and see how it is listed. Enter it likewise into Terminal>Integrated:Font Family and your VS Code terminal should render correctly also.
In manjaro, install MesloLGS fonts and change the setting to"terminal.integrated.fontFamily": "MesloLGS NF"
in settings.json
while the font path is ~/.fonts
This is not a big problem but it's bothering me. I've installed it in Program Files (x86), already found many old solutions which didn't work for me. I can't install it in another location. I've tried to change the ico to a different one located in a path without spaces, but it didn't work.
Git CMD icon works fine (but I don't like this terminal), the problem persists only with GitBash icon
Can someone help?
Sometimes it could be purely because of the shortcut referring to a previous installation which no longer exists. Check properties by right-clicking on git bash terminal's taskbar icon.
If that's the case
Delete the shortcut or
Replace the path with the current installation directory.
The icon was missing in older versions (2.10: see issue 870)
In your case, make sure to install the latest 64-bits version (in Program Files, not Program Files (x86))
That would be: Git-2.15.0-64-bit.exe.
Update Oct. 2022: this is still working correctly.
I used to Atom editor for coding Golang, PHP,...
When I am coding, sometimes it is automatic close. I install it on Window 10.
Maybe when I switch tab or move mouse but I don't know why so.
UPDATE:
Version: 1.18.0 (before, it is older version but It also so)
Atom : 1.18.0
Electron: 1.3.15
Chrome : 52.0.2743.82
Node : 6.5.0
Do you have any more information? Anything special you did when installing? Have you followed the suggestions in the Debugging document? Also, could you give the following information?
Which version of Atom are you using?
Can you reproduce the issue after completely exiting Atom and restarting using atom --safe?
When I start RStudio, none of the windows inside the main frame come up, and none of the menu options display menu options when clicked. It's just an blank page.
It feels like some kind of graphics rendering or window management problem.
I'm running Windows 7. I have the latest version of R, which is 3.1.1. I have the latest RStudio, which is 98.1062.
How to fix it?
Reset the RStudio state. Do this:
Close RStudio if open.
Go to this directory: %localappdata%\RStudio-Desktop
Rename that directory as a type of backup.
Start RStudio.
RStudio will see the configuration directory is missing and regenerate it with correct values.
Everything should work after that.
Other threads I found helpful here are:
https://support.rstudio.com/hc/en-us/articles/200534577-Resetting-RStudio-s-State
https://support.rstudio.com/hc/communities/public/questions/200666647-RStudio-096-16-Windows-7-gives-empty-screen?locale=en-us
Thanks!
Renaming the RStudio state by renaming %localappdata%\RStudio-Desktop did not work for me. However i made it work by renaming another config folder in %appdata% instead.
Close RStudio
Go to this directory: %appdata%\RStudio
Rename the folder
Restart RStudio
I faced the same issue when I downgraded my version of R.
I did try the above solutions. However, it didn't work for me.
After some googling, I found out that the issue was because now I had a different version of R installed. Here's how you can choose the version of R and rectify the issue.
Navigate to the RStudio installation folder. (C:\Program Files\RStudio\bin)
Press and hold Control Key
Double click on rstudio.exe
Choose a specific version of R (whichever you want to work with)
Click OK and RStudio should open without any issues.
NB: I use 64bit Windows 8.1.
I had the same issue and I almost gave up about solving it but then I found a suggestion that GitHub might be the problem. I am not sure how that is happening but the minute I uninstalled GitHub and re-launched Rstudio, it worked perfectly as nothing happened!? Here is the link for where I found the suggestion on Rstudio community page: (https://support.rstudio.com/hc/communities/public/questions/200983187-R-studio-0-98-797-for-mac-opens-as-blank-white-page)
I had the same problem and figured out that for some reason R was blocked on the step of loading my library from a website (I added it to Rprofile for auto-load). You can test the following:
1) Try to run just R console, not RStudio, and then click on blank space - normally some information should appear
2) Try to launch without network connection
On a Mac (Running Yosemite 10.10.3) this is what worked for me:
Move/Rename ~/.rstudio-desktop
(Many responses have mentioned this, but this by itself didn't help.)
Then I shutdown my Mac and restarted it. RStudio worked when I logged back in.
Before that, I tried every one of the steps mentioned here and in many other links, including re-downloading R and RStudio, but unfortunately none of those steps helped in my case.
Search this documentation for 'Blank GUI'.
This is what I found which worked for me:
In Windows Explorer, go to C:\Users\currentUser\AppData\Roaming\RStudio.
Delete the Desktop.ini file
This technique forces RStudio to refresh and default to open-source R as the engine
Same issue I faced so I unistalled the windows installer and downloaded zip version from this link https://www.rstudio.com/products/rstudio/download/
Unziped It and pasted it into c drive and created shortcut from Rstudio/bin/rstudio.exe file.
Working properly after that no issue. In windows installer checked that r session is not working due to an missing dll.
So try to install from ZIP
I had the same problem like Thomas
When I start RStudio, none on the windows inside the main frame come up, and none of the menu options display menu options when clicked. It's just an blank page.
My problem was, that i uninstalled R because is thought RStudio will work on its own.
So i uninstalled RStudio and deleting every existing file which was created by R or RStudio.
In the next step i installed RStudio again.
It was asking for a Version of R (which i dont had in this state). So i installed R again and everything is working fine now. I hope this helps
I had a slight variation of the problem that might be of interest. I had set up an aliases.cmd to run my cygwin bash shell automatically upon launch of a cmd terminal as per:
https://superuser.com/questions/302194/automatically-executing-commands-when-a-command-prompt-is-opened
What RStudio was doing was launching a few cmd windows in the background to (I assume) populate each pane and the console.
This was triggering a bash shell which wasn't returning and was hanging RStudio.
If you have this issue you can just manually kill the sub bash terminals spawned by cmd via ProcessExplorer/TaskManager and RStudio will continue to launch normally.
If anyone else has set anything to launch automatically on init of a cmd terminal then this could interfere in the same way with RStudio.
The RStudio devs could probably fix this behind the scenes by changing the way they spawn cmd terminals in the gui.
I had a similar problem. After trying the options above with no luck, I uninstalled Rx64 3.5.0 and installed an older version, R x64 3.2.2.
Rstudio then worked perfect.
I have just installed the latest versions of R (3.1.0) and Rstudio (v0.98.507) on a Windows 7 machine, 64 bit.
The R GUI works OK, but when I open the RStudio.exe only a blank window opens. I've tried re-installing R and RStudio.
Any suggestions?
By choosing the R version I wanted to use I was able to use Rstudio again.
To choose the R version you want to use with Rstudio do the following;
Click the CTRL key (don't let go)
Click on the Rstudio icon
Choose the version you want in the pop-up window.
For Ubuntu users where #neal's solution doesn't work.
$ rstudio --no-sandbox
related to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1944468
Download the 64bit version and reinstall it.
The same for Linux
FOR LINUX: this happens to me on cloud instances. A solution is forcing software rendering of RStudio. You need to start RStudio, get to the black screen, close Rstudio black screen, do my solution below in the terminal with Rstudio closed, then start Rstudio again.
In terminal:
sudo nano ~/.config/RStudio/desktop.ini
APPEND THE FOLLWING TO [General] section (leave whatever is there and add the line below):
[General]
desktop.renderingEngine=software
Again this is for Linux, but there may be a similar issue in Windows and you may be able to force software rendering.
Press down Ctrl key and then click on RStudio icon to launch. A dialog box asks you about the R version. Choose the one that actually exists (you might see an R version which does not exist; confusing RStudio)
For Windows10 64bit.
After following the hold Ctrl and clicking RStudio icon.
Change the Rendering Engine: to Software.
This fixed the problem on my machine.