Emoji not displaying correctly when using vim or tmux

Solution 1:

You need proper Unicode all the way up the stack from OS-Locale, to Terminal, to Tmux, to Vim. Each part of the chain must support Unicode properly.

For your OS-Locale

you need something like: set LANG="en_US.UTF-8"

For Tmux

Try starting tmux using tmux -u, like Jon suggested. If that doesn't work then you might need to check your config files .tmux.conf or reset to default.

FOR VIM

You need to compile vim with multi-byte support.

The easiest way to do this is to run

./configure --with-features=big
make

This will build vim with the correct support.

You can verify that it was compiled correctly with

:version

in vim or by running

vim --version

and looking for +multi_byte. If it says -multi_byte it will not work.