The Joy of Alacritty
Alacritty does all the things I need and may even be faster than iTerm2. It is also a kick-butt Rust based project. What more could you ask for? If you say tabs, well then no, Alacritty does not support tabs. I use Tmux in place of tabs, so for me this just means that Alacritty is a better targeted solution.
I need a terminal emulator to be fast, support color, ligatures, Tmux, and VIM simultaneously and seamlessly. Alacritty does all this very well.
If I notice terminal introduced latency then it is too slow, if I do not, then it is fast enough. I use color to provide semantic clues. I expect at least 256 colors. Tmux and VIM should work together largely the way they work separately. Ligatures require more explanation.
A ligature is a single character representation of a symbolic concept resulting from the joining of two or more characters1. It is useful in some programming languages to simplify the display of compound ASCII symbols.
Here are two ways to represent
- Not Equal - ASCII
- Not Equal - Ligature
I use ligatures as a way to display symbols, comprised of multiple ASCII characters, as a simpler rendering, without altering the actual source characters. Here is an example from Fira Code that shows and example of the ASCII saved in a file, on the right, and the ligature representation displayed, on the left.
This enables me to view some characters as ligatures, but not to enforce my preference on other users of a source file. I like having the control of when to obscure the actual ASCII with ligatures. When I am editing a line, I like to see the original ASCII on that line so I can see what I am editing. The iTerm2 update forced the display of ligatures all the time. The iTerm2 configuration for this feature was disabled.
In order for me to control the expression of ligatures, I need the terminal emulator to display the actual character. I use tools like enomsg/vim-haskellConcealPlus to obscure the ASCII with ligatures when that is my preference.
Notice how some of the characters are displayed as ligatures even on the cursor line. The cursor is narrow in the
in the screen-shot but look at the character just left of
Here is how I got Alacritty working on my Mac (Sierra 10.12.x). If you do not use Mac then your setup will be different.
I am using two fonts, Fira Code and
Menlo. I beleive that
Menlo ships with Mac, but
Fira Code does not. Open
Font Book to ensure both are installed. To install Fira Code,
simply follow the instructions here. I just downloaded the
Fira Code fonts and installed them with
Font Book, rather than using
homebrew. Once installed you
should see the following in
- Fira Code
Make sure Tmux is installed and reasonably updated. I found that the version from homebrew did not work fully, so I uninstalled it and installed the following from macports2.
I updated my
~/.tmux.conf to change the default terminal identifier.
.config/alacritty/alacritty.yml configuration file.
Update the fonts
I am using Fira Code for regular and bold fonts. I am using
Menlo for Italic.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
The terminal setting should look like.
Look over the rest of the config and ensure it matches your environment. I also changed the
bash used to the version
1 2 3 4
The colors can be manually modified by providing the hex value.
1 2 3 4 5 6 7 8 9 10
If you are moving from another terminal emulator, like
iTerm2 you can view the defined colors, for example from
iTerm2ColorSchemes.com, and grab the hex value with
Digital Color Meter.
Digital Color Meter and then
display values, and select
as hexadecimal. Then fly over the
color and then hit
Shift - Command - c, to copy the hex value to the clipboard. Then from the clipboard, you can
paste them to the
.config/alacritty/alacritty.yml configuration file for the given color.
Also if you like the color schemes at iTerm2ColorSchemes.com you can find the scheme you
like and read the
termite config in github.
If for example you like the SoftServer scheme, you can
view the hex values in
termite config file looks like this.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
If manually editing is not your thing, there might be a color scheme that you can use. Nord Alacritty looks nice.
I went ahead and added some color for Man pages also.
1 2 3 4 5
- Create or edit
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Here is are a few examples of the results.
This shows the way I use ligatures. Also note the italic comments.
Here is a Man page using color.