YS
Yuri Schaeffer
Fri, Mar 20, 2015 10:44 AM
As a hobby project of mine in the last few weeks I made an alternative
editor for scad files. Its main goal is to allow for quicker model
building and to provide more context help. I made it to scratch my own
itch, but it is in a state that it might even be interesting for someone
else.
Especially if you are a terminal junky I think it can make you happy.
See attached file for a screenshot.
project and manual can be found here:
https://github.com/yschaeff/pscad
Its main features are:
- automatically write file so OpenSCAD can monitor for changes and
render live.
- One key document tree editing (eg press 'I' to encapsulate current
selection in 'intersection() {...})
- Copy/paste mechanism
- Undo/redo
- syntax highlighting
- formatting aid
- (limited) syntax checking
- Indentation as part of syntax
- tab completion
- VI inspired key combinations
future goals:
- provide default arguments for various statements.
- context help for arguments
- help screen
non-goals:
- Does not know about semantics (it can write silly scad files if you
ask it to, but they will always be syntactically correct)
- Does not mimic VI key combinations completely.
As a hobby project of mine in the last few weeks I made an alternative
editor for scad files. Its main goal is to allow for quicker model
building and to provide more context help. I made it to scratch my own
itch, but it is in a state that it might even be interesting for someone
else.
Especially if you are a terminal junky I think it can make you happy.
See attached file for a screenshot.
project and manual can be found here:
https://github.com/yschaeff/pscad
Its main features are:
- automatically write file so OpenSCAD can monitor for changes and
render live.
- One key document tree editing (eg press 'I' to encapsulate current
selection in 'intersection() {...})
- Copy/paste mechanism
- Undo/redo
- syntax highlighting
- formatting aid
- (limited) syntax checking
- Indentation as part of syntax
- tab completion
- VI inspired key combinations
future goals:
- provide default arguments for various statements.
- context help for arguments
- help screen
non-goals:
- Does not know about semantics (it can write silly scad files if you
ask it to, but they will always be syntactically correct)
- Does not mimic VI key combinations completely.
J
jon
Fri, Mar 20, 2015 12:37 PM
This looks cool. Are the syntax and formatting rules accessible? Can
the colors be changed easily? Can this be integrated into OpenSCAD at
some point, as was the other editor?
Jon
On 3/20/2015 6:44 AM, Yuri Schaeffer wrote:
As a hobby project of mine in the last few weeks I made an alternative
editor for scad files. Its main goal is to allow for quicker model
building and to provide more context help. I made it to scratch my own
itch, but it is in a state that it might even be interesting for someone
else.
Especially if you are a terminal junky I think it can make you happy.
See attached file for a screenshot.
project and manual can be found here:
https://github.com/yschaeff/pscad
Its main features are:
- automatically write file so OpenSCAD can monitor for changes and
render live.
- One key document tree editing (eg press 'I' to encapsulate current
selection in 'intersection() {...})
- Copy/paste mechanism
- Undo/redo
- syntax highlighting
- formatting aid
- (limited) syntax checking
- Indentation as part of syntax
- tab completion
- VI inspired key combinations
future goals:
- provide default arguments for various statements.
- context help for arguments
- help screen
non-goals:
- Does not know about semantics (it can write silly scad files if you
ask it to, but they will always be syntactically correct)
- Does not mimic VI key combinations completely.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5751 / Virus Database: 4311/9342 - Release Date: 03/20/15
This looks cool. Are the syntax and formatting rules accessible? Can
the colors be changed easily? Can this be integrated into OpenSCAD at
some point, as was the other editor?
Jon
On 3/20/2015 6:44 AM, Yuri Schaeffer wrote:
> As a hobby project of mine in the last few weeks I made an alternative
> editor for scad files. Its main goal is to allow for quicker model
> building and to provide more context help. I made it to scratch my own
> itch, but it is in a state that it might even be interesting for someone
> else.
>
> Especially if you are a terminal junky I think it can make you happy.
> See attached file for a screenshot.
>
> project and manual can be found here:
> https://github.com/yschaeff/pscad
>
> Its main features are:
> - automatically write file so OpenSCAD can monitor for changes and
> render live.
> - One key document tree editing (eg press 'I' to encapsulate current
> selection in 'intersection() {...})
> - Copy/paste mechanism
> - Undo/redo
> - syntax highlighting
> - formatting aid
> - (limited) syntax checking
> - Indentation as part of syntax
> - tab completion
> - VI inspired key combinations
>
> future goals:
> - provide default arguments for various statements.
> - context help for arguments
> - help screen
>
> non-goals:
> - Does not know about semantics (it can write silly scad files if you
> ask it to, but they will always be syntactically correct)
> - Does not mimic VI key combinations completely.
>
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2015.0.5751 / Virus Database: 4311/9342 - Release Date: 03/20/15
YS
Yuri Schaeffer
Fri, Mar 20, 2015 1:47 PM
This looks cool. Are the syntax and formatting rules accessible?
Syntax: Would you wish that? Is the scad syntax likely to change?
Formatting: well no. Not unless you know python. Though it'd be possible
to make certain things configurable. The only application I can think of
is different use of whitespace (indent width etc). Is that what you are
thinking of?
Can
the colors be changed easily?
Yes, pscad.py:17 contains a palette.
palette = [
## selections
('edit', 'white,underline', ''),
('edit_select', 'white,underline', 'dark blue'),
('edit_suggest', 'brown,bold', 'dark blue'),
('error', 'white', 'dark red'),
('error_select', 'white', 'dark red'),
('select', 'white', 'dark blue'),
## misc
('status', 'white,standout', 'black'),
('bg', 'white', ''),
## text
(COMMENT, 'dark cyan', ''),
(MODIFIER, 'brown,bold', ''),
('var', 'white', ''),
('=', 'dark red', ''),
('(', 'dark red', ''),
(')', 'dark red', ''),
('<', 'dark red', ''),
('>', 'dark red', ''),
(SPACE, 'default', ''),
('stat', 'default', ''),
(ARGUMENT, 'default', ''),
('path', 'default', ''),
('name', 'default,bold', ''),
('keyword', 'dark blue,bold', ''),
]
This would be relatively easy to get from a config file.
Can this be integrated into OpenSCAD at
some point, as was the other editor?
Sorry. I don't know. That was never my intention (and I suspect only a
niche will have interest for this style of interface?), I don't even
know what language OpenSCAD is written in. ;)
Thank you for your feedback!
> This looks cool. Are the syntax and formatting rules accessible?
Syntax: Would you wish that? Is the scad syntax likely to change?
Formatting: well no. Not unless you know python. Though it'd be possible
to make certain things configurable. The only application I can think of
is different use of whitespace (indent width etc). Is that what you are
thinking of?
> Can
> the colors be changed easily?
Yes, pscad.py:17 contains a palette.
palette = [
## selections
('edit', 'white,underline', ''),
('edit_select', 'white,underline', 'dark blue'),
('edit_suggest', 'brown,bold', 'dark blue'),
('error', 'white', 'dark red'),
('error_select', 'white', 'dark red'),
('select', 'white', 'dark blue'),
## misc
('status', 'white,standout', 'black'),
('bg', 'white', ''),
## text
(COMMENT, 'dark cyan', ''),
(MODIFIER, 'brown,bold', ''),
('var', 'white', ''),
('=', 'dark red', ''),
('(', 'dark red', ''),
(')', 'dark red', ''),
('<', 'dark red', ''),
('>', 'dark red', ''),
(SPACE, 'default', ''),
('stat', 'default', ''),
(ARGUMENT, 'default', ''),
('path', 'default', ''),
('name', 'default,bold', ''),
('keyword', 'dark blue,bold', ''),
]
This would be relatively easy to get from a config file.
> Can this be integrated into OpenSCAD at
> some point, as was the other editor?
Sorry. I don't know. That was never my intention (and I suspect only a
niche will have interest for this style of interface?), I don't even
know what language OpenSCAD is written in. ;)
Thank you for your feedback!
J
jon
Fri, Mar 20, 2015 1:50 PM
I like to format things slightly different than anyone else, so I was
curious about whether I could change things slightly.
Sounds like a fun and useful project!
On 3/20/2015 9:47 AM, Yuri Schaeffer wrote:
This looks cool. Are the syntax and formatting rules accessible?
Syntax: Would you wish that? Is the scad syntax likely to change?
Formatting: well no. Not unless you know python. Though it'd be possible
to make certain things configurable. The only application I can think of
is different use of whitespace (indent width etc). Is that what you are
thinking of?
Can
the colors be changed easily?
Yes, pscad.py:17 contains a palette.
palette = [
## selections
('edit', 'white,underline', ''),
('edit_select', 'white,underline', 'dark blue'),
('edit_suggest', 'brown,bold', 'dark blue'),
('error', 'white', 'dark red'),
('error_select', 'white', 'dark red'),
('select', 'white', 'dark blue'),
## misc
('status', 'white,standout', 'black'),
('bg', 'white', ''),
## text
(COMMENT, 'dark cyan', ''),
(MODIFIER, 'brown,bold', ''),
('var', 'white', ''),
('=', 'dark red', ''),
('(', 'dark red', ''),
(')', 'dark red', ''),
('<', 'dark red', ''),
('>', 'dark red', ''),
(SPACE, 'default', ''),
('stat', 'default', ''),
(ARGUMENT, 'default', ''),
('path', 'default', ''),
('name', 'default,bold', ''),
('keyword', 'dark blue,bold', ''),
]
This would be relatively easy to get from a config file.
Can this be integrated into OpenSCAD at
some point, as was the other editor?
I like to format things slightly different than anyone else, so I was
curious about whether I could change things slightly.
Sounds like a fun and useful project!
On 3/20/2015 9:47 AM, Yuri Schaeffer wrote:
>> This looks cool. Are the syntax and formatting rules accessible?
> Syntax: Would you wish that? Is the scad syntax likely to change?
>
> Formatting: well no. Not unless you know python. Though it'd be possible
> to make certain things configurable. The only application I can think of
> is different use of whitespace (indent width etc). Is that what you are
> thinking of?
>
>> Can
>> the colors be changed easily?
> Yes, pscad.py:17 contains a palette.
>
> palette = [
> ## selections
> ('edit', 'white,underline', ''),
> ('edit_select', 'white,underline', 'dark blue'),
> ('edit_suggest', 'brown,bold', 'dark blue'),
> ('error', 'white', 'dark red'),
> ('error_select', 'white', 'dark red'),
> ('select', 'white', 'dark blue'),
> ## misc
> ('status', 'white,standout', 'black'),
> ('bg', 'white', ''),
> ## text
> (COMMENT, 'dark cyan', ''),
> (MODIFIER, 'brown,bold', ''),
> ('var', 'white', ''),
> ('=', 'dark red', ''),
> ('(', 'dark red', ''),
> (')', 'dark red', ''),
> ('<', 'dark red', ''),
> ('>', 'dark red', ''),
> (SPACE, 'default', ''),
> ('stat', 'default', ''),
> (ARGUMENT, 'default', ''),
> ('path', 'default', ''),
> ('name', 'default,bold', ''),
> ('keyword', 'dark blue,bold', ''),
> ]
>
> This would be relatively easy to get from a config file.
>
>> Can this be integrated into OpenSCAD at
>> some point, as was the other editor?
> Sorry. I don't know. That was never my intention (and I suspect only a
> niche will have interest for this style of interface?), I don't even
> know what language OpenSCAD is written in. ;)
>
> Thank you for your feedback!
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2015.0.5751 / Virus Database: 4311/9342 - Release Date: 03/20/15
>
>
YS
Yuri Schaeffer
Fri, Mar 20, 2015 3:48 PM
I forgot to mention this project depends on the urwid python library.
You might need to install that. And thanks to Miro Hrončok there is now
a setup.py script.
download latest release:
https://github.com/yschaeff/pscad/releases/latest (pscad-0.1.tar.gz)
unzip, untar, cd into directory
run "python setup.py install"
I forgot to mention this project depends on the urwid python library.
You might need to install that. And thanks to Miro Hrončok there is now
a setup.py script.
download latest release:
https://github.com/yschaeff/pscad/releases/latest (pscad-0.1.tar.gz)
unzip, untar, cd into directory
run "python setup.py install"
CL
Chow Loong Jin
Mon, Mar 23, 2015 3:03 PM
On Fri, Mar 20, 2015 at 11:44:25AM +0100, Yuri Schaeffer wrote:
As a hobby project of mine in the last few weeks I made an alternative
editor for scad files. Its main goal is to allow for quicker model
building and to provide more context help. I made it to scratch my own
itch, but it is in a state that it might even be interesting for someone
else.
Especially if you are a terminal junky I think it can make you happy.
See attached file for a screenshot.
[...]
--
Kind regards,
Loong Jin
On Fri, Mar 20, 2015 at 11:44:25AM +0100, Yuri Schaeffer wrote:
> As a hobby project of mine in the last few weeks I made an alternative
> editor for scad files. Its main goal is to allow for quicker model
> building and to provide more context help. I made it to scratch my own
> itch, but it is in a state that it might even be interesting for someone
> else.
Hmm, out of curiosity, why not the existing vi/emacs stuff? You seem like a vi
person, based on your mimicry of the vi keybindings, so
http://www.vim.org/scripts/script.php?script_id=3556 seems like a decent
alternative.
> Especially if you are a terminal junky I think it can make you happy.
> See attached file for a screenshot.
[...]
--
Kind regards,
Loong Jin
YS
Yuri Schaeffer
Mon, Mar 23, 2015 3:40 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Well, yeah I should have been a vi person. Though I never quite
gotten the hang of it.
I tried to make something to manipulate the document tree rather than
a plain text file. From the above link I gather it is merely syntax
highlighting? For me that is one of the least important goals tbh.
Main goals:
- less typing
- spend zero time on layout
- have openscad generating a live preview
- don't have to write ", center = True" all the fucking time
The rest is sugar coating.
Not to long ago I installed an app which was an android port for
OpenSCAD. I thought that was neat! So I could whip something up during
my commute. I quickly found out the interface was not adapted for a
mobile device and now I have to write code on this crappy on-screen
keyboard. I was so angry I almost tossed my phone out of the train.
This got me thinking what would be a better interface in general and
well, that may have sparked this project.
//Yuri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlUQM/sACgkQI3PTR4mhavixMQCfZFHZPpa3ieN9zlDemSKHT0wY
6NcAoKWwUQ3vgE/AcIVbu0jWLm12PZmf
=YS41
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> Hmm, out of curiosity, why not the existing vi/emacs stuff? You
> seem like a vi person, based on your mimicry of the vi keybindings,
> so http://www.vim.org/scripts/script.php?script_id=3556 seems like
> a decent alternative.
Well, yeah I _should_ have been a vi person. Though I never quite
gotten the hang of it.
I tried to make something to manipulate the document tree rather than
a plain text file. From the above link I gather it is merely syntax
highlighting? For me that is one of the least important goals tbh.
Main goals:
- less typing
- spend zero time on layout
- have openscad generating a live preview
- don't have to write ", center = True" all the fucking time
The rest is sugar coating.
Not to long ago I installed an app which was an android port for
OpenSCAD. I thought that was neat! So I could whip something up during
my commute. I quickly found out the interface was not adapted for a
mobile device and now I have to write code on this crappy on-screen
keyboard. I was so angry I almost tossed my phone out of the train.
This got me thinking what would be a better interface in general and
well, that may have sparked this project.
//Yuri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlUQM/sACgkQI3PTR4mhavixMQCfZFHZPpa3ieN9zlDemSKHT0wY
6NcAoKWwUQ3vgE/AcIVbu0jWLm12PZmf
=YS41
-----END PGP SIGNATURE-----