beeemtee Posted March 19, 2009 Share Posted March 19, 2009 hi, could someone tell me how is it possible to use an external text editor for scripting? thanks bmt Quote Link to comment Share on other sites More sharing options...
mic Posted March 19, 2009 Share Posted March 19, 2009 hi,could someone tell me how is it possible to use an external text editor for scripting? thanks bmt http://www.sidefx.com/docs/houdini9.5/expressions/_custom Houdini uses the external editor defined by the $EDITOR environment variable. If $EDITOR is not set, Houdini uses a default editor for the platform (e.g. vi or notepad.exe). Quote Link to comment Share on other sites More sharing options...
beeemtee Posted March 19, 2009 Author Share Posted March 19, 2009 thanks! but now: 1. it only opens gvim if i click on the "external editor" button in houdini's default editor not for simple alt-e, as i expected 2. even then it doesn't load the script in hand and not even refresh it, not when i save, nor when i click on the reload button is it supposed to be like this? do i miss something? what is the common workfolw? thanks again! bmt Quote Link to comment Share on other sites More sharing options...
beeemtee Posted March 19, 2009 Author Share Posted March 19, 2009 ok it's just don't play nice with gvim. with vim it works. so i go with vim it's not such a big difference, but if someone know how to work around this i would be really grateful. thanks anyway! bmt Quote Link to comment Share on other sites More sharing options...
kubabuk Posted March 19, 2009 Share Posted March 19, 2009 There is a EDITOR variable in hconfig where you can set the path to your external text editor. Whenever you ctrl-E in houdini your code will be opened in the editor you specified. Quote Link to comment Share on other sites More sharing options...
mic Posted March 19, 2009 Share Posted March 19, 2009 There is a EDITOR variable in hconfig where you can set the path to your external text editor. Whenever you ctrl-E in houdini your code will be opened in the editor you specified. yes, and 'hconfig -a' is useful command - you can see all of your houdini variables..) Quote Link to comment Share on other sites More sharing options...
oldiesgoodies Posted March 30, 2010 Share Posted March 30, 2010 There is a EDITOR variable in hconfig where you can set the path to your external text editor. Whenever you ctrl-E in houdini your code will be opened in the editor you specified. Hi I cannot find the hconfig file. Can someone tell me where it is? thanks Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted March 30, 2010 Share Posted March 30, 2010 Hi I cannot find the hconfig file. Can someone tell me where it is? thanks hconfig is an executable, and it should be found in the same place as all your other Houdini executables for your platform (e.g: in Linux, this would be <houdini_install_path>/bin). With regards to gvim and setting it as your default external editor, this can be done, as stated above, by setting either the EDITOR or VISUAL envars. However, gvim (unlike vim) will normally fork a new process upon startup (i.e: it will run in the background). But for Houdini to be able to stream to/from it, it has to run in the foreground, so you have to disable forking. In cshell, for example, you could set it like this: setenv EDITOR "gvim --nofork" HTH. 1 Quote Link to comment Share on other sites More sharing options...
oldiesgoodies Posted March 30, 2010 Share Posted March 30, 2010 hconfig is an executable, and it should be found in the same place as all your other Houdini executables for your platform (e.g: in Linux, this would be <houdini_install_path>/bin). With regards to gvim and setting it as your default external editor, this can be done, as stated above, by setting either the EDITOR or VISUAL envars. However, gvim (unlike vim) will normally fork a new process upon startup (i.e: it will run in the background). But for Houdini to be able to stream to/from it, it has to run in the foreground, so you have to disable forking. In cshell, for example, you could set it like this: setenv EDITOR "gvim --nofork" HTH. Hi Thanks for the quick follow up. This should help me out Quote Link to comment Share on other sites More sharing options...
pushpathadam Posted April 23, 2010 Share Posted April 23, 2010 Anyone know where hconfig lives on a OsX installation? Or how to set the editor correctly to find say Applications/TextWrangler I get an error with the above string as $EDITOR. thanks Tom Hi Thanks for the quick follow up. This should help me out Quote Link to comment Share on other sites More sharing options...
old school Posted April 26, 2010 Share Posted April 26, 2010 On the Mac using the Terminal app, I create a new shell just for houdini set up to properly source the houdini env. In the Shell area, turn on the Run Command option and put in the following string: cd /Library/Frameworks/Houdini.framework/Versions/10.0.595/Resources;source houdini_setup; cd ~ where the 10.0.595 would be replaced with the version you have installed. Launch this shell, then type in the hconfig -ap to see the env that Houdini creates on launch. Quote Link to comment Share on other sites More sharing options...
Macha Posted May 21, 2010 Share Posted May 21, 2010 Has anybody tried this with the Netbeans editor (windows)? I tried but nothing happens. Maybe I missed something. Quote Link to comment Share on other sites More sharing options...
kursad Posted June 21, 2010 Share Posted June 21, 2010 Anyone know where hconfig lives on a OsX installation? Or how to set the editor correctly to find say Applications/TextWrangler I get an error with the above string as $EDITOR. thanks Tom Try setting it up in your "houdini.env" Quote Link to comment Share on other sites More sharing options...
pushpathadam Posted June 24, 2010 Share Posted June 24, 2010 Try setting it up in your "houdini.env" I did set it in the houdini.env as EDITOR = /Applications/Textwrangler.app When I hit the external editor button in the expression editor window I get this error: Spawn Error: : Permission denied Error running /Applications/Textwrangler.app Argument list: 0: /Applications/Textwrangler.app 1: /tmp/hfs11156-134.tmp.str -Tom P Quote Link to comment Share on other sites More sharing options...
pushpathadam Posted June 25, 2010 Share Posted June 25, 2010 Regarding hconfig and the houdini.env file. I was also looking at the houdini.env file in win xp. I tried to define JOB= $HOME/Job same way I have it working in osx. Having no luck what so ever. I was modifying the file in HOME%\houdiniX.X\houdini.env Is this correct? The docs are a bit sparse .. http://www.sidefx.com/docs/houdini10.0/basics/config_env thanks Tom Quote Link to comment Share on other sites More sharing options...
fxrod Posted July 12, 2010 Share Posted July 12, 2010 Using the Mac Terminal is great, Jeff, thanks! I tried to set the env in my houdini.env file on my Mac in the following dir. $HOME/Library/Preferences/houdini/10.0/houdini.env I entered the following, based on Mario's post. setenv EDITOR = "/usr/local/bin/gvim --nofork" However, when I try to edit VEX code from the Type Properties window, I get a blank session of vim and none of the code. Is there any other way to confirm that it's expecting to use gvim? I was hoping it wouldn't fork. Thanks, Frankie Quote Link to comment Share on other sites More sharing options...
fxrod Posted July 12, 2010 Share Posted July 12, 2010 I entered the following, based on Mario's post. setenv EDITOR = "/usr/local/bin/gvim --nofork" Correction... EDITOR = "/usr/local/bin/gvim --nofork" In my shell, I ran the help for EDITOR. hconfig -h EDITOR This mentioned that if the VISUAL environment variable is turned on, the EDITOR env var will not work. So, I went to my .cshrc file and removed the VISUAL env var, and it still didn't work.. Any help is appreciated. Quote Link to comment Share on other sites More sharing options...
fxrod Posted July 14, 2010 Share Posted July 14, 2010 Side FX has replicated the problem and has submitted a bug. If/when it gets fixed, I will post back. Quote Link to comment Share on other sites More sharing options...
Macha Posted May 1, 2012 Share Posted May 1, 2012 old thread, but any news on this? I'm trying to get get TextWrangler running as an external editor on a mac but no luck. Quote Link to comment Share on other sites More sharing options...
edward Posted May 1, 2012 Share Posted May 1, 2012 I don't have a Mac handy but I don't see why it shouldn't work. Test running "TextWrangler.app test.txt" in a shell first and see if that works. Ensure that it does not fork. Secondly, if it's a graphical text editor, then you should set VISUAL, not EDITOR. For the record, this what I have: EDITOR = "vim" VISUAL = "gvim -f" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.