AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Syntaxhighlighter for AHK Code for phpbb

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat
View previous topic :: View next topic  
Author Message
AGU
Guest





PostPosted: Wed Nov 09, 2005 6:43 pm    Post subject: Syntaxhighlighter for AHK Code for phpbb Reply with quote

What about adding / creating / modifying a code highlighter for phpbb that displays the pasted ahk code inside [code] tags in different colors.

just an idea. Mr. Green
Back to top
BoBo
Guest





PostPosted: Wed Nov 09, 2005 10:17 pm    Post subject: Reply with quote

If you use the quote-option it works already that way (beside the anoying fact that any indent is getting lost).
Back to top
AGU
Guest





PostPosted: Thu Nov 10, 2005 1:24 am    Post subject: Reply with quote

Yeah, but apart from the lost indentation you have to attach the colors line by line yourself. A rarther annoying job. A highlighter would do that automatically.

Doing a little Google search revealed these two pages to me:
http://qbnz.com/highlighter/
http://sourceforge.net/projects/geshi-phpbb/

Can't it be easily adjusted to display colored Autohotkey code? Isn't here somebody onboard Wink that knows a little bit about customizing software?
Wouldn't it be nice to read "Autohotkey" in the list of supported languages? Mr. Green

And what does Chris think about this?
Back to top
AGU
Guest





PostPosted: Thu Nov 10, 2005 1:29 am    Post subject: Reply with quote

Will one of the moderators be so kind to change the posting title to s.th. more meaningful like "Syntaxhighlighter for AHK Code" or s.th. like this.

Thx. Smile
Back to top
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Thu Nov 10, 2005 9:15 am    Post subject: Reply with quote

Does this title appeal better?
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
BoBo
Guest





PostPosted: Thu Nov 10, 2005 10:47 am    Post subject: Reply with quote

Wow. GeSHi - Generic Syntax Highlighter (link above) that's it !
Very Happy
Back to top
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Thu Nov 10, 2005 11:26 am    Post subject: Reply with quote

To create a language file should not be a problem. I could mod the UltraEdit code I wrote to do it.
I only worry that it will cause more problem (since it is alpha) then having a nice look. Although I like it very much in my UltraEdit.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Thu Nov 10, 2005 11:32 am    Post subject: Reply with quote

I think it is a nice gimic. But it is up to the admins to decide.

It is a nice-to-have feature, but if it is unstable/buggy/riscy/to much hassle I would forget about it. I wouldn't risc data loss.

I always copy code to my editor, having highlighning there.

It is a little bit like the emoticons. You do not really need them. But it is fun (for a lot of people).
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Thu Nov 10, 2005 11:38 am    Post subject: Reply with quote

The only backdraw I see is, that you have to use tabs for indentations in your code. Personnaly I prefer spaces. But that is just my taste and I can quickly change the spaces to tabs with AutoSyntaxTidy. :)
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
BoBo
Guest





PostPosted: Thu Nov 10, 2005 11:41 am    Post subject: Reply with quote

It's at chapter 4 [HowTo create a GeSHI language file]
Back to top
AGU
Guest





PostPosted: Fri Nov 11, 2005 2:09 pm    Post subject: Reply with quote

Quote:
The only backdraw I see is, that you have to use tabs for indentations in your code.
Where have you read this? The only section where I've read about Tabs instead of spaces was about the conventions writing the language file.
Quote:
There are several conventions that are used in language files. For ease of use and readability, your language files should obey the following rules:

* Indentation is in tabs, not spaces: Use tabs! There's no excuse for using spaces in this day and age, where almost every good editor allows you to change the tab width. Tabs also take up less space, and ensure proper alignment. When you indent, use tabs, and if your editor converts tabs to spaces, tell it not to.


The other position within the docs just proposes to use Tabs instead of spaces within your code because a tab is one char to save, but spaces need to be saved char by char as "nbsp;" They only worry about the code size. But they don't forbid spaces within the code. That's the way I understand it. Wink
Quote:
The <pre> header is the default. If you're familiar with HTML you'll know that whitespace is rendered "as is" by a <pre> element. The advantage for you is that if you use <pre> the whitespace you use will appear pretty much exactly how it is in the source, and what's more GeSHi won't have to add a whole lot of <br />'s and non-breaking spaces (&nbsp;) to your code to indent it. This saves you source code (and your valuable visitors waiting time and your bandwidth)
Back to top
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Fri Nov 11, 2005 9:30 pm    Post subject: Reply with quote

I'm sorry, I must have misinterpreted the text. I hope you are right.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group