Simple External Editor Support?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Simple External Editor Support?

Zach Smith
Heya,

I had an idea for simple support for an external editor:  Just have openscad check the currently open file each time the window receives focus.  If the file has been changed or modified, it automatically reloads it and then the user can do an F5 or F6 to preview/compile.  It would probably be good to have a way to turn this functionality on/off, and defaulting to off for new users.

Pros:
* compatible with every editor ever made (or will be made)
* simple and intuitive (edit, alt-tab to openscad, compile, repeat)
* no app/OS specific code to write

Cons:
* not integrated with your app (ie: no building from eclipse directly)

Zach
Reply | Threaded
Open this post in threaded view
|

Re: Simple External Editor Support?

Elmo Mäntynen


Zach Smith wrote:
> Heya,
>
> I had an idea for simple support for an external editor:  Just have
> openscad check the currently open file each time the window receives
> focus.  If the file has been changed or modified, it automatically
> reloads it and then the user can do an F5 or F6 to preview/compile.  It
> would probably be good to have a way to turn this functionality on/off,
> and defaulting to off for new users.

Another option for automatic compiling upon focus, would make it nicer even.

Elmo

> Pros:
> * compatible with every editor ever made (or will be made)
> * simple and intuitive (edit, alt-tab to openscad, compile, repeat)
> * no app/OS specific code to write
>
> Cons:
> * not integrated with your app (ie: no building from eclipse directly)
>
> Zach
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: Simple External Editor Support?

kintel
Administrator
In reply to this post by Zach Smith
..another simple idea would be to do like Arduino - have an "external  
editor" preferences flag which simply sets the editor to read-only and  
makes F5 and F6 always reload.

~/= Marius

--
We are Elektropeople for a better living.





Reply | Threaded
Open this post in threaded view
|

Re: Simple External Editor Support?

Zach Smith
i like it!

On Mon, Feb 15, 2010 at 11:28 AM, Marius Kintel <[hidden email]> wrote:
..another simple idea would be to do like Arduino - have an "external
editor" preferences flag which simply sets the editor to read-only and
makes F5 and F6 always reload.

~/= Marius

--
We are Elektropeople for a better living.




_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: Simple External Editor Support?

Clifford Wolf
In reply to this post by Zach Smith
Reply | Threaded
Open this post in threaded view
|

Re: Simple External Editor Support?

kintel
Administrator
On Feb 15, 2010, at 18:09 , Clifford Wolf wrote:
>
> This is already implemented simply press F4 instead of F5.
>

 From a GUI point of view, making it harder to mistype anything is  
good, so I still think such a flag would make sense. We could also  
combine this with the "hide editor" function.

~/= Marius

--
We are Elektropeople for a better living.





Reply | Threaded
Open this post in threaded view
|

Re: Simple External Editor Support?

FranTaylor
emacs mode!  They've already done most of the work for you.

Why bother writing and maintaining editor code?

This is precisely what emacs modes are for.  You get syntax coloring,
automatic tabbing, and the ability to fire up an external
compiler/interpreter and it's all built in.    You can even parse the
error messages and relate them to the problematic line of source.

It's all there already, you just have to fill in the hooks.