discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] Abbreviations

TP
Torsten Paul
Thu, Jun 9, 2016 3:36 PM

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.

Von: buttim <maurizio.butti@gmail.com> > 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.
B
buttim
Thu, Jun 9, 2016 4:15 PM

Yes, the l/r thing is a bit weird. But the alternatives I see are even
weirder:

  1. "translate([|])" SciTE style: the \ marks the position of the cursor
  2. indicate the position of the cursor with a number (not really intuitive)

Regarding the special characters I'm pretty confident JSON will handle them.

I'll study the code related to the color schemes handling.

Thanks for your help

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

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

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

Yes, the l/r thing is a bit weird. But the alternatives I see are even weirder: 1. "translate([|])" SciTE style: the \ marks the position of the cursor 2. indicate the position of the cursor with a number (not really intuitive) Regarding the special characters I'm pretty confident JSON will handle them. I'll study the code related to the color schemes handling. Thanks for your help On Thu, Jun 9, 2016 at 5:37 PM, tp3 [via OpenSCAD] < ml-node+s1091067n17618h33@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> > -- View this message in context: http://forum.openscad.org/Abbreviations-tp17583p17620.html Sent from the OpenSCAD mailing list archive at Nabble.com.
J
jpmendes
Thu, Jun 9, 2016 8:32 PM

Thanks buttim for sharing, thanks Torsten for the release. This is very
handy, i like it.
With CTRL+Alt instead of  CTRL+B would be even better. Nevertheless it is
good enough.
I prefer this solution to the pop-up menu. I don't like automatic pop-ups.

jpmendes

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

Thanks buttim for sharing, thanks Torsten for the release. This is very handy, i like it. With CTRL+Alt instead of CTRL+B would be even better. Nevertheless it is good enough. I prefer this solution to the pop-up menu. I don't like automatic pop-ups. jpmendes -- View this message in context: http://forum.openscad.org/Abbreviations-tp17583p17627.html Sent from the OpenSCAD mailing list archive at Nabble.com.
B
buttim
Thu, Jun 9, 2016 10:53 PM

I have no clue of how something like CRTL+ALT or a simple TAB should be
handled in code. And everybody seems to have a personal preference on the
ideal shortcut. So I'll stick to CTRL+B, LOL.
Thanks for the encouragement, I hope more editor improvement will come soon.

On Thu, Jun 9, 2016 at 10:32 PM, jpmendes [via OpenSCAD] <
ml-node+s1091067n17627h12@n5.nabble.com> wrote:

Thanks buttim for sharing, thanks Torsten for the release. This is very
handy, i like it.
With CTRL+Alt instead of  CTRL+B would be even better. Nevertheless it is
good enough.
I prefer this solution to the pop-up menu. I don't like automatic pop-ups.

jpmendes


If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Abbreviations-tp17583p17627.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-tp17583p17628.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I have no clue of how something like CRTL+ALT or a simple TAB should be handled in code. And everybody seems to have a personal preference on the ideal shortcut. So I'll stick to CTRL+B, LOL. Thanks for the encouragement, I hope more editor improvement will come soon. On Thu, Jun 9, 2016 at 10:32 PM, jpmendes [via OpenSCAD] < ml-node+s1091067n17627h12@n5.nabble.com> wrote: > Thanks buttim for sharing, thanks Torsten for the release. This is very > handy, i like it. > With CTRL+Alt instead of CTRL+B would be even better. Nevertheless it is > good enough. > I prefer this solution to the pop-up menu. I don't like automatic pop-ups. > > jpmendes > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://forum.openscad.org/Abbreviations-tp17583p17627.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-tp17583p17628.html Sent from the OpenSCAD mailing list archive at Nabble.com.
B
buttim
Fri, Jun 10, 2016 12:26 PM

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@n5.nabble.com> wrote:

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.

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@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.
B
buttim
Fri, Jun 10, 2016 3:23 PM

Torsten, would you mind sharing the code you used for call tips?
I'm trying to implement them myself but I'm stuck

On Wed, Jun 8, 2016 at 11:27 PM, tp3 [via OpenSCAD] <
ml-node+s1091067n17607h92@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

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

Torsten, would you mind sharing the code you used for call tips? I'm trying to implement them myself but I'm stuck On Wed, Jun 8, 2016 at 11:27 PM, tp3 [via OpenSCAD] < ml-node+s1091067n17607h92@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> > -- View this message in context: http://forum.openscad.org/Abbreviations-tp17583p17633.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Fri, Jun 10, 2016 4:46 PM

On 06/10/2016 05:23 PM, buttim wrote:

Torsten, would you mind sharing the code you used for call tips?
I'm trying to implement them myself but I'm stuck

Sure, this is the autocomplete-2 branch:

https://github.com/openscad/openscad/tree/autocomplete-2

ciao,
Torsten.

On 06/10/2016 05:23 PM, buttim wrote: > Torsten, would you mind sharing the code you used for call tips? > I'm trying to implement them myself but I'm stuck > Sure, this is the autocomplete-2 branch: https://github.com/openscad/openscad/tree/autocomplete-2 ciao, Torsten.
M
MichaelAtOz
Sat, Jun 11, 2016 12:28 AM

buttim wrote

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

Is that (Ctrl+) the numeric keypad ''? Presumably not Ctrl-Shift-8.

Many keybords today don't have the numeric keypad. But if it will be
configurable then it doesn't matter.

Note, keyboard usage is documented  here
https://github.com/openscad/openscad/wiki/Keyboard-Shortcuts


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

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

buttim wrote > The two other features are still present: > CTRL+* to toggle current folding > CTRL+Return to complete the word preceding the cursor Is that (Ctrl+*) the numeric keypad '*'? Presumably not Ctrl-Shift-8. Many keybords today don't have the numeric keypad. But if it will be configurable then it doesn't matter. Note, keyboard usage is documented here <https://github.com/openscad/openscad/wiki/Keyboard-Shortcuts> ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- View this message in context: http://forum.openscad.org/Abbreviations-tp17583p17641.html Sent from the OpenSCAD mailing list archive at Nabble.com.
B
buttim
Sat, Jun 11, 2016 9:40 AM

You can use both *. I choose this shortcut because SciTE already uses it
and OpenSCAD has CTRL++ and CTRL+- so it should not sound too exotic to
OpenSCAD users.
It's just a menu shortcut so it won't be configurable (unless the whole
menu system becomes confgurable one day)

On Sat, Jun 11, 2016 at 2:28 AM, MichaelAtOz [via OpenSCAD] <
ml-node+s1091067n17641h46@n5.nabble.com> wrote:

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

Is that (Ctrl+) the numeric keypad ''? Presumably not Ctrl-Shift-8.

Many keybords today don't have the numeric keypad. But if it will be
configurable then it doesn't matter.

Note, keyboard usage is documented here
https://github.com/openscad/openscad/wiki/Keyboard-Shortcuts
*Admin - PM me if you need anything, *
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the
above.

The TPP is no simple “trade agreement.” Fight it!
http://www.ourfairdeal.org/ time is running out!


If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Abbreviations-tp17583p17641.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-tp17583p17645.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

You can use both *. I choose this shortcut because SciTE already uses it and OpenSCAD has CTRL++ and CTRL+- so it should not sound too exotic to OpenSCAD users. It's just a menu shortcut so it won't be configurable (unless the whole menu system becomes confgurable one day) On Sat, Jun 11, 2016 at 2:28 AM, MichaelAtOz [via OpenSCAD] < ml-node+s1091067n17641h46@n5.nabble.com> wrote: > buttim wrote > The two other features are still present: > CTRL+* to toggle current folding > CTRL+Return to complete the word preceding the cursor > > Is that (Ctrl+*) the numeric keypad '*'? Presumably not Ctrl-Shift-8. > > Many keybords today don't have the numeric keypad. But if it will be > configurable then it doesn't matter. > > Note, keyboard usage is documented here > <https://github.com/openscad/openscad/wiki/Keyboard-Shortcuts> > *Admin - PM me if you need anything, * > or if I've done something stupid... > > Unless specifically shown otherwise above, my contribution is in the > Public Domain; to the extent possible under law, I have waived all > copyright and related or neighbouring rights to this work. > Obviously inclusion of works of previous authors is not included in the > above. > > The *TPP* is no simple *“trade agreement.”* *Fight it!* > http://www.ourfairdeal.org/ *time is running out!* > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://forum.openscad.org/Abbreviations-tp17583p17641.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-tp17583p17645.html Sent from the OpenSCAD mailing list archive at Nabble.com.
B
buttim
Mon, Jun 13, 2016 10:04 AM

Thanks to careful examination of your code I managed to get the call tips
functionality working.

My approach is quite different and leads to a much more compact code (but I
might be missing some features of your version). Basically I used the
already available QsciAPIs class instead of defining my own inherited from
QsciAbstractAPIs.

A good thing about my code is that the templates are configurable (file
scad.api, usual locations).

Another small goodie is the (automatical) highlighting of the current
parameter.

I added a new menu entry (and shortcut) for toggling all folds in the
document, once more SciTE-style.

On Fri, Jun 10, 2016 at 6:47 PM, tp3 [via OpenSCAD] <
ml-node+s1091067n17635h60@n5.nabble.com> wrote:

editor-improvement4.patch (7K) http://forum.openscad.org/attachment/17656/0/editor-improvement4.patch
scad.api (168 bytes) http://forum.openscad.org/attachment/17656/1/scad.api

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

Thanks to careful examination of your code I managed to get the call tips functionality working. My approach is quite different and leads to a much more compact code (but I might be missing some features of your version). Basically I used the already available QsciAPIs class instead of defining my own inherited from QsciAbstractAPIs. A good thing about my code is that the templates are configurable (file scad.api, usual locations). Another small goodie is the (automatical) highlighting of the current parameter. I added a new menu entry (and shortcut) for toggling all folds in the document, once more SciTE-style. On Fri, Jun 10, 2016 at 6:47 PM, tp3 [via OpenSCAD] < ml-node+s1091067n17635h60@n5.nabble.com> wrote: > On 06/10/2016 05:23 PM, buttim wrote: > > Torsten, would you mind sharing the code you used for call tips? > > I'm trying to implement them myself but I'm stuck > > > Sure, this is the autocomplete-2 branch: > > https://github.com/openscad/openscad/tree/autocomplete-2 > > ciao, > Torsten. > > _______________________________________________ > OpenSCAD mailing list > [hidden email] <http:///user/SendEmail.jtp?type=node&node=17635&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-tp17583p17635.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-improvement4.patch (7K) <http://forum.openscad.org/attachment/17656/0/editor-improvement4.patch> scad.api (168 bytes) <http://forum.openscad.org/attachment/17656/1/scad.api> -- View this message in context: http://forum.openscad.org/Abbreviations-tp17583p17656.html Sent from the OpenSCAD mailing list archive at Nabble.com.