# Typing :-\<newline\>

**URL:** https://meta.discourse.org/t/typing-newline/113007
**Category:** Feature
**Created:** [March 30, 2019, 3:14pm UTC](https://meta.discourse.org/t/typing-newline/113007 "2019-03-30T15:14:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Jan\_Wielemaker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jan_wielemaker/32/130795_2.png) [@Jan\_Wielemaker](https://meta.discourse.org/u/Jan_Wielemaker)
#### Post date: [March 30, 2019, 3:14pm UTC](https://meta.discourse.org/t/typing-newline/113007/1 "2019-03-30T15:14:28Z")

</div>

We poor Prolog users at [https://swi-prolog.discourse.group](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

```prolog
p :-1:
    q.

```

instead of

```prolog
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!

```

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [March 30, 2019, 4:17pm UTC](https://meta.discourse.org/t/typing-newline/113007/2 "2019-03-30T16:17:33Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Jan\_Wielemaker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jan_wielemaker/32/130795_2.png) [@Jan\_Wielemaker](https://meta.discourse.org/u/Jan_Wielemaker)
#### Post date: [March 30, 2019, 4:57pm UTC](https://meta.discourse.org/t/typing-newline/113007/3 "2019-03-30T16:57:59Z")

</div>

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 …

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 1, 2019, 1:46am UTC](https://meta.discourse.org/t/typing-newline/113007/4 "2019-04-01T01:46:51Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 9, 2019, 2:26pm UTC](https://meta.discourse.org/t/typing-newline/113007/5 "2019-12-09T14:26:28Z")

</div>

Hey @Jan_Wielemaker,

@dan just committed a new feature to try and solve this nuisance.

[https://github.com/discourse/discourse/pull/8459](https://github.com/discourse/discourse/pull/8459)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [December 16, 2019, 7:00am UTC](https://meta.discourse.org/t/typing-newline/113007/6 "2019-12-16T07:00:05Z")

</div>

This topic was automatically closed after 6 days. New replies are no longer allowed.
