How to copy paste code with colors and format Cntrl+I in university edition?

Reply
PROC Star
Posts: 1,772

How to copy paste code with colors and format Cntrl+I in university edition?

Hello Folks, 

 

How to copy paste code with colors and format Cntrl+I in university edition?Everytime I pasted the code, I seem to lose the color. Also what's the short cut to format the code like an equivalent to Cntrl+I in Enterprise guide. Any ideas please?

Super User
Super User
Posts: 8,075

Re: How to copy paste code with colors and format Cntrl+I in university edition?

Posted in reply to novinosrin

I don't think there is any way. One of the prices of building an application to run inside a browser.

 

 

Frequent Contributor
Posts: 118

Re: How to copy paste code with colors and format Cntrl+I in university edition?

Posted in reply to novinosrin

SAS University Edition does have a button to format code.  It's to the left of the button to maximize view.  The screen shot below shows the location. 

 

SAS Studio format code button.jpgFormat code button is at the top of the program window in SAS University Edition

Occasional Learner
Posts: 1

Re: How to copy paste code with colors and format Cntrl+I in university edition?

Posted in reply to SuzanneDorinski

but what does it do? 

I'm facing the same problem

Frequent Contributor
Posts: 118

Re: How to copy paste code with colors and format Cntrl+I in university edition?

The "format code" button can make a program easier to read.  

 

@ChrisHemedinger wrote a blog post about how you can do this in Enterprise Guide.  

 

In the screen shot below, I typed a bunch of SAS statements.  While you can write programs this way, it can be difficult for others to read them and understand them quickly.  

 

Messy SAS program.jpgExample of messy SAS codeAfter I press that "format code" button, the program looks like the screen shot below.  Statements are placed on separate lines, some statements are automatically indented, and blank lines are inserted between PROCs, data steps, and comments.  

 

Nicely formatted SAS code.jpgNicely formatted SAS code

Ask a Question
Discussion stats
  • 4 replies
  • 524 views
  • 2 likes
  • 4 in conversation