[OpenSCAD] Abbreviations

buttim maurizio.butti at gmail.com
Fri Jun 10 08:26:16 EDT 2016


I implemented the configurable abbreviation list.
Together with the patch I'm sending you an example file (equivalent to what
was previously hard coded).

The file location follows the same logic as the color schemes cfgs.

The two other features are still present:
CTRL+* to toggle current folding
CTRL+Return to complete the word preceding the cursor

On Thu, Jun 9, 2016 at 5:37 PM, tp3 [via OpenSCAD] <
ml-node+s1091067n17618h33 at n5.nabble.com> wrote:

> Von: buttim <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=17618&i=0>>
> > I'm thinking about moving the abbreviation list to an external
> > file. Can someone point me in the right direction for choosing
> > a format and location for the file? I was thinking about a
> > per-user JSON file.
> >
> I guess it would be best to follow the logic that already exists
> for render and editor color schemes, e.g.:
>
>
> https://github.com/openscad/openscad/blob/master/src/scintillaeditor.cpp#L400
>
> This allows to read the configuration from an application folder
> location as well as overwrite from the user directory.
>
> > The format might be something like this:
> > {
> >   "t" : {
> >         "l" : "translate([",
> >         "r" : "])"
> >       }
> > }
> >
> Using JSON makes sense as the other configs are using this format
> too and there's a simple file parser in Boost to read those files.
>
> The l/r looks a bit strange, but it does not really matter much.
> How would that handle multi-line cases / indentation? I think JSON
> supports escaping like \t and \n, but I did not try that yet.
>
> I think it would be good to merge the features from both solutions
> as they do complete each other (like the CallTips are probably
> quite useful for people getting started).
>
> ciao,
>   Torsten.
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=17618&i=1>
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> -- Torsten
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.openscad.org/Abbreviations-tp17583p17618.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>
>


editor-improvement3.patch (5K) <http://forum.openscad.org/attachment/17630/0/editor-improvement3.patch>
abbrev.json (640 bytes) <http://forum.openscad.org/attachment/17630/1/abbrev.json>




--
View this message in context: http://forum.openscad.org/Abbreviations-tp17583p17630.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20160610/ae0c19b9/attachment-0002.html>


More information about the Discuss mailing list