Hi, want to improve your experience coding in wrangles? The title may seem like an oxymoron, but hey, never say never.
So I'd like to share with you a reference document I've made to configure my external editor Sublime Text 3. It was helpful every time I migrated to a new personal or work computer. I can set things up the way I liked them in a few minutes. The editor gives you options for auto-formatting, different color schemes, auto-completion, function help cards, etc.
SideFX is also working on improving our own text editor. But in case you want to try out Sublime Text in the meantime, here is your guide.
The latest update to Sublime Text hard-bound its new Safe Mode to Alt+Shift. If like me, you previously bound Houdini's Edit in External Editor hotkey to Alt+Shift+<something>, to prevent launching from Houdini into Sublime Text Safe Mode, try rebinding the Edit in External Editor hotkey to Alt+D. It's one of those combinations that don't trigger a conflict.
This is very cool. I had no idea you could do this but I just set it up to use Visual Studio Code.
As I got tripped up on getting the external editor hot keys to work let me add to the thread as maybe it will help someone else in the future.
Where your mouse is located when you press the hotkey is very important and determines if it works or not.
Your cursor can't be typing text or the shortcut won't work. So first make sure you click out of the text box. Next when you press the shortcut make sure you are hovering your mouse over where it says "VEXpression" on like an AttWrangle node or "Python Code" on a python node, etc to launch the external editor. If you are hovering over other parts you will still open the external editor but you won't actually have a live link to the text box and are creating a new file.
i need to report a problem though, if you delete the houdini program where the external editor is set up and then reinstall the same version it would cause freeze when you press right key in the wrangle window.
I'm having trouble setting this up. I've defined Sublime both as EDITOR and as VISUAL in the houdini.env file. But I can't get it to work properly from within Houdini. For example: in the case of wrangles the keyboard shortcut doesn't work, or even if it launches the editor then changes and saving from Sublime will not work. But if I right click the vex editor and select from the menu Expression > Edit in external editor Sublime will work. It gets even more weird if I try to setup a shortcut for python editor. I'm not sure what to try next.
coccarolla ing this up. I've defined Sublime both as EDITOR and as VISUAL in the houdini.env file. But I can't get it to work properly from within Houdini. For example: in the case of wrangles the keyboard shortcut doesn't work, or even if it launches the editor then changes and saving from Sublime will not work. But if I right click the vex editor and select from the menu Expression > Edit in external editor Sublime will work. It gets even more weird if I try to setup a shortcut for python editor. I'm not sure what to try next.
airlawn solved the hotkey issue a couple of posts up. you have to click outside the text editor and then hold your mouse over the VEXPRESSION text above the text editor and then fire your hotkey. so weird. i never would have figured that out. haha.
EDIT : oddly holding my mouse over the VEXPRESSION and hitting alt-d doesn't work sometimes and it's not because the text editor is active. what appears to fix it is if i right click on the VEXPRESSION button and then click off to the grey part of the window and THEN press alt-d it works. so odd.
has anyone figured out how to get the vex code included in your #include to work with autocomplete in other text editors? i tried in both SUBLIME TEXT and VSCODE and couldn't get it with either. i also tried adding the directory my included file is in to the sublimeText/vsCode projects but that didn't fix it either.
it's so weird because if i type a function that's in the #include in sublime text and hover my mouse over it, it does know it's a function and lists where it came from, but it still doesn't work with autocomplete, which is what i really want... i have so many external functions and i can never remember their names or their arguments so i wish i had autocomplete to help with that.