Typing :-<newline>

We poor Prolog users at https://swi-prolog.discourse.group have some trouble trying to enter the most basic part of the Prolog syntax: rules have :- between head and body and it is good practice to put a line break after the :-. This however insists on inserting a smiley, so our code looks like this

p :-1:
    q.

instead of

p :-
    q.

As you can see, the smiley doesn’t even show up inside the code. It would be nice if smiley completion was disabled inside code blocks.

 Thanks!
7개의 좋아요

Change the site setting emoji autocomplete min chars to 3 or 4.

4개의 좋아요

Thanks. The default is not 3 but 0 and 3 is long enough. This is a big improvement for us. Somehow it still feels right not to do emoji autocompletion at all inside code …

4개의 좋아요

Understood, it is very tricky though with our current parser cause we can not efficiently reverse map text in the editor to type of element that you are in the middle of typing.

A trivial regex here counting ``` which are followed by a bit of text and a newline, kind of works but then there is [code] and 3 space indent as well to worry about.

This is definitely something we are thinking about and have similar request (basic markdown highlighting) which would also lean on a similar feature.

10개의 좋아요

안녕하세요 @Jan_Wielemaker,

@dan 님이 이 번거로운 문제를 해결하기 위해 새로운 기능을 커밋했습니다.

9개의 좋아요

이 주제는 6일 후 자동으로 닫혔습니다. 더 이상 답변이 허용되지 않습니다.