Change vs code terminal font to non-monospace - terminal

Is it possible to change the vs code terminal font to a font that is non-monospace?
The font I am trying to use is Melso LG L Regular for Powerline .
When I try to change the terminal.integrated.fontFamily in the user settings I get this:
Is there any way around this?
Thanks in advance 😃

Use below settings. It worked for me in VScode terminal in ubuntu.
{
//"terminal.integrated.fontFamily": "'Ubuntu Mono derivative Powerline', 'fontawesome'",
"terminal.integrated.fontFamily": "'Meslo LG M DZ for Powerline', 'fontawesome'",
"terminal.integrated.fontSize": 16
}
Please also make sure that you have installed powerline and fontawesome icons packages properly otherwise it might not work.
Use any of the above settings but make sure that powerline variant is installed. Below is my terminals output from VSCode terminal.
My Vscode version:

The answer from WitVault did not solve the problem for me at first, but it was the foundation for my solution. Ubuntu 20.04 did not recognize Meslo LG M DZ .... I had a look at Ubuntus fonts app and there I saw, that the fonts name is MesloLGMDZ Nerd Font Mono. Thus having a look at your OS font application might help to find the correct name of the font.
With these setting (in settings.json) it works for me:
{
"terminal.integrated.fontFamily": "MesloLGLDZ Nerd Font Mono",
"terminal.integrated.fontSize": 14
}
To change setting.json press shift + ctrl + P and write Open Setting and press enter.

Related

How to remove rare whitespaces in the VS Code background [duplicate]

In the VS Code editor window, there are squares of another color that bother me when coding.
Has anyone had or has the same problem?
I started experiencing this issue in my MacBook Pro M1 after the June 2022 autoupdate.
Setting "disable-color-correct-rendering": false in ~/.vscode/argv.json worked for me.
I hope this is fixed in the next release. It seems to be an old issue based on what I found when searching for a solution.
If you are on a mac, see Different colored area on macOS - although there is a linux report there too. Same dark grey patches of color. There are a couple of suggested fixes mentioned.
The most reliable appears to be changing this setting:
"disable-hardware-acceleration": true
Open command palette and search for "Configure Runtime Arguments"
Set "disable-hardware-acceleration": true
Restart
from https://github.com/microsoft/vscode/issues/156405#issuecomment-1196503399
or starting vscode from a terminal with code --disable-gpu.
Also
What did work is removing "disable-color-correct-rendering": true from
~/.vscode/argv.json file and restarting vscode. Now the different
coloured patch on the side and bottom is gone.
Or
This happens to me with an intel mac as well. It was fixed by setting
"disable-hardware-acceleration": true in the .vscode/argv.json file.
More from the issue:
Had the same problem on my M1 macbook air, I had to open the argv.json
file (you can use Shift + CMD + P and type Configure Runtime Arguments
to open it) and set this line to false :
"disable-color-correct-rendering": false (it was on true, maybe by
default).
After that, just close your VS Code instance with CMD + Q and restart
it.
And here are download links (for macOS) for the previous vscode version v1.68 in case you want to rollback:
https://az764295.vo.msecnd.net/stable/4af164ea3a06f701fe3e89a2bcbb421d2026b68f//VSCode-darwin-universal.zip
https://az764295.vo.msecnd.net/stable/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/VSCode-darwin.zip
https://az764295.vo.msecnd.net/stable/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/VSCode-darwin-arm64.zip
Thanks for the information to those posting in the issue comments.
if you are facing this on mac you have to follow following steps
open terminal and type cd ~/.vscode
then open 'argv.json' file using vim argv.json
just uncomment the line // "disable-hardware-acceleration": true to "disable-hardware-acceleration": true
quit vim Esc then shift+: then wq then press enter, restart vs code your vs code will work normal again.

Visual Studio cannot enter "grater than" character

I have now problem at home, when I wish to enter "greater than (>)" by AltGr+. in last version of Visual Studio, it doesn't do anything. I don't know what is this for feature, but I'm not able to solve that problem. In OS out of VS it works normally - like here - >>>. Interesting is that "<" symbol (AltGr+,) works normally. Here (at home) I have fresh installation without any custom settings, in work, I have same installation but installed before some time, without any custom settings too, but in work it works normally.
Thank to Joachim Isaksson
1) Check where is shortcut used
2) Manually search for that command
3) Now its removable

IntelliJ 14 keyboard shortcuts are QWERTY though keyboard is DVORAK

I'm
running IntelliJ 14
using Mac OS X layout
running on OS X (Yosemite)
IntelliJ is using DVORAK in general but not for keyboard shortcuts.
keyboard shortcuts are in QWERTY. As if they were scancode based instead of the key value after mapping.
Ideas?
edit 1
#gabriel hard to tell but here are some examples...
note: m, a and 0-9 are same on DVORAK and QWERTY
cmd+/ 'comment line' flashes code menu and sometimes moves to a brace (/ == {)
cmd+b works, goes to definition (b == n)
cmd+opt+l 'reformat' flashes code menu (l == p)
It turns out this is a problem in Java that has existed for some years, and is still present in Java 9. See the bug report here: https://bugs.openjdk.java.net/browse/JDK-8022079
JetBrains has been aware of the problem for some years, but is waiting for Oracle to fix it. See these JetBrains bug reports: https://youtrack.jetbrains.com/issue/IDEABKL-6493 and https://youtrack.jetbrains.com/issue/IDEA-63779
In those reports you'll find a work-around using a free tool called Karabiner. I have just verified that it works for IntelliJ. It will probably also work for other Java-based tools.
For OSX earlier than Sierra The work-around is:
Download and install Karabiner from https://pqrs.org/osx/karabiner/
In the OSX System Preferences, set your keyboard to the default "U.S. International" PC. If you don't often type diacritics and other international characters, it's easier to just set the keyboard to "U.S" instead.
In the Karabiner settings, type "dvorak" in the search box, then scroll down to the section For U.S. Input Source and check Use Dvorak Keyboard Layout (QWERTY to Dvorak)
From macOS Sierra onwards, as reported by user MithrilTuxedo in the comments, the procedure is different. You have to use Karabiner Elements (the new Karabiner core) with a configuration file. I have outlined the procedure at https://cpbotha.net/2016/12/16/dvorak-remapping-with-karabiner-elements-on-macos-sierra-works/ and summarise it here briefly:
Download and install Karabiner Elements.
Copy qwerty_to_dvorak.json from the examples and install it as the new karabiner.json configuration file.
If Karabiner Elements is running, it'll pick up the new file.
This bug will affect most Java-based tools such as those by JetBrains (IntelliJ, PyCharm, WebStorm, AppCode) and probably also Netbeans. The work-around summarised above should alleviate the problem in all cases.
I've had a similar problem using key combinations like ctrl+n in intellij 16 on linux (red hat). I use Colemak keyboard. I had two input sources setup in my operating system, system preferences .
English(US)
English(Colemak)
When I changed the order of the Input Sources, and put Colemak first, the problem seemed to go away.
System Tools > Settings > Keyboard > Input Sources
JetBrains are waiting for the bug to be fixed upstream in JDK, which of course will never happen. The other answer here is informative, but will only work on Mac OS, so if you're on linux or windows you're out of luck there.
I wrote a script to work around the issue, which you can find here. If you normally use GNOME keymap in pycharm on linux, then you're in luck - you can simply import my dvorak_settings.jar file and get back to coding.
Otherwise you can use the script to generate your own bugfixed keymap, read on...
The original keymap files are located in <pycharm>/lib/resources.jar/idea/Keymap_*.xml.
Example usage:
./to_dvorak Keymap_Emacs.xml -o Keymap_Emacs_Dvorak.xml
Have a browse over the generated file and if it looks sane, pack it up into the .jar file (see my dvorak_settings.jar example for the required structure) and import this in your IDE.
This problem is (finally!) fixed in IntelliJ IDEA 2017.1. See JetBrains issue JRE-172, “Wrong keys are picked up on dvorak layout in Mac OSX 10.6.2”.
It also seems to be fixed in other JetBrains tools. I tested that it's fixed in PyCharm 2017.1, CLion 2017.1, and AppCode 2017.1.

Netbeans "Remote Terminal Tab" alt / ctrl and other key combinations doesn't work

I am using Netbeans 8.0.2.
Recently, I had discovered the "Remote Terminal Tab" option and it is cool. It can be very useful under certain circumstances. It is located under "Window menu"->"IDE Tools"->"Terminal".
It seems to work properly, exactly like putty / or other ssh client. BUT there is a problem with key combinations interpretation.
Alt + < any > doesn't work, seems like the Tab ignores the Alt key completely. So, if you used to Alt+d or Alt+right arrow/left arrow this functionality is not available.
The same for control. Ctrl + right arrow/left arrow and many others results unexpected behavior. Ctrl + r,s,c,z and some others work, but certain combinations like Ctrl + right arrow/left arrow, backspace, and many others doesn't work.
Simple steps to reproduce and understand the problem:
open "Remote Terminal Tab" (setup connection... connect to you remote host)
run the read command
centos_artur:~$ read
now type combinations with alt key, for example alt+d, alt+right/left, you'll get:
d^[[D^[[C
now, for ctrl+left,right, you'll get:
^[[D^[[C
Now open any native linux bash terminal, for example centos. Run the same read command, and this what you'll get as output:
Alt + d = ^[d
Alt + left = ^[[1;3D
Alt + right = ^[[1;3C
Ctrl + left = ^[[1;5D
Ctrl + right = ^[[1;5C
The question is:
How to make those combinations work in NetBeans "Remote Terminal Tab" ? How to fix it? I read something about NetBeans use Alt key for internal use only short-cuts, I assume this related, but doesn't help solving the problem.
I tested with Netbeans on Windows 7 and Linux(on CentOS) versions. And got the same behaviour on both...
A bug opened for the issue on I found this bug description (https://netbeans.org/bugzilla/show_bug.cgi?id=236268) on netbeans bugzilla site.
This is quite a common problem while working with consoles... Problem is, that there is a serialization going on between the host computer (keyboard driver etc) and the virtual terminal (serial VT). In my experience, not even an oldschool tool like Putty or even cygwin has 100% implementations.
You have to rely on netbeans dev team

View or Test README files *md in a browser prior to pushing to an online repository for rendering

Is there an application or way to render a README.md file in a browser on or offline? I am learning Markdown, and want instant feedback on some of my writing, as sometimes I forget a space or a blank line to achieve what I want, and it is cumbersome for me to commit and push to GitHub to see its rendering, not to mention the insane number of commits I'm creating for a small change.
Some have suggested setting up a PHP environment in your own server or virtual server, but I don't know how to do that (yet). I was thinking of an extension that if you opened an *.md file in your browser (I use Chrome predominately, but occasionally FF), it would look the same was as the frame in GitHub.\
I use TextMate and Sublime Text 2 to write the markdown, maybe they have a function I haven't seen/found on their site?
Lazy answer
(for independent fast learners)
In Atom editor: Ctrl/Cmd+Shift+M
In Sublime Text: there's a package to highlight Github Flavored MD,
it renders live as you type within the very same editor, it may not
look very pretty but at least you can instantly know if you are
making mistakes. It's called knockdown. See this other question
and my answer to know more about it.
If you wan't to preview the pretty result in a browser before
publishing you can use the Markdown Preview package.
Elaborate answer
(sublime-text novice red cross!)
- Installing Package Control
Open sublime-text.
[If you need this functionality available when you edit files on a directory
owned by root or www-data ( i.e. /var/www/ ) you may want to open sublime with admin
privileges using gksu sublime or similar and repeat every step]
Activate sublime's console by pressing ctr+`
[That is CONTROL key plus GRAVE ACCENT key (usually above the TAB key)]
Copy-paste one of the following options to sublime console's prompt.
(and press enter):
If sublime-text 2:
import urllib2,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
If sublime-text 3:
import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
Close sublime when the console prints back a message saying "Please restart Sublime Text to finish installation" (usually almost instantaneous). Open sublime-text again.
Once you restarted sublime-text, the rest is easy, see "Fast Answer" (above), or read on.
About using Package Control
What you just installed adds a new bunch of commands to your Palette and opens the door to a wonderful world of community contributed plugins; a way to extend sublime's functionality by other people or by yourself! (share your code!).
Now lets use it to install Markdown Preview.
You can access Package Controll simply by pressing ctr+shift+P, and typing Package Control, pc, pack (or anything similar thanks to the fuzzy search feature of the command palette), in this case search the right command by writing Package Control: Install Package (or just pi).
(If something goes wrong you can always Remove Package).
To see all the available packages just enter or click on it. Sublime will search for all the registered packages and will even check and show for you only the ones that are compatible with your version of sublime-text, you'll have to wait a few seconds.
(or less than a second, depending on your internet+computer latency+speed).
Now search for and select Markdown Preview.
After you hit Enter or click on it it will take a brief moment to install.
That's it, it just works.
- How to use it you ask?
To preview your pretty markdown in your default browser:
Inside sublime-text and with a .md file opened, press ctr+shift+P again.
Search for Markdown Preview and enter or click on it.
(There are many options, I just like github flavor the most :D)
... pics, else it shant have come to pass:
(it totally works! here's the evidence)
presto!
You just took one further step to be a sublime-text master, I hope my answer helped you
You can use the sublimetext-markdown-preview package for Sublime Text. It allows you to preview Markdown files on your browser. See the README.md for installation instructions.
You can install the python package index pip and then install an application called grip that will serve the .md file on a localhost port. Its very easy once its been installed.
sudo easy_install pip
sudo pip install grip
Then just run:
grip
In the root directory of the .md file.
There's a Chrome plugin to do exactly this.
Markdown Preview
Converts and previews markdown files (.md, .markdown) to HTML right inside Chrome.
If you're on OSX / Linux and don't mind the command line, here's a simple script that opens the rendered markdown in a browser:
#!/usr/bin/env bash
OUTPUT=/tmp/$(basename $1).html
markdown $1 > $OUTPUT
open $OUTPUT
# FIXME: Avoid deleting before opening; possible to use `wait`
# instead?
sleep 1
rm $OUTPUT
You might need to substitute the open command for something that works on your flavour of Linux, e.g. firefox $OUTPUT.
The sleep 1 is just a hack to prevent the file from being removed before the browser has time to read it; I'm sure a more proficient bash hacker can substitute it with something less ugly ;)
I like the free Chrome app stackedit. It lets you create and preview a markdown document at the same time - 2 panes.
Try MarkView a Chrome extension for editing and viewing markdown file with an outline view, support Github Flavored Markdown table styles and code block syntax highlight.
Features
Editing and Viewing markdown file in web page style.
Auto reload local file when file is changed (Post-installation:
select "Allow access to file URLs" option in chrome://extensions/)
Show outline beside the content in scrollable way
Have buttons for GoTop, ViewSource and GoBottom
Support Github Flavored Markdown table styles and code highlight.
Highlight the code area for programming languages(eg. ```ruby)
Support web pages printing with decent outlook(Chrome->File->Print...)
Responsive: when the window size small than 940px, outline section will
automatically hidden; resize bigger than 940px, outline section will display.
MarkView will view all markdown files except those under raw.github.com
because that subdomain only displays the source.
#regularjack's answer is probably the way to go, since it is integrated with Sublime Text. However, I just wanted to draw attention to Pandoc is a document converter program, written in Haskell, which converts between numerous file formats, including markdown. Whilst it requires installation there is also a page to try it out. Whilst not ideal for large documents this site gives you an easy way of copying and pasting markdown and seeing the foramtted result instantly.
FireFox has an editor. It is not perfect to do the editing directly, but it is great to quickly check a change or verify your file before checking in.
https://addons.mozilla.org/en-US/firefox/addon/markdown-editor/
Once you installed the Add-On, make sure to go to Customize.. (right click on icons, next to the menu at the top-right) to add the little icon to your bar. Then you will be able to open / close / save, etc. Just like a Desktop application.

Resources