Ask coding questions

← Back to all posts
How Can I Make A Tabbed IDE?
Battledash2 (79)

Hello! Recently (about a week or so) ago I made a html ide/editor and the syntax highlighting is ok but there are problems with it. I'm not too focused on that right now what I need is to make it automatically tab for me when I press return/enter. I made pressing tab work but what if you don't wanna put a billion tabs?

So Basically I need it to auto indent for me.

Any help would be appreciated!

If you wanna help with the syntax highlighting you can help with that too :D

Coder100 (16967)

Well, that's not really super simple to do, it would be easier to first get code-intelligence before you can add the tabs, because like if you had this:


it wouldn't actually tab correctly unless it knew where in HTML it would be.

Battledash2 (79)

I know it would be hard but I'm up for the challenge :D @Coder100

Coder100 (16967)

coolio, well I wish you luck! @Battledash2

Battledash2 (79)

function hi()

<script> function hi() </script>

function hi()

<script> function </script>

In and you’ll see the problem. I think I know a fix to this [email protected]

Coder100 (16967)

it's a super weird bug tho, are you using regex? @Battledash2

Battledash2 (79)

Yup, I could group it and use the lazy operator to fix it though. Just on mobile rn

Edit: I’ll login to CPanel and fix it but idk if I can with this tiny screen lol @Coder100

Coder100 (16967)

oh wait not hosted in plz send repl @Battledash2

Battledash2 (79)

oh u need me to *host it Ok? There is something called inspect tho @Coder100

Battledash2 (79)

The whole editor is broken for some reason :/

It Says:

script.js:52 Uncaught TypeError: Cannot read property 'replace' of undefined
    at highlightJs (script.js:52)
    at String.replace (<anonymous>)
    at mainHighlight (script.js:40)
    at window.onload (script.js:132)


Battledash2 (79)

and how do i make code blocks? when i put 3 backticks then code and after the code i put another 3 backticks it doesnt [email protected]

Edit: nvm i found out how

Battledash2 (79)

plz stop saying 'wat' and try to understand what i'm saying :/ @Coder100