Code editor with different colors for different parts of the code
7 replies, posted
Is there a text editor/ide/code editor that is capable of using different themes for different parts of the code in the same file or an editor that is capable of using different colors for different parts of the of the code in the same file?
So for example in C++ it would be able to color one function mostly purple with red highlighting and a different function bright green with blue highlighting?
Not being savvy in code at all, but i'm pretty sure Notepad++ does have support for some languages?
Yeah, pretty sure Notepadd++ is basically the go-to for anything code related.
That's a really, really specific type of syntax highlighting that I don't think I've ever seen a editor implement. The closest I can think of in terms of being able to quickly visually differentiate scoped blocks is something like VS Code with the bracket pair colorizer plugin, but different syntax colours on different functions is a bit of a stretch.
Check out Visual Studio Code. For example it has some nifty parsers for Vue.js components that are basically 3 different syntaxes in a single file. Maybe you could whip up something custom for your needs.
One goofy solution that sort of works is a combination of this: https://extensions.libreoffice.org/extensions/code-highlighter
as well as Libreoffice Writer's own built in rich text features that are used in its standard editing:
https://files.facepunch.com/forum/upload/203613/c5a69688-8a17-444a-9230-e86cc80a414d/VirtualBox_Arch_17_04_2019_18_21_08.png
However it would be necessary to compile it externally.
https://i.imgur.com/vzvZqaJ.png
Notepad++ actually does support something along the lines of what you're suggesting. And in this example, when I added the style to the lower "z-index: 1000000000;" it automatically tagged the other one too. Though as you can see in the context menu, there's only five available styles to be able to use. The exact colors used for the foreground and background can be edited through Notepad++'s style configurator. (settings->style configurator)
https://atom.io/ is hugely extendable and allows you to write your own pluggins fairly easily, there's lots of good stuff on there
Sorry, you need to Log In to post a reply to this thread.