cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

Add Snippets to Script Editor

If development of Script Editor will continue (and I hope it will, or hopefully JMP/SAS will create functionality/support to some other code editor) add support for code snippets. These make writing code much faster and will reduce the amount of typos. One implementation example of code snippets can be seen for example here Snippets in Visual Studio Code 

5 Comments
Status changed to: Acknowledged

Hi @jthi, thank you for your suggestion! We have captured your request and will take it under consideration.

jthi
Super User

I did write my own add-in to take care of this, but I cannot make it as good as I would like to have due to limitations of the tools available (or I just don't know how to access required functions).

In optimal case I would want to open menu like this and upon selection of snippet having preview either in separate window or even better in the current script

jthi_0-1671383887323.png

 

My add-in currently requires me to write "#snippet" to the script window

jthi_1-1671383957031.png

Then I can press the snippet shortcut Ctrl+Shift+Space to open snippet selector (search is prefilled with sql for example if user uses #snippet sql as the snippet string)

jthi_2-1671383978668.png

If I wanted to have sql snippet, I will first select it from the list box

jthi_3-1671383997449.png

and then press ok button and the #snippet will get replaced by the script seen in the snippet window

jthi_4-1671384060263.png

 

If I have enough time to work on this add-in to get it working as I want to, I think this can speed up my scripting quite a bit on repetitive tasks (and reduce mistakes) until JMP's Script Editor gets snippets.

jthi
Super User

The add-in has now been released, but I still hope JMP will provide official support to such featuresJMP Script Editor Snippets 

SamGardner
Level VII
Status changed to: Investigating
 
hogi
Level XII

Cool idea - thanks for considering
quite useful ...