Jump to content

code line numbers


Recommended Posts

I found two posts that requested this from 2008 and some posted a few possible solutions, but they are from 2008

 

http://forums.phpfreaks.com/index.php?topic=215609.msg985474

http://forums.phpfreaks.com/index.php?topic=230395.msg1067248

 

 

Since there are a lot more options now for code highlighting could this be considered again?

 

 

Personally I would like to see a code highlighter that also format's the inputted text since most people here who post code

tend

to

write

evertything

against

the border.

 

EDIT: What's up with the editor injecting automagically?

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/265466-code-line-numbers/
Share on other sites

http://codebirth.com/index.php?topic=82.0 looks good. Does not copy line numbers when selecting, does not format though...

 

Based on Geshi, mod can be found at http://custom.simplemachines.org/mods/index.php?mod=3070 (updated 11 jan '12). Would be cool if it included a toolbar so you also could copy-to-clipboard.

 

Not many possibilities though:

http://custom.simplemachines.org/mods/index.php?action=search;basic_search=syntax+highlighting

 

The only other one in that list is (has no line numbers):

http://custom.simplemachines.org/mods/index.php?mod=2925

 

And the 3rd is only when editing themes...

 

Would it be hard to let a 3rd party plugin handle

 tags?

edit, unless I'm blind, v3 no longer has a copy to clipboard option? :(

 

Nope, got removed according to the changes page, I guess it used flash and people didn't like it.  Aparently it's been replaced by a thing where you can double-click anywhere in the code block and it will convert it to a textarea and select everything so you can just double-click then ctrl-c.

 

Seems like a nice mod, would be nice to have some line numbers for sure.

 

Seems like a nice mod, would be nice to have some line numbers for sure.

 

No mod with an auto-format option? Since most code here is indented with a random number between 1 and 8 spaces for each line.. (I intended to say something else, but I should be nice.)

 

Just look at the indentation of the code here:

http://forums.phpfreaks.com/index.php?topic=362257.msg1713875#msg1713875

 

Then compare that to:

http://forums.phpfreaks.com/index.php?topic=362257.msg1713894#msg1713894

 

I used an online PHP formatter for that.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.