[Feature request] `:emoji:` codes support
Hi,
I use Gitmoji with :emoji: codes for commit messages.
It would be nice for GitFourchette to convert those into visual emojis.
Thanks
PS : félicitations pour avoir créé cette alternative libre et compatible Linux à la fourchette tchèque. 🥳
Personally, I think that on a modern system emojis and other special characters are the responsibility of the system's input mechanism, not any given application. An application should just support Unicode and leave how the Unicode character is entered to the OS. Otherwise each application is unnecessarily complicated with varying, potentially conflicting, schemes to generate a multitude of special characters. 😉
Tell me then, how did you append that emoji to your comment ?
@KaKi87 : I used my OS tool to select one and pasted it into the comment.
Well, writing emoji codes is faster when you remember them.
While I agree with @l-cornelius-dol, I also don't see would be much of a downside in supporting automatic replacement of some well-defined strings with their intended visual representation. Especially when using text codes has been a prevalent practice for some time (that's hopefully fading out over time). The only downside I can envision (besides additional code complexity) is this feature affecting commit messages that happen to unintentionally contain such an emoji code. And that would likely be reduced if care is taken to do this replacement only at word boundaries (i.e. with spaces surrounding the emoji code.)
Anyway, I don't really have a strong opinion on this — just leaving my 2¢.
that's hopefully fading out over time
Personally I have been using and will keep using emoji codes because of CLIs and TUIs : although most terminal emulators can display emojis, they still don't play well with monospace font, so having emoji codes displayed plain is better for me in those cases, while I do want to see the actual emojis when using GUIs.
The only downside I can envision (besides additional code complexity) is this feature affecting commit messages that happen to unintentionally contain such an emoji code.
Again, the feature would be disabled by default.
if care is taken to do this replacement only at word boundaries (i.e. with spaces surrounding the emoji code.)
Of course.
I'm not against this if people find it useful – I've seen a few of these in the wild and I have to agree that the codes in raw form would look better if rendered as actual emojis.
As far as I understand the "standard" for a well-formed gitmoji commit, the :code: is only supposed to occur at the start of the commit message. So, the risk of unintentional replacement is pretty low if we just look at the start of the message. And of course, this could be a togglable option for people who don't want it.
PS : félicitations
merci ! 🤗
the risk of unintentional replacement is pretty low if we just look at the start of the message
Indeed, I didn't even think about that one lol
So basically it's /^:[a-z_]+\s/.