Improve code editor in Card Type editor screen

Currently, the code editors in Card Type editor screen do not have line numbers, syntax highlighting, autocomplete, and other useful VS Code/IDE-esque features. It’d be great if once and for all the editor was improved to make the card creation process a breeze.

Right now it’s a pain in the bottom. We either have to look at a bunch of unindented monocolor plain text or use more complex involved setups such as anki-editor + anki-connect combo.

Thank you for your consideration!

1 Like

Since there are so many other code editors/formatters you could use to fix that, is it really worth adding this functionality to Anki?

When I get a messy template in a shared deck, it is a pretty quick fix to copy the text out into an editor, format it, and then copy back into Anki.

1 Like

If you like VS Code, there’s a handy extension that works through the Anki Connect addon. It let’s you edit templates in VS Code where by just saving the file, it updates your template Anki without needing to copy paste back and forth: Anki Editor - Visual Studio Marketplace
I use it myself and it’s solved all my gripes with template editing and I make complicated javascript-heavy templates myself.

use more complex involved setups such as anki-editor + anki-connect combo.

Edit: I didn’t notice this at first. So, I guess you already use this? What’s the problem with it?

Then there’s the option of using addons to improve the editor:

I agree with Danika that adding this functionality to Anki itself is not very useful. It’d bloat the software and people who want a powerful code editor would surely still be unsatisfied. Using third-party solutions for this is best so Anki should rather make itself easier to modify in this section of the UI and avoid breaking addons.