Jump to content


external text editor for scripting


  • Please log in to reply
19 replies to this topic

#1 beeemtee

beeemtee

    Initiate

  • Members
  • PipPip
  • 149 posts
  • Joined: 21-February 07
  • Location:Budapest, Hungary
  • Name:Máté Birkás

Posted 19 March 2009 - 02:08 AM

hi,
could someone tell me how is it possible to use an external text editor for scripting?
thanks
bmt

#2 mic

mic

    Initiate

  • Members
  • PipPip
  • 158 posts
  • Joined: 20-July 08
  • Name:Michael Levin

Posted 19 March 2009 - 04:37 AM

View Postbeeemtee, on Mar 19 2009, 01:08 PM, said:

hi,
could someone tell me how is it possible to use an external text editor for scripting?
thanks
bmt

http://www.sidefx.co...essions/_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).

#3 beeemtee

beeemtee

    Initiate

  • Members
  • PipPip
  • 149 posts
  • Joined: 21-February 07
  • Location:Budapest, Hungary
  • Name:Máté Birkás

Posted 19 March 2009 - 05:31 AM

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

#4 beeemtee

beeemtee

    Initiate

  • Members
  • PipPip
  • 149 posts
  • Joined: 21-February 07
  • Location:Budapest, Hungary
  • Name:Máté Birkás

Posted 19 March 2009 - 05:41 AM

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

#5 kubabuk

kubabuk

    Illusionist

  • Members
  • PipPipPip
  • 393 posts
  • Joined: 15-February 05
  • Location:Oliwa
  • Name:Kuba Roth

Posted 19 March 2009 - 06:44 AM

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.

#6 mic

mic

    Initiate

  • Members
  • PipPip
  • 158 posts
  • Joined: 20-July 08
  • Name:Michael Levin

Posted 19 March 2009 - 07:20 AM

View Postkubabuk, on Mar 19 2009, 05:44 PM, said:

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..)

#7 oldiesgoodies

oldiesgoodies

    Peon

  • Members
  • Pip
  • 83 posts
  • Joined: 31-December 09
  • Location:universe
  • Name:oldie goodie

Posted 30 March 2010 - 09:55 AM

View Postkubabuk, on 19 March 2009 - 06:44 AM, said:

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

#8 Mario Marengo

Mario Marengo

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,249 posts
  • Joined: 26-June 02
  • Location:Toronto, Canada
  • Name:Mario Marengo

Posted 30 March 2010 - 10:10 AM

View Postoldiesgoodies, on 30 March 2010 - 09:55 AM, said:

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.
Mario.

#9 oldiesgoodies

oldiesgoodies

    Peon

  • Members
  • Pip
  • 83 posts
  • Joined: 31-December 09
  • Location:universe
  • Name:oldie goodie

Posted 30 March 2010 - 11:03 AM

View PostMario Marengo, on 30 March 2010 - 10:10 AM, said:

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

#10 pushpathadam

pushpathadam

    Peon

  • Members
  • Pip
  • 32 posts
  • Joined: 08-July 05
  • Location:Los Angeles
  • Name:Tom Pushpathadam

Posted 23 April 2010 - 01:09 PM

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


View Postoldiesgoodies, on 30 March 2010 - 11:03 AM, said:

Hi

Thanks for the quick follow up. This should help me out


#11 old school

old school

    Houdini Master

  • Members
  • PipPipPipPip
  • 897 posts
  • Joined: 21-March 03
  • Location:The Great White North

Posted 26 April 2010 - 03:41 AM

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.
There's at least one school like the old school!

#12 Macha

Macha

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,654 posts
  • Joined: 23-July 08
  • Location:The Small Big P
  • Name:Marc ♥

Posted 20 May 2010 - 07:07 PM

Has anybody tried this with the Netbeans editor (windows)?

I tried but nothing happens. Maybe I missed something.
My Vimeo

LinkedIn

improve side effects - use haskell





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users