discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Abbreviations

B
buttim
Wed, Jun 8, 2016 2:27 PM

Not sure I understood the "left-alt - / " stuff. Is it in OpenSCAD's editor?

You're definitely right on cube/cylinder/sphere expansion perhaps not so
useful when using modules. Still you get rotate translate, union,
difference intersection and for still quite useful.

I thought about a single shortcut for every abbreviations but stealing a
dozen shortcuts seems not fair

On Wed, Jun 8, 2016 at 4:19 PM, rew [via OpenSCAD] <
ml-node+s1091067n17596h51@n5.nabble.com> wrote:

On Wed, Jun 08, 2016 at 09:57:42AM -0400, doug moen wrote:

Jon's response is why we need a separate config file, in order for this

to

be useable. This is a power user feature, and power users like to

configure

things.

My keyboard layout is obviously different from Jon's, since I can type
ctrl-B far more easily than hit Esc. I would personally prefer Tab for
keyword expansion, since I'm already used to that from using the bash

shell.

I'm used to "left-alt - / " to do the expansion. It expands what I've
typed so far to the closest matching string. So while editing openscad
stuff, c<leftalt-/> will probably expand to cube. Alas, not the
parentheses and brackets. To explain this some more: cl<leftalt-/>
will expand to "closest". because its' there 4 lines up.

If there is a shortcut I think I'd like alt-C to be say cube([]) with
after this the cursor inside the brackets.... Problem is that
cylinders start with a c too. :-(

IMHO, when you work with openscad, you use the primitives to make
modules you use. So quickly after starting a project you're no longer
using cubes and cylinders but higher level objects that you defined...

     Roger.

On 8 June 2016 at 09:30, jon <[hidden email]

I can type "cube([" faster than I can type "c" and then some bizarre

key

combination.  I am pleased that this feels like progress to some of

you,

but for me, it is just awkward.  I am not a complex-shortcut-key kind

of a

guy (but recognize that many of you are).  So.  Are there other

options,

such as a simpler key (like <escape>) or a delay?

Thanks for listening!

Jon

On 6/8/2016 8:43 AM, Torsten Paul wrote:

Yes, I agree the feature would be nice to have. It's not so
much about the language changing, but about the possibility
to enable/disable it (basically https://xkcd.com/1172/) and
give the option for power users to extend this by editing the
config file (I don't think there's a huge chance of getting
this easily configurable anytime soon).
The infrastructure for that is mostly there and already used
to configure the editor and render color schemes.

ciao,
Torsten.


OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=17596&i=1
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7639 / Virus Database: 4598/12382 - Release Date:

06/08/16

--
** [hidden email] http:///user/SendEmail.jtp?type=node&node=17596&i=4
** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
-- BitWizard writes Linux device drivers for any device you may have! --
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.


OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=17596&i=5
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Abbreviations-tp17583p17596.html
To unsubscribe from Abbreviations, click here
http://forum.openscad.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=17583&code=bWF1cml6aW8uYnV0dGlAZ21haWwuY29tfDE3NTgzfDE4OTg0NTUyNTk=
.
NAML
http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml

--
View this message in context: http://forum.openscad.org/Abbreviations-tp17583p17597.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Not sure I understood the "left-alt - / " stuff. Is it in OpenSCAD's editor? You're definitely right on cube/cylinder/sphere expansion perhaps not so useful when using modules. Still you get rotate translate, union, difference intersection and for still quite useful. I thought about a single shortcut for every abbreviations but stealing a dozen shortcuts seems not fair On Wed, Jun 8, 2016 at 4:19 PM, rew [via OpenSCAD] < ml-node+s1091067n17596h51@n5.nabble.com> wrote: > On Wed, Jun 08, 2016 at 09:57:42AM -0400, doug moen wrote: > > Jon's response is why we need a separate config file, in order for this > to > > be useable. This is a power user feature, and power users like to > configure > > things. > > > > My keyboard layout is obviously different from Jon's, since I can type > > ctrl-B far more easily than hit Esc. I would personally prefer Tab for > > keyword expansion, since I'm already used to that from using the bash > shell. > > I'm used to "left-alt - / " to do the expansion. It expands what I've > typed so far to the closest matching string. So while editing openscad > stuff, c<leftalt-/> will probably expand to cube. Alas, not the > parentheses and brackets. To explain this some more: cl<leftalt-/> > will expand to "closest". because its' there 4 lines up. > > If there is a shortcut I think I'd like alt-C to be say cube([]) with > after this the cursor inside the brackets.... Problem is that > cylinders start with a c too. :-( > > IMHO, when you work with openscad, you use the primitives to make > modules you use. So quickly after starting a project you're no longer > using cubes and cylinders but higher level objects that you defined... > > Roger. > > > On 8 June 2016 at 09:30, jon <[hidden email] > <http:///user/SendEmail.jtp?type=node&node=17596&i=0>> wrote: > > > > > I can type "cube([" faster than I can type "c" and then some bizarre > key > > > combination. I am pleased that this feels like progress to some of > you, > > > but for me, it is just awkward. I am not a complex-shortcut-key kind > of a > > > guy (but recognize that many of you are). So. Are there other > options, > > > such as a simpler key (like <escape>) or a delay? > > > > > > Thanks for listening! > > > > > > Jon > > > > > > > > > > > > On 6/8/2016 8:43 AM, Torsten Paul wrote: > > > > > >> Yes, I agree the feature would be nice to have. It's not so > > >> much about the language changing, but about the possibility > > >> to enable/disable it (basically https://xkcd.com/1172/) and > > >> give the option for power users to extend this by editing the > > >> config file (I don't think there's a huge chance of getting > > >> this easily configurable anytime soon). > > >> The infrastructure for that is mostly there and already used > > >> to configure the editor and render color schemes. > > >> > > >> ciao, > > >> Torsten. > > >> > > >> _______________________________________________ > > >> OpenSCAD mailing list > > >> [hidden email] <http:///user/SendEmail.jtp?type=node&node=17596&i=1> > > >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > >> > > >> > > >> > > >> ----- > > >> No virus found in this message. > > >> Checked by AVG - www.avg.com > > >> Version: 2016.0.7639 / Virus Database: 4598/12382 - Release Date: > 06/08/16 > > >> > > >> > > >> > > > > > > _______________________________________________ > > > OpenSCAD mailing list > > > [hidden email] <http:///user/SendEmail.jtp?type=node&node=17596&i=2> > > > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > > > > > > > > > > _______________________________________________ > > OpenSCAD mailing list > > [hidden email] <http:///user/SendEmail.jtp?type=node&node=17596&i=3> > > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > -- > ** [hidden email] <http:///user/SendEmail.jtp?type=node&node=17596&i=4> > ** http://www.BitWizard.nl/ ** +31-15-2600998 ** > ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** > *-- BitWizard writes Linux device drivers for any device you may have! --* > The plan was simple, like my brother-in-law Phil. But unlike > Phil, this plan just might work. > > _______________________________________________ > OpenSCAD mailing list > [hidden email] <http:///user/SendEmail.jtp?type=node&node=17596&i=5> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://forum.openscad.org/Abbreviations-tp17583p17596.html > To unsubscribe from Abbreviations, click here > <http://forum.openscad.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=17583&code=bWF1cml6aW8uYnV0dGlAZ21haWwuY29tfDE3NTgzfDE4OTg0NTUyNTk=> > . > NAML > <http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://forum.openscad.org/Abbreviations-tp17583p17597.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Wed, Jun 8, 2016 2:32 PM

Von: "Rogier Wolff" R.E.Wolff@BitWizard.nl

IMHO, when you work with openscad, you use the primitives to make
modules you use. So quickly after starting a project you're no longer
using cubes and cylinders but higher level objects that you defined...

Right, that's basically the reason why the pull request I've linked
before has 2 parts.

Autocompletion: This will probably have the built-in names first, but
should integrate later with the parser to pick up user defined modules
too.

Insert-Template: Also called snippets or similar in other editors.
This is intended to insert whole structured code snippets, e.g. for
loops but of cause could also provide simple "cube([]);" snippets.

That said, we still need to find a balance between possible features
and what is maintainable, so while I personally would find it nice
to have more advanced IDE features, it's a concern how to maintain
those in the future.

ciao,
Torsten.

Von: "Rogier Wolff" <R.E.Wolff@BitWizard.nl> > IMHO, when you work with openscad, you use the primitives to make > modules you use. So quickly after starting a project you're no longer > using cubes and cylinders but higher level objects that you defined... > Right, that's basically the reason why the pull request I've linked before has 2 parts. Autocompletion: This will probably have the built-in names first, but should integrate later with the parser to pick up user defined modules too. Insert-Template: Also called snippets or similar in other editors. This is intended to insert whole structured code snippets, e.g. for loops but of cause could also provide simple "cube([]);" snippets. That said, we still need to find a balance between possible features and what is maintainable, so while I personally would find it nice to have more advanced IDE features, it's a concern how to maintain those in the future. ciao, Torsten.
R
runsun
Wed, Jun 8, 2016 7:27 PM

jon_bondy wrote

I can type "cube([" faster than I can type "c" and then some bizarre key
combination.

I feel the same way. In a plugin to SynWrite I am working on, I use Cap-Cap
(hit cap twice) to trigger a popup menu for what's needed, so it won't
interfere the typing flow that much.


$  Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 );   $ tips: hash ( 2 ), matrix ( 2 ), sweep ( 2 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere , area , vol/center , RGB

View this message in context: http://forum.openscad.org/Abbreviations-tp17583p17605.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

jon_bondy wrote > I can type "cube([" faster than I can type "c" and then some bizarre key > combination. I feel the same way. In a plugin to SynWrite I am working on, I use Cap-Cap (hit cap twice) to trigger a popup menu for what's needed, so it won't interfere the typing flow that much. ----- $ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); &nbsp; $ tips: hash ( 2 ), matrix ( 2 ), sweep ( 2 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere , area , vol/center , RGB -- View this message in context: http://forum.openscad.org/Abbreviations-tp17583p17605.html Sent from the OpenSCAD mailing list archive at Nabble.com.
R
runsun
Wed, Jun 8, 2016 8:05 PM

buttim wrote

*Full list of abreviations (the | character is not included but shows
where
the caret will be positioned):
c cube([|]);
d difference() {\n\t|\n}
f for (i=[|]) {\n\t\n}
i intersection() {\n\t|\n}
m module |() {\n\t\n}
r rotate([|]);
s sphere(r=|);
t translate([|])
u union() {\n\t|\n}
x ,center=true|
y cylinder(r=|,h=);

Cool! Since we are here, some more ideas that I have in mind for a while:

Note that cube() can be used in the following ways:

cube();
cube(center=true);
cube(3);
cube(3, center=true);
cube([2,3,4]);
cube([2,3,4], center=true);

That is, total of 6 ways of usage. But the shortcut presented in this thread
only handles one. It would mean that if a user gets used to that shortcut,
he/she will have to manually delete [ ] to proceed in many cases.  To me it
introduces additional mental barrier: first has to remember ctrl-B, then
secondly has to remember when to and not to use ctrl-B, then if that fail,
has to spend more key strokes to clean up, which means significant slowing
down and thus a backward approach. This happens, of course, in other
function/modules.

My suggestion, therefore, is:

c ==> [TAB] => cube(size=|);  // user can either type number or [ . Note
that the argument name is shown. This will be a huge help especially for new
users.

If user types a number ==> cube(size=3|);
or a vector ==> cube( size=[2,3,4]|);

Note that the cursor is still within ( ). At this moment, hit "," brings
you:

cube(size=3, center=true|);
cube(size=[3,4,5], center=true|);

At this moment, user can hit either [TAB] or ",":

: "," will jump the cursor to the end:

cube(size=3, center=true); |
cube(size=[3,4,5], center=true); |

: and [TAB] will cycle through permitted values of the last argument:

cube(size=3, center=false|); 
cube(size=[3,4,5], center=false|); 

So this pattern, [TAB] for cycling values and "," for next argument, will
be followed in ALL function/module, making it a universal usage, no matter
if it's shortcut or not.


$  Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 );   $ tips: hash ( 2 ), matrix ( 2 ), sweep ( 2 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere , area , vol/center , RGB

View this message in context: http://forum.openscad.org/Abbreviations-tp17583p17606.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

buttim wrote > *Full list of abreviations (the | character is not included but shows > where > the caret will be positioned): > c cube([|]); > d difference() {\n\t|\n} > f for (i=[|]) {\n\t\n} > i intersection() {\n\t|\n} > m module |() {\n\t\n} > r rotate([|]); > s sphere(r=|); > t translate([|]) > u union() {\n\t|\n} > x ,center=true| > y cylinder(r=|,h=); Cool! Since we are here, some more ideas that I have in mind for a while: Note that cube() can be used in the following ways: cube(); cube(center=true); cube(3); cube(3, center=true); cube([2,3,4]); cube([2,3,4], center=true); That is, total of 6 ways of usage. But the shortcut presented in this thread only handles one. It would mean that if a user gets used to that shortcut, he/she will have to manually delete [ ] to proceed in many cases. To me it introduces additional mental barrier: first has to remember ctrl-B, then secondly has to remember when to and not to use ctrl-B, then if that fail, has to spend more key strokes to clean up, which means significant slowing down and thus a backward approach. This happens, of course, in other function/modules. My suggestion, therefore, is: c ==> [TAB] => cube(size=|); // user can either type number or [ . Note that the argument name is shown. This will be a huge help especially for new users. If user types a number ==> cube(size=3|); or a vector ==> cube( size=[2,3,4]|); Note that the cursor is still within ( ). At this moment, hit "," brings you: cube(size=3, center=true|); cube(size=[3,4,5], center=true|); At this moment, user can hit either [TAB] or ",": : "," will jump the cursor to the end: cube(size=3, center=true); | cube(size=[3,4,5], center=true); | : and [TAB] will cycle through permitted values of the last argument: cube(size=3, center=false|); cube(size=[3,4,5], center=false|); So this pattern, *[TAB] for cycling values and "," for next argument*, will be followed in ALL function/module, making it a universal usage, no matter if it's shortcut or not. ----- $ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); &nbsp; $ tips: hash ( 2 ), matrix ( 2 ), sweep ( 2 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere , area , vol/center , RGB -- View this message in context: http://forum.openscad.org/Abbreviations-tp17583p17606.html Sent from the OpenSCAD mailing list archive at Nabble.com.