[OpenSCAD] Abbreviations

buttim maurizio.butti at gmail.com
Thu Jun 9 10:30:37 EDT 2016


I added the "document autocomplete" feature. Basically CTRL+Return triggers
an autocompletion based on the list of words in the document you're editing.

Beware that Return means the key on the alphabetic portion of your
keyboard, not in the numeric keypad.

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.
The format might be something like this:
{
  "t" : {
        "l" : "translate([",
        "r" : "])"
      }
}

where l and r stand for left and right of cursor

Is it too complicated? Should I stick to the very same format
<https://sourceforge.net/p/scintilla/scite/ci/default/tree/src/abbrev.properties>
SciTE uses ?


On Thu, Jun 9, 2016 at 1:39 PM, maurizio butti <maurizio.butti at gmail.com>
wrote:

> If you specify
>
> qsci->setAutoCompletionShowSingle(true);
>
> the dropdown menu is not shown when there is a single choice available
>
> On Thu, Jun 9, 2016 at 8:42 AM, maurizio butti <maurizio.butti at gmail.com>
> wrote:
>
>> Interesting approach. But I think you should check what's on the left of
>> the cursor to restrict choices. For example: if there's a 'c' the choices
>> should only be 'cube' and 'cylinder'; if you find 'cy' you just complete to
>> 'cylinder' with no menu appearing. Most IDEs I've seen work that way.
>> Scintilla has a very nice 'wordlist completion' based on whatever is in
>> the document you're editing. That means you can easily complete long
>> identifiers hitting CTRL+ENTER. I'm thinking about trying to add this
>> functionality, it might be straightforward but I'm not sure.
>>
>> On Wed, Jun 8, 2016 at 11:27 PM, tp3 [via OpenSCAD] <
>> ml-node+s1091067n17607h92 at n5.nabble.com> wrote:
>>
>>> On 06/08/2016 02:47 PM, Torsten Paul wrote:
>>> > I can try to kick off a special Windows build though.
>>> >
>>> ...aaaaaand for completeness, that's the version with the
>>> AutoComplete/CallTip and Template implementation based on
>>> the QScintilla features.
>>>
>>>
>>> http://files.openscad.org/snapshots/OpenSCAD-2016.06.08-x86-32_issue905-Installer.exe
>>>
>>> http://files.openscad.org/snapshots/OpenSCAD-2016.06.08-x86-32_issue905.zip
>>>
>>> http://files.openscad.org/snapshots/OpenSCAD-2016.06.08-x86-64_issue905-Installer.exe
>>>
>>> http://files.openscad.org/snapshots/OpenSCAD-2016.06.08-x86-64_issue905.zip
>>>
>>> The template popup should be triggered by CTRL+Enter
>>>
>>> ciao,
>>>   Torsten.
>>>
>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=17607&i=0>
>>> 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-tp17583p17607.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-improvement2.patch (4K) <http://forum.openscad.org/attachment/17616/0/editor-improvement2.patch>




--
View this message in context: http://forum.openscad.org/Abbreviations-tp17583p17616.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/20160609/baa78d2d/attachment-0002.html>


More information about the Discuss mailing list