Powerline (tmuxline and vim-airline) not showing the right characters [iTerm2, Mac OS X] - macos

so I'm using tmuxline and vim-airline because I don't know how to install powerline for iTerm 2
Anyway they should be looking like tabs but there are characters here not showing. Can anyone help me out?

My question has been answered. Thanks guys!
For future viewers who might encounter the same problem. All you have to do is the following:
Write this in your terminal (iTerm2 etc...)
git clone https://github.com/powerline/fonts.git
Now find that file (usually ~/)
cd powerline/fonts
Then type
./install.sh
After that go to your terminals preferences (usually cmd+,) and go to profiles > profilename > Font (Change Font) > Search for "Powerline" and all the installed fonts for powerline should appear > apply.
Use Anti-aliased if you want, and you can separate into two different fonts so that you only need the powerline font for 'Non-ASCII', and your preferred font in 'Font'

Did you install the patched font, as mentioned in Installation on OS X?
Install downloaded patched font by double-clicking the font file in
Finder, then clicking Install this font in the preview window.
Despite the link is to powerline installation manual, vim-airline also suggests to install that font.

You need special fonts for tmux powerline. You can easily install them from the command line:
git clone https://github.com/powerline/fonts.git
sudo ./fonts/install.sh
Then you change fonts in iTerm2 (both regular and non-ASCII fonts).

Related

Vim Devicons Icon glitch on MacVim and Terminal Vim

As I was setting up my ~/.vimrc, I installed Plugin 'ryanoasis/vim-devicons' (https://github.com/ryanoasis/vim-devicons) and Plugin 'preservim/nerdtree' (https://github.com/preservim/nerdtree) - I ran into a problem. I couldn't see the desired Python file icons for any of my Python (.py) files in Nerd Tree window in Terminal Vim and Mac Vim.
The solution to this problem is rather simple as someone did figured it out already. (https://github.com/ryanoasis/vim-devicons/issues/198)
I am sharing this information on StackOverflow community for a quicker reference.
For seeing the file type specific icons in a File browser like Nerd Tree in Vim,
first please install - NERD FONT
(https://github.com/ryanoasis/nerd-fonts#font-installation)
by using the command:
brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font
Final step -
For Terminal Vim: (Mac OS)
Change Terminal font to Hack Nerd Font
For Mac Vim: (GUI Vim)
Add this line to your vimrc file -
set guifont=hack_nerd_font:h21
(h21 sets the font size - change it any value based on your preference)
(save the changes to the vimrc file with command :wq)

Wrong terminal emulator persists in VSCode

I'm currently using Debian Buster (10): installed a new terminal emulator (Alacritty) along with a new shell (ZSH); and configured my system to use this new terminal & shell as the defaults.
Unfortunately, VScode continues--regardless of the changes I make in my vscode settings file--to use some sort of defunct terminal. Notice the screwed-up styling:
screenshot of vscode with incorrect terminal
Anyone with knowledge on how to configure vscode to use the correct terminal would be very much appreciated. Thank you guys.
This is just a terminal font issue.
First you need to download and install a Powerline Font (there are quite a few, check this link for hints).
Then you need to assign that downloaded font to your terminal. You should add:
{
"terminal.integrated.fontFamily": "<your powerline font>"
}
to your settings.json file, or search in the gui settings Terminal integrated Font Family and add it there.
I personally use SauceCodepro NF which works great for me.

Installing powerline fonts for zsh + Prezto theme

I am currently using Zsh + Prezto for my scripting shell configuration. I have been using the sorin theme but am a little dissatisfied with it. I'd like to switch to the paradox theme!
It is supposed to look like this:
I'm having some trouble doing that. When I switch to the theme, the symbols aren't able to load, so I get a prompt that looks like this:
Notice the boxed question marks where there should be an edge border for the background or a branch symbol for the git branch. (Take a look at the paradox theme preview here).
I've seen here that I should install Powerline patched fonts for the symbols to load in correctly. However, as I'm somewhat unfamiliar with the process, I would love some help installing it into my OS X.
In the documentation, it notes I should install via pip. When I run pip install --user powerline-status, my prompt is still unable to display the symbols the way it should look.
What else must I do, after running the installation, to display this prompt correctly?
I am using a MacBook Pro with El Capitan
Update: I have installed the powerline fonts and run the install.sh exec, changed my terminal preferred font, and tested out the new look of the prompt. The symbols now display, however, they are raised from the baseline of the prompt row, like so:
Notice that the symbol of "\ue0b0" is elevated from the bottom of the row.
It is all about the Powerline symbols.
To get the Powerline symbols working as mike#Mikes-Laptop.local has:
Download a Powerline font. A good font for downloading can be found at https://github.com/powerline/fonts
Install it by running ./install.sh.
Change the font in your Terminal preferences to use the new Powerline font.
Test! To test the glyphs in a terminal:
echo "\ue0b0 \u00b1 \ue0a0 \u27a6 \u2718 \u26a1 \u2699"
The prior instructions were intended for Mac OS version 10.11 with Terminal, but may work similar for other setups.
On Windows - just
* download some Powerline font like:
https://github.com/abertsch/Menlo-for-Powerline/raw/master/Menlo%20for%20Powerline.ttf
* Install it by clicking the file twice
* Choose the new font in properties
That's it!
If you're a macOS user, the Powerline glyphs are now built-in to iTerm (as of 3.3.7, 17 Nov 2019) but disabled by default.
You can enable the fonts by toggling the checkbox in iTerm > Preferences > Profiles > Text:
Any newly opened Terminal windows will render supported Unicode characters as glyphs, as shown the following screenshot test.
$ echo "\ue0b0 \u00b1 \ue0a0 \u27a6 \u2718 \u26a1 \u2699"
If you'd rather manually manage the installation of the Powerline Symbols, you can use Homebrew Casks:
$ brew tap homebrew/cask-fonts
$ brew cask install font-powerline-symbols
This will install the PowerlineSymbols.otf typeface for you to use system-wide.
Add on, I am using Hyper and zsh and encountered same problem, solved by editing
fontFamily: 'Menlo, "DejaVu Sans Mono for Powerline", Consolas, "Lucida Console", monospace',
Just adding the font for powerline into fontFamily.
For anyone coming to this later, iTerm2 3.3.7 has a checkbox to use built-in Powerline glyphs. If you're not trying to get too fancy, this is an easy way to get those glyphs.
Preferences > Profiles > Text > Check that box
For Linux people that have to work in a local environment (i.e. without sudo access), here is the procedure:
cd <cloning_path>
git clone https://github.com/powerline/fonts-git --depth=1
cd fonts
./install.sh
That's it. You don't have to configure anything in a graphical menu like other answers say. Powerline fonts should be loaded and powerline symbols should automatically be used by the oh my zsh prompt
If you later want to un install the powerline fonts:
cd <cloning_path>/fonts
./uninstall.sh

Powerline symbols aren't working?

Hi I'm trying to use a power line theme for zsh and although I've installed the Powerline-symbols.otf and various fonts from the https://github.com/Lokaltog/powerline-fonts repo, I cannot get the Powerline prompt to show the symbols. Instead I get [X]'s where the symbols should be.
I'm using terminal and made sure that it is set to xterm-256 colours and utf-8 encoding.
Just downloading and installing the fonts is not enough. In order to get the Powerline symbols, you need to tell Terminal to use one of the patched fonts you downloaded.
This can be done from the menu Terminal->Preferences.... In Settings->Text click on the button Change... in the section Font. Choose any font with "Powerline" in its name and you should get to see the Powerline symbols.
I just set the font dejavuSansMono NF and problem solved
I didn't have the fonts in the font list. To install them you need to clone fonts
git clone https://github.com/powerline/fonts.git
then to open PowerShell and run
.\install.ps1
inside your fonts directory. If you get error
FullyQualifiedErrorId : UnauthorizedAccess
you need to update policies by running
Set-ExecutionPolicy Unrestricted
via PowerShell. After that try to install fonts again.
Now you will be able to change the font as instructed above by Adaephon

Colors slightly off in "solarized" color scheme

I have installed the Solarized color-theme using package.el in the latest version of Emacs (24.3), but the colors seem to be off (the contrast seems to be too low)
My Solarized installation:
The screenshot from the website:
I read the following in the Emacs color-theme Solarized documentation on the GitHub repository:
If you are going to use Solarized in Terminal mode (i.e. not in a GUI
version like Cocoa or X11 Emacs), please please please consider
setting your terminal emulator's colorscheme to use the Solarized
palette.
...
The Solarized repository includes palettes for some popular terminal
emulator as well as Xdefaults; or you can download them from the
official Solarized homepage.
...
Again, I recommend just changing your terminal colors to Solarized
values either manually or via one of the many terminal schemes
available for import.
This made me wonder if I am suffering from this problem. However the snapshot above is from Emacs on a GUI (Gtk) (i.e. not from running Emacs with -nw option)
Either way: How can I change my terminal emulator's colorscheme to use Solarized values? I have git cloned the solarized repository but I don't know what I am supposed to do with it.
In case it matters:
I do not have admin access to the machine where Emacs is installed
I am running the latest stable version of Emacs.
I connect remotely with ssh -X from a GNOME terminal from Ubuntu (latest version) on my local machine. GNOME terminal seems to be version 3.6.0ubuntu.
Solorized was initially created for VIM. Mods for other editors weren't written by Ethan Schoonover.
If you look at the full image you posted on the website it says VIM on the top. So basically it works as it should in emacs) I have tried solorized both on vim and on emacs and I should say it works perfectly fine in VIM.

Resources