Jump to content
sebkaine

Edit code / snippet directly in Sublime ?

Recommended Posts

Hi Guys,

 

I would like to know if it's possible to edit VEX / Python code located in inline / snippet directly in sublime.

 

I have setup my EDITOR var correctly :

http://forums.odforce.net/topic/8758-external-text-editor-for-scripting/

 

but at the moment when i do Alt+E the code is open in the Script Editor,

and then i need to redo a Alt+E or click on External Editor to open the code in Sublime.

 

That's a 2 step process and it's start to be boring ... :)

How would you proceed to ditch 100% the script editor, so when i do a Alt+E the code is directly open in Sublime ?

 

Thanks for your time.

 

Cheers 

 

E

 

ps : sorry for the wrong section , after double thinking this one is definitly a scripting question  :blush:

Edited by sebkaine

Share this post


Link to post
Share on other sites

anyone ? :)

 

Does i must conclude it's impossible at the moment to replace directly the script editor by an external one ?

Edited by sebkaine

Share this post


Link to post
Share on other sites

I usually do alt+e e

Quickly typing both "e" one after the other.  Not the best solution I guess, but it opens up sublime together with the expression editor at nearly the same time.

Share this post


Link to post
Share on other sites

Nice trick Bruno ! that is still optimization ! :)

 

And you kinda confirm that there are no workaround ...

 

Thanks !

Share this post


Link to post
Share on other sites

I did a bit more digging, someone (Arthur Yidi) actually made a plugin to handle it as you can read in that thread :

http://forums.odforce.net/topic/8758-external-text-editor-for-scripting/page-2

 

It works well at least with Houdini 14 (havn't tried in 15 yet), you can map the external editor to any hotkey (I used Ctrl+E) and it goes straight to your external editor, without opening the expression editor.

 

link to the plugin :

https://github.com/ArthurYidi/Houdini-External-Editor

 

Much better solution !

Edited by br1

Share this post


Link to post
Share on other sites

Thanks Bruno !

 

unfortunatly i've already try this one, and it's doesn't look to work under windows 10 + H indie 14.

- i have put the 2 .xml in C:\Users\admin\Documents\houdini14.0

- i have activated sublime in Edit > Configure External Editor.  The env var in houdini.env looks correct  :

VISUAL = ""C:\Program Files\Sublime Text 2\sublime_text.exe" -w"

- But when i go to Edit > Hotkeys...: the only things that i have is Configure External Editor which is grey and can't be modified

=> the Edit in External Editor  mention in the doc doesn't exist at all ?

 

But that's good to know that it's an option under linux/mac os.

Edited by sebkaine

Share this post


Link to post
Share on other sites

It's actually working for me with Windows (10).

After installing it, do you see that option if you right click on a text field ?

post-683-0-24905400-1448020611_thumb.jpg

 

It took me a few tries before being able to add the shortcut, but in the end it appeared in the shortcut options, I could set it and it persisted after closing/re-opening Houdini.

 

  • Like 1

Share this post


Link to post
Share on other sites

This is great Bruno ! in fact after clicking in Expression > Edit in External Editor it does activate the option in the Hotkeys ...

So now i have Sublime that open directly everywhere directly ! :)

 

Thanks again for your help Bruno !

Edited by sebkaine

Share this post


Link to post
Share on other sites

Glad it worked for you !

It's quite useful for me as well, I can now totally skip the expression editor window ! Lot's of clicks saved !

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×