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
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?
Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.