If you want to use the same setup Stencyl has, set these environment variables.
HAXEPATH is a folder which contains haxe and haxelib executables (plaf/haxe)
HAXE_STD_PATH is a folder which contains the Haxe Standard Library (plaf/haxe/std)
HAXELIB_PATH is a folder which contains the installed haxelibs (plaf/haxe/lib)
NEKO_INSTPATH and NEKOPATH both point to the Neko install (Windows: plaf/neko-win, Linux: plaf/neko-linux, Mac: /usr/local/lib/neko)
PATH should include HAXEPATH
For Mac, PATH should also include /usr/local/bin (for neko)
for Linux, LD_LIBRARY_PATH should include plaf/neko-linux
It's a bit of work to set up, so I'm planning on making it easier to launch external editors through Stencyl, or generate shell scripts that fill in all the blanks for you.