Emojis display incorrectly in vim only inside tmux, and only in vim inside tmux. Emojis work as expected in vim outside of tmux. Emojis work as expected in other programs inside of tmux.
vim ~/echoemoji.sh
sh ./echoemoji.sh
nano ./echoemoji.sh
vim ./echoemoji.sh
vimrc
set encoding=utf-8
set t_Co=256
set termencoding=utf-8
:set term
term=xterm-256color
tmux.conf
set -g default-terminal "xterm-256color"
iterm2
Character Encoding: UTF-8
Report Terminal Type: xterm-256color
Font: Hack
Non-ASCII Font: Inconsolata-dz for Powerline
Use HFS+ Unicode normalization (checked)
zshrc
alias tmux="tmux -u" # Tried with and without
this is an issue with how iterm's default unicode version is 8, and nvim's default version is 9. Switching away from emoji characters on the gutter fixes the issue. (iTerm 3.1 will have more configurable emoji versions)
https://www.reddit.com/r/vim/comments/6vkoii/vim_text_rendering_off_by_one_issue/
Select Iterm2->Profiles->Text->Use Unicode versoin 9 widths
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With