Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operator Mono and VIM #489

Closed
asilvadesigns opened this issue Mar 21, 2017 · 4 comments
Closed

Operator Mono and VIM #489

asilvadesigns opened this issue Mar 21, 2017 · 4 comments

Comments

@asilvadesigns
Copy link

asilvadesigns commented Mar 21, 2017

Update: Solved

See below.

Trying to figure out how to render italics properly using operator mono and vim. Book Italic is the correct weight, if I set it as the normal font face, it renders perfectly but using it as the italic, and in combination with the Vimrc settings is no good. Any insights?

In alacritty config:

font:
  normal:
    family: OperatorMonoSSm
    style: Book

 italic:
    family: OperatorMonoSSm
    style: Book Italic

In my vimrc.

highlight Comment gui=italic cterm=italic
highlight htmlArg gui=italic cterm=italic
@asilvadesigns
Copy link
Author

Solved

Some hours and googling later, I realized this has nothing to do with alacritty but nevertheless, it's working and this is my result.
screen shot 2017-03-21 at 8 56 34 am

Solution

Part 1 - the simple stuff

  1. First off you'll need to purchase Operator Mono, Hoefler & Co customer support told me Operator Mono SSm is the way to go for sizes 9px to 18px.
  2. Set it as the font within alacritty.yml - (reference above screenshot).
  3. If you use NerdFonts, you'll need to patch Operator Mono using FontForge here.
  4. Within vimrc or init.vim
    hi Comment gui=italic cterm=italic
    hi htmlArg gui=italic cterm=italic
    

Part 2 - the hard stuff

  1. In home directory create new file xterm-256color-italic.terminfo with the following contents:
    xterm-256color-italic|xterm with 256 colors and italic,
    sitm=\E[3m, ritm=\E[23m,
    use=xterm-256color,
    
  2. Compile it, with command: tic xterm-256color-italic.terminfo
  3. Set it as the TERM within alacritty.yml - (reference above screenshot).
  4. Restart alacritty. test with command: echo -e "\e[3mfoo\e[23m". It should output foo in italics.

Part 3 - tmux

  1. Place the following within your tmux.conf:
    # enable true color support and italics
    set -g default-terminal "xterm-256color-italic"
    set -ga terminal-overrides ",xterm-256color-italic:Tc"
    
  2. Restart tmux

Invaluable Resources

@jwilm
Copy link
Contributor

jwilm commented Mar 21, 2017

Thanks for the very thorough follow up!

@asilvadesigns
Copy link
Author

Thanks for the awesome-est terminal : )

@apelsinet
Copy link

Thanks this helped a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants