First of all, install a nerd font, and apply it: nerd font
Then, pick a unicode over here: nerd font cheat sheet. In this case, search keyword
After getting the unicode number, you can use it like this:
FAQ: Why are my nerdfont symbols not displaying correctly?
The display of nerdfont can be affected by many factors, including terminal emulator, font type, font size, zoom, etc.
Personally, I use alacritty as terminal emulator, the font is Fira Code iCursive Op, font size is 12, 2x zoom on my PC.
You can adjust it yourself and choose a configuration that suits you.
Btw, terminal emulators like alacritty support a featured that can adjust the offset, you may fix this problem through it.
Maybe you have noticed that the font of lightline in the screenshot is somewhat different from the font in the vicinity, this simple trick is implemented by sainnhe/artify.vim.
The lightline configuration depends on these plugins:
This is the configuration: dotfiles
Tmux cannot display true colors correctly, check this issue for solution: How to use true colors in vim under tmux? #1246
You can use this script to test if true colors in tmux have been overridden. If there is no difference between executing this script in tmux and out of tmux, congratulations, this annoying bug has been fixed.
The tmux theme is implemented by edkolev/tmuxline.vim, but it doesn’t support true colors of lightline yet. There’s a PR to solve this problem but has not been merged yet: Add termguicolors support for lightline #109. You can temporarily use hoov/tmuxline.vim (or my fork).
And this is the configuration of tmuxline: dotfiles
It depends on these plugins:
Note that if some tmux plugins don’t display correctly when vim mode is changed, you can try to create a snapshot using
:TmuxlineSnapshot command and source this configuration file in
许可协议 CC BY-NC-ND 4.0