{"action":"closed","issue":{"url":"https://api.github.com/repos/vim/vim/issues/665","repository_url":"https://api.github.com/repos/vim/vim","labels_url":"https://api.github.com/repos/vim/vim/issues/665/labels{/name}","comments_url":"https://api.github.com/repos/vim/vim/issues/665/comments","events_url":"https://api.github.com/repos/vim/vim/issues/665/events","html_url":"https://github.com/vim/vim/issues/665","id":137053412,"number":665,"title":"Request For Comment: Emoji","user":{"login":"mattn","id":10111,"avatar_url":"https://avatars.githubusercontent.com/u/10111?v=3","gravatar_id":"","url":"https://api.github.com/users/mattn","html_url":"https://github.com/mattn","followers_url":"https://api.github.com/users/mattn/followers","following_url":"https://api.github.com/users/mattn/following{/other_user}","gists_url":"https://api.github.com/users/mattn/gists{/gist_id}","starred_url":"https://api.github.com/users/mattn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattn/subscriptions","organizations_url":"https://api.github.com/users/mattn/orgs","repos_url":"https://api.github.com/users/mattn/repos","events_url":"https://api.github.com/users/mattn/events{/privacy}","received_events_url":"https://api.github.com/users/mattn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-02-28T13:31:24Z","updated_at":"2016-03-23T21:42:21Z","closed_at":"2016-03-23T21:42:21Z","body":"Vim doesn't handle emoji correctly. Most of terminal emulators including xterm have been drawn emoji with half width character in default. So many multi-byte users troubled. We can't see emoji on vim correctly.\r\n\r\n![](https://i.gyazo.com/0c3c3a7abcdf91acc79c79d43ca1d7e5.png)\r\n\r\nAs you know emoji was defined as ambiguous width on unicode.org. (**fix1**: in latest, it's narrow, but may be fixed in [PRI318](http://www.unicode.org/review/pri318/), **fix2**: if PRI318 will be accepted, all of emoji will be wide) So vim doesn't handle emoji as double width. https://github.com/vim/vim/blob/master/src/mbyte.c#L1267 . \r\n\r\nHowever, most of ASCII users may not know, unicode.org recomend emoji as square aspect ratio.\r\n\r\nhttp://unicode.org/reports/tr51/\r\n> Current practice is for emoji to have a square aspect ratio, deriving from their origin in Japanese. For interoperability, it is recommended that this practice be continued with current and future emoji.\r\n\r\niTerm2 provide option to switch narrow and wide.\r\n\r\n    Preferences -> Advanced -> Unicode East Asian Ambiguous character are wide\r\n\r\nAnd macvim render emoji as wide. https://github.com/macvim-dev/macvim/pull/187\r\n\r\nSo I hope that vim also can handle emoji as wide possibly. I don't have stuck about implementation of handling emoji widths to treat as double. We are okay if vim provide way to render emoji as double width. Even though if it is new option 'emoji' or something with false in default for doing that. For example,\r\n\r\n### Suggestion1: load EastAsianWidth.txt\r\n```\r\nset ambiwidth=@/path/to/EastAsianWidth.txt\r\n```\r\nuser can modify data.\r\n\r\n### Suggestion2: new value for ambiwidth\r\nCurrently, it take two values single or double. Then new value 'fulldouble' for fix this issue.\r\n\r\n### Suggestion3: new option 'emoji'\r\nhttps://gist.github.com/mattn/00dc87d2e8cf1dd3131d\r\n\r\nThis implementation refered unicode data from 1.0 to 6.0. This patch handle emoji as wide.\r\n\r\n![](https://i.gyazo.com/35c22d6a500122394468a315de2d9d64.png)\r\n\r\nAFAIK, most of fonts expect the square aspect ratio for rendering of emoji as wide. For example, smily face ( :smile: :sushi: or etc ). At least, I don't want to eat sushi rendered as narrow width.\r\n"}}