Notifications
Clear all

[Closed] CgTalk Indenting

How does one indent their code properly in a CGTalk post?

Everybody but me seems to be able to use tabs. What’s the trick?

If I copy out of Wordpad, all indentation goes away, same with straight out of the mxs editor:

 Fn Function = 
(
 
Code
 
)

If I do it in notepad I get closer but it only uses like 2 spaces:

Fn Function = 
(
 Code
)

 

If I use the built in indentation tools most of the time it creates big gaps:

 
Fn Function =  


(Code)
11 Replies
 rdg

copy-paste from max …


		fn beautify = (
			return false
		)

?

 PEN

Not a problem for me when copying from the mxs editor.

In the OP’s 3rd example that’s exactly what I get when I paste from mxs editor. Big double

spaces between each line.

-Colin


      fn postcommenttocgtalk str
      (
      	format "[cde]
"+str+"
[/cde]
      )
      postcommenttocgtalk "Sometimes I get a double carriage return. no problem with tabs though. if I have any formatting problems I  copy paste to notepad first."
      
J.

macroScript addselect category:“Edit” ButtonText:“AddSelection” ToolTip:“Adds to Selection”

(

global addSelecton

global sel = selection as array

if addSelecton != true then

(

callbacks.addscript #selectionsetchanged “if keyboard.controlpressed == true then (selectmore sel; sel = selection as array;); sel = selection as array” id:#pickadder

addselecton = true

)

else

(

callbacks.removescripts #selectionsetchanged id:#pickadder

addselecton = false

)

)

This is what I get when I copy/paste straight out of the mxs editor.

 PEN

So you get colour? I don’t get that, but I do get tabs.

I get tabs, but no color when pasting straight from MXS editor. Are you using XP or Vista? Maybe Vista’s clipboard saves the rtf tags or something.

 PEN

Well I’m on XP

XP here too. Just tried it in Max 8 and 9. Exact same result.

Page 1 / 2