# Editor Auto complete option

**URL:** <https://forum.pinegrow.com/t/editor-auto-complete-option/3484>\
**Category:** Feature Request\
**Created:** [October 31, 2019, 10:03am UTC](https://forum.pinegrow.com/t/editor-auto-complete-option/3484 "2019-10-31T10:03:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulmarshall](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@paulmarshall](https://forum.pinegrow.com/u/paulmarshall)\
**Post date:** [October 31, 2019, 10:03am UTC](https://forum.pinegrow.com/t/editor-auto-complete-option/3484/1 "2019-10-31T10:03:43Z")

</div>

Please can we have options to control auto-complete behavior in the code editor?  
I hate the immediate auto-complete eg. I’ve got a block of text, I decide I want it bold so I type in \< b\> at the start. The editor immediately adds \< / b\> which I then have to delete and type it in where it needs to be at the end.  
But I like this aspect of auto-complete - I type in \< / in the right place and the editor does the rest.  
I can also see it’s useful when starting from scratch - I type \< p\> and I get a couple of line feeds and  
\< / p\>  
Thats why it needs to be an option.  
SO autocomplete when I type \</ but only optionally when I type \< xxx \>  
Does this make sense? (NB gaps here to defeat the html)

---

<div class="post-metadata">

**Author:** ![SureWeb](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@SureWeb](https://forum.pinegrow.com/u/SureWeb)\
**Post date:** [November 3, 2019, 7:13pm UTC](https://forum.pinegrow.com/t/editor-auto-complete-option/3484/2 "2019-11-03T19:13:56Z")

</div>

Highlight the text in the code editor then press Shift+Ctrl+A and a dialog will appear type p and then enter and your text will be wrapped with `<p></p>` 🙂

---

<div class="post-metadata">

**Author:** ![SureWeb](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@SureWeb](https://forum.pinegrow.com/u/SureWeb)\
**Post date:** [November 3, 2019, 8:23pm UTC](https://forum.pinegrow.com/t/editor-auto-complete-option/3484/3 "2019-11-03T20:23:40Z")

</div>

BTW you would need to have Emmet enabled in Support \> Settings, I’m not sure if it is enabled by default.

---

<div class="post-metadata">

**Author:** ![paulmarshall](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@paulmarshall](https://forum.pinegrow.com/u/paulmarshall)\
**Post date:** [November 4, 2019, 9:32am UTC](https://forum.pinegrow.com/t/editor-auto-complete-option/3484/4 "2019-11-04T09:32:15Z")

</div>

I dont really see how that helps, but I’m trying out the Atom editor which has no auto-complete so I shall see which I prefer. I like the auto-complete but it needs more AI.

---

<div class="post-metadata">

**Author:** ![Thomas](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/thomas/32/61_2.png) [@Thomas](https://forum.pinegrow.com/u/Thomas)\
**Post date:** [November 4, 2019, 9:57am UTC](https://forum.pinegrow.com/t/editor-auto-complete-option/3484/5 "2019-11-04T09:57:09Z")

</div>

What you theoretically could do is to disable auto-complete in the Pinegrow settings (support -\> settings -\> Code editing) and use CTRL + space in case you want it on the fly.

I haven’t tried it out, though.

Cheers

Thomas

---

<div class="post-metadata">

**Author:** ![paulmarshall](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@paulmarshall](https://forum.pinegrow.com/u/paulmarshall)\
**Post date:** [November 4, 2019, 11:09am UTC](https://forum.pinegrow.com/t/editor-auto-complete-option/3484/6 "2019-11-04T11:09:28Z")

</div>

You mean ‘show auto-complete as you type’? Thats not it. With that on when you type \< the code editor shows a (long) list of valid things that can follow \< which you can select from the list.  
Say I select \< b from the list. The editor enters \< b but as soon as I type \> the editor adds \< / b \>. Thats what I dont want because i have to delete it.  
What I do like is that when I then enter \< / at the end of my block of text the editor responds quite rightly with \< / b \>.

---

<div class="post-metadata">

**Author:** ![Thomas](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/thomas/32/61_2.png) [@Thomas](https://forum.pinegrow.com/u/Thomas)\
**Post date:** [November 4, 2019, 2:58pm UTC](https://forum.pinegrow.com/t/editor-auto-complete-option/3484/7 "2019-11-04T14:58:50Z")

</div>

OK - got it.

Let me say it this way:

Whatever behaviour the code-editor might have, it’s fine for me. PG has been built for visual supporting code.

So your request should be better read as:

By selecting an element or plain-text, PG has options like “Insert before”, “Insert after” the selection.

Why does Pinegrow doesn’t have the “Enclose selected element (or text) into … something”?

Use case:

Say we have plain-text - even not wrapped in a p-Tag. It would be cool to select (parts of) this text and enclose (wrap) it into p-Tag, h-Tag …

Once this done, select the elements in the tree (h3 + p-TAG) and wrap them into a DIV (article, section …).

I once called it (in another thread) reverse engineering. That’s in fact a strong (visual) tool no other application really has. And it’s important for people writing their projects from scratch (content-first).

This theoretically would make the “code editor behaviour” less important.

BTW:

Some things - let’s say b - can be solved by this:

 ![38](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/7/73da903bf4148bc8a70842ecb9e606c22594dba0.png)

Cheers

Thomas

---

<div class="post-metadata">

**Author:** ![paulmarshall](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@paulmarshall](https://forum.pinegrow.com/u/paulmarshall)\
**Post date:** [November 4, 2019, 3:28pm UTC](https://forum.pinegrow.com/t/editor-auto-complete-option/3484/8 "2019-11-04T15:28:37Z")

</div>

I know bold can be done that way in the visual editor and I do, I was just using it as a simple example of what happens in the code editor.
