# New code editor in editor 2 launched!

**URL:** <https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877>\
**Category:** Announcements\
**Created:** [December 20, 2017, 10:42am UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877 "2017-12-20T10:42:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erik\_Angelin](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/e/59ef9b/32.png) [@Erik\_Angelin](https://forum.defold.com/u/Erik_Angelin)\
**Post date:** [December 20, 2017, 10:42am UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/1 "2017-12-20T10:42:35Z")

</div>

The latest editor 2 update contains a new code editor!

Apart from fixing a slew of bugs this adds:

- multiple cursors
- minimap
- better syntax highlighting
- better performance for large files

Perhaps most importantly, since this is built from scratch by us we are in a much better position for improving it further.

Some keybindings have changed, so please have a look in the Edit and View menus.

We’ve used the editor internally for a while and now look forward to your feedback!

Report any issues to [GitHub - defold/editor2-issues: DEPRECATED · GitHub](https://github.com/defold/editor2-issues) as usual.

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [December 20, 2017, 10:51am UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/2 "2017-12-20T10:51:05Z")

</div>

Great news! Thanks!  
Is it possible to replace Tab to 2 or 4 spaces?

---

<div class="post-metadata">

**Author:** ![Erik\_Angelin](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/e/59ef9b/32.png) [@Erik\_Angelin](https://forum.defold.com/u/Erik_Angelin)\
**Post date:** [December 20, 2017, 10:56am UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/3 "2017-12-20T10:56:23Z")

</div>

First feature request 🙂

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [December 20, 2017, 11:30am UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/4 "2017-12-20T11:30:18Z")

</div>

> [@AGulev](#):
>
> Is it possible to replace Tab to 2 or 3 spaces?

Oh no, you’re one of them…

😉

---

<div class="post-metadata">

**Author:** ![sicher](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/sicher/32/8_2.png) [@sicher](https://forum.defold.com/u/sicher)\
**Post date:** [December 20, 2017, 11:38am UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/5 "2017-12-20T11:38:09Z")

</div>

> [@Erik\_Angelin](#):
>
> better performance for large files

This is a GROSS understatement… 🙂

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [December 20, 2017, 11:40am UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/6 "2017-12-20T11:40:41Z")

</div>

=))

![](https://img.youtube.com/vi/SsoOG6ZeyUI/maxresdefault.jpg)https://www.youtube.com/embed/SsoOG6ZeyUI?feature=oembed&wmode=opaque

Nope ) It doesn’t matter for me, but in Atom by default spaces. And whole my previous code was wrote in Atom. I have two options:

1. Change whole project
2. Change some settings in editor to use spaces like in project now.

Would be great if new Editor has something like Atom Beautify with the same options (change code style (beautify code) by hot keys or everytime with save)

@Erik_Angelin  
I think this my feature request can be closed :  
[https://github.com/defold/editor2-issues/issues/401](https://github.com/defold/editor2-issues/issues/401)

---

<div class="post-metadata">

**Author:** ![d954mas](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/d954mas/32/5401_2.png) [@d954mas](https://forum.defold.com/u/d954mas)\
**Post date:** [December 20, 2017, 12:02pm UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/7 "2017-12-20T12:02:51Z")

</div>

Awesome. Look like autocomplete work much better. 👌 But i have problems with tabs. [Code editor tabs problem · Issue #1496 · defold/editor2-issues · GitHub](https://github.com/defold/editor2-issues/issues/1496)

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [December 20, 2017, 12:16pm UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/8 "2017-12-20T12:16:03Z")

</div>

> [@d954mas](#):
>
> But i have problems with tabs.

Same here after the latest update. Ping @Erik_Angelin and @Ragnar_Dahlen!

---

<div class="post-metadata">

**Author:** ![Erik\_Angelin](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/e/59ef9b/32.png) [@Erik\_Angelin](https://forum.defold.com/u/Erik_Angelin)\
**Post date:** [December 20, 2017, 12:25pm UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/9 "2017-12-20T12:25:47Z")

</div>

We’re on it!

---

<div class="post-metadata">

**Author:** ![Erik\_Angelin](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/e/59ef9b/32.png) [@Erik\_Angelin](https://forum.defold.com/u/Erik_Angelin)\
**Post date:** [December 20, 2017, 12:52pm UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/10 "2017-12-20T12:52:16Z")

</div>

Fix merged. Sorry 'bout that!

---

<div class="post-metadata">

**Author:** ![cubixpix](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/cubixpix/32/7177_2.png) [@cubixpix](https://forum.defold.com/u/cubixpix)\
**Post date:** [December 20, 2017, 12:52pm UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/11 "2017-12-20T12:52:34Z")

</div>

Nice, but weren’t you supposed to be on holidays ? 🙂

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [December 20, 2017, 1:08pm UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/12 "2017-12-20T13:08:54Z")

</div>

Awesome! Excited to see how it continues to improve.

I agree about adding support for making tab create a number of spaces as an option.

Could you post a screenshot of how the text editor looks on Mac? On Windows the text is kind of fuzzy.

Here is comparison of sublime 3

 ![crisp](https://forum-defold-uploads.b-cdn.net/original/2X/6/6c7ec834ce104c5403af4eb7b40a860bd2f92e47.png)

 ![text](https://forum-defold-uploads.b-cdn.net/original/2X/8/864e4830e5e02249e8ce4cd41e00131c85bcf670.png)

Maybe part of it is the colors?

---

<div class="post-metadata">

**Author:** ![andreas.strangequest](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/andreas.strangequest/32/3622_2.png) [@andreas.strangequest](https://forum.defold.com/u/andreas.strangequest)\
**Post date:** [December 20, 2017, 1:45pm UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/13 "2017-12-20T13:45:35Z")

</div>

An excellent update! Ho ho!  
Lots of goodies in this one.

Only thing I can see is behaving a little bit weird is the reindent lines that is not considering all indent cases (like function())

---

<div class="post-metadata">

**Author:** ![ross.grams](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/r/cab0a1/32.png) [@ross.grams](https://forum.defold.com/u/ross.grams)\
**Post date:** [December 20, 2017, 1:52pm UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/14 "2017-12-20T13:52:34Z")

</div>

Awesome, so much better! I got the tab fix here a little while ago.

- I’m very thankful for the options to toggle the minimap, indentation guides, and visible whitespace – all great features, but nice to have a choice. (sometimes the minimap just gets in the way, etc. )
- The matching word highlight when you select something is great! I have a plugin for Atom to do this and use it constantly.
- Proper autocomplete, yay! As-you-type and now it doesn’t act like it’s another window (on Windows anyway). ([this issue](https://github.com/defold/editor2-issues/issues/755) seems to be solved)
  - Autocomplete for engine message names is really nice, something the Atom package doesn’t do. (msg.post(“.”, “acquire\_input\_focus”) is so much easier to type now)

- Multiple cursors! I never expected this to get added, but I use it quite a lot in Atom. And all the multi-cursor copy-paste stuff works as it should . . . nice.
- I just noticed the matching bracket highlighting too. [Another issue closed](https://github.com/defold/editor2-issues/issues/1360).

There are still a few things that I would miss too much if I gave up Atom (I’ll report them on github), but it’s getting pretty close! Great work, thanks!

---

<div class="post-metadata">

**Author:** ![Axel](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/axel/32/11723_2.png) [@Axel](https://forum.defold.com/u/Axel)\
**Post date:** [December 20, 2017, 2:05pm UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/15 "2017-12-20T14:05:15Z")

</div>

> [@Pkeod](#):
>
> Could you post a screenshot of how the text editor looks on Mac?

Gotcha fam

Non-retina 👇

 ![23](https://forum-defold-uploads.b-cdn.net/original/2X/5/5d30bbe0c795fb35d20814d1310a95db36366963.png)

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [December 20, 2017, 2:05pm UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/16 "2017-12-20T14:05:51Z")

</div>

That looks _wayyyyy_ better than it does on Windows!

 ![compare](https://forum-defold-uploads.b-cdn.net/original/2X/e/e42933f2e28bd24d5fbeec19e359a04f19bbd46d.png)

Is this an even newer build or with some things custom?

![22](https://forum-defold-uploads.b-cdn.net/original/2X/b/b1374fba3b324149bfd8c0b6c30e29a5f95bba4a.gif)

---

<div class="post-metadata">

**Author:** ![LosJustos](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/losjustos/32/7223_2.png) [@LosJustos](https://forum.defold.com/u/LosJustos)\
**Post date:** [December 20, 2017, 6:50pm UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/17 "2017-12-20T18:50:30Z")

</div>

Nice Update!

But i cant use the ALTGR button inside the editor.  
If i want to insert @, [,], \ etc it does nothing. (german layout here)

---

<div class="post-metadata">

**Author:** ![Erik\_Angelin](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/e/59ef9b/32.png) [@Erik\_Angelin](https://forum.defold.com/u/Erik_Angelin)\
**Post date:** [December 20, 2017, 7:43pm UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/18 "2017-12-20T19:43:06Z")

</div>

Added [ALTGR does not work in the new code editor on windows [DEFEDIT-1267] · Issue #1511 · defold/editor2-issues · GitHub](https://github.com/defold/editor2-issues/issues/1511)

---

<div class="post-metadata">

**Author:** ![Erik\_Angelin](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/e/59ef9b/32.png) [@Erik\_Angelin](https://forum.defold.com/u/Erik_Angelin)\
**Post date:** [December 20, 2017, 7:44pm UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/19 "2017-12-20T19:44:19Z")

</div>

Added [Reindent lines that is not considering all indent cases (like function()) [DEFEDIT-1265] · Issue #1512 · defold/editor2-issues · GitHub](https://github.com/defold/editor2-issues/issues/1512)

---

<div class="post-metadata">

**Author:** ![chevgc](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/chevgc/32/6151_2.png) [@chevgc](https://forum.defold.com/u/chevgc)\
**Post date:** [December 21, 2017, 4:41am UTC](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877/20 "2017-12-21T04:41:59Z")

</div>

Im not sure if it was as of this update but being finally able to see my available syntax options and created variables is one of the best updates to happen. It removes alot of headache from my bad rep with creating typos. lol

[Next page](https://forum.defold.com/t/new-code-editor-in-editor-2-launched/14877.md?page=2)
