Conversation
merge them into Default.sublime-keymap since they are identical
🚚 🔥 emoji-convertor.py → getmojis.py
|
Hello Sorry for the late reply. First of all thanks for your contribution! 😃 I took your version for a spin and I've got a few issues / questions before I can merge it.
{
"emojiCompletions": [
[":smile: 😄\tsmiling face with open mouth and smiling eyes", "smile:"],
[":smiley: 😃\tsmiling face with open mouth", "smiley:"],
//...
],
"commitEmojiCompletions": [
[":bookmark: 🔖\tversion tag", ":bookmark:"],
[":books: 📚\tdocumentation", ":books:"],
["version tag 🔖\t:bookmark:", ":bookmark:"],
["documentation 📚\t:books:", ":books:"],
]
}Generally I think that you could use a map of aliases to emoji symbols if Ex. {
"pout:": "😡",
// ...
}I'll put a few more comments inline :-D |
| commit_emojis_emoji = [] | ||
| for emo in commit_emojis: | ||
| commit_emojis_alias.append([":{}: {}\t{}".format(*emo), ":{}:".format(emo[0])]) | ||
| commit_emojis_alias.append([":{}: {}\t{}".format(*reversed(emo)), ":{}:".format(emo[0])]) |
There was a problem hiding this comment.
You can omit the colon here: commit_emojis_alias.append(["{} {}\t{}".format(*reversed(emo)), ":{}:".format(emo[0])])
| # is printed as more than one character | ||
|
|
||
| actual_emojis = list(map(lambda emo: emo[1], emojis)) | ||
| for region in view.sel(): |
There was a problem hiding this comment.
Is this for emojis like this one [":arrow_backward: ◀️\tblack left-pointing triangle", "arrow_backward:"]?
Hi!
If you enabled the setting
github_emoji_complete_with_emoji, then it'll complete with the actual emoji instead of the alias.I updated how the plugin worked too:
The emojis are stored in two JSON files:
emoji.jsoncommit-emoji.jsonNote: A little python program allows you to automatically update the first one (you obviously need an internet connection)
They have the same structure:
The only difference is the meaning: in the
commit-emoji.jsonfile, the description is the meaning of the emoji, that's all.The format of the list that you had in the settings is created when the plugin is loaded. There are 4 lists:
I also updated the readme to let people know about this feature.
Let me know what you think!