Jamie, it's time, I believe, to add code highlights for all conf files that you can edit using Webmin/Virtualmin.
I personally do a lot of it and it makes my head literally go dizzy reading through that un-highlighted texts!
Something like this would be perfect!! http://www.sublimetext.com/forum/viewtopic.php?f=3&t=856
Is this possible? It would be appreciated with most people, I think!
Status:
Active
Comments
Submitted by JamieCameron on Wed, 01/22/2014 - 13:07 Comment #1
Does that package you linked to support highlighting in text boxes in the browser though? If not, Webmin/Virtualmin can't really use it.
No, just an example! There are a lot of example of code highlights using HTML:
http://wordpress.org/plugins/tags/code-highlighter
Submitted by JamieCameron on Wed, 01/22/2014 - 16:59 Comment #3
I'll have a look into this. However, since Webmin is designed to protect you from having to edit config files manually, it isn't a very high priority.
Also, I suspect that most syntax highlighters are designed for languages like C, Perl, Python and HTML - not the obscure config formats used by Apache, BIND and so on.
Well probably, but it's not that important as as long as it's highlighted your brain will do most of the work. :) It's also important to have line number on the left.
Jamie, with all respect to your uncomparable work - there is nothing better than editing config files manually.
There is no reason to limit other users to edit config files with comfort - they anyway will! It's better if they use Webmin/Virtualmin, I suppose!
Submitted by JamieCameron on Thu, 01/23/2014 - 12:31 Comment #6
The issue is that it isn't really possible to have a "generic" highlighter - the highlighting code would need to know the format of each config file so it can parse it properly.
Ok, Jamie! I have tested it a little bit and it seems that you're right!
But I still have a solution. Having the following would be more than enough for Webmin/Virtualmin in-build code editor:
Having only this drastically change editing experience!!
Could you please implement this?
Submitted by JamieCameron on Fri, 01/24/2014 - 12:41 Comment #8
I'll take a look. If you could point to a simple JS library that can just be added to an existing text box to add this, it would greatly speed up the process.
Sure, Jamie, here is one amazing one fully in JS: http://alexgorbatchev.com/SyntaxHighlighter/
GitHub: https://github.com/alexgorbatchev/SyntaxHighlighter
or Google Code Prettify: http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html
Looks good? :)
Submitted by JamieCameron on Fri, 01/24/2014 - 22:46 Comment #10
Those are nice, but they only apply to static text on a web page - not an editable text box.
Jamie, you're right!
Than you should look at these:
Respectfully, Ilia
Submitted by JamieCameron on Sat, 01/25/2014 - 20:35 Comment #12
Cool - I'll take a look at those. Hopefully they have compatible licences..
Codemirror is MIT licensed. You can reuse it as much as you want even in proprietary software
Codepress is LGPLv2.
editArea and Ace are just like Webmin, under BSD license - (LGPL, Apche and BSD licenses) and BSD accordingly.
I would like to ask about this code highlight feature? Any luck with this? It's not implemented yet, right? Or I have missed something?
Thanks, Ilia
Submitted by JamieCameron on Sat, 09/13/2014 - 10:50 Comment #15
No, we haven't looked into this much yet.
It's alright I have just added support for this in my theme. https://github.com/qooob/authentic-theme
Jamie, what do you think in general about my work in general and config highlights in particular? ;)