I gave a look at the RC and was pleased to find the autocomplete features I
proposed back in 2016. But there are a few things I think are wrong with
that.
The use of CTRL+Space to pop up the completion list is ok. What is missing
though is the possibility to autocomplete with just one keystroke whenever
there is no ambiguity). SciTE, the Scintilla Editor that is based on the
very same edit component as OpenSCAD uses CTRL+ENTER for that (the code in
my original proposal did the same).
There is no way to trigger autocompletion from the menus. While I agree
that menu usage for the functionality would be cumbersome, there is no way
for someone to discover the possibility to use it. (I'm totally lost to
trigger the templates for example).
My choice was to add 3 entries:
I finally found how template expansion works. Seems like CTRL+INS triggers
it. Under Windows the very same key combination is still generally used as
an alternative to CTRL+C (copy), so my humble opinion is that it's quite a
poor choice.
Sadly it is not based on what appears to the left of the cursor as (again)
in Scite. It just shows a popup menu to choose from. I think SciTE style
template expansion is much more efficient. If no recognizable template name
appears on le left of the cursor it seems reasonable to show the popup.
"Seems like CTRL+INS triggers it. Under Windows the very same key combination is still generally used as an alternative to CTRL+C"
This is also X Window default for copy operation.
Just my $0.02
Tim
From: Discuss discuss-bounces@lists.openscad.org on behalf of maurizio butti maurizio.butti@gmail.com
Sent: 08 December 2020 00:24:35
To: discuss@lists.openscad.org
Subject: [OpenSCAD] Autocomplete & abbreviations (2020.12-RC2)
I gave a look at the RC and was pleased to find the autocomplete features I proposed back in 2016. But there are a few things I think are wrong with that.
The use of CTRL+Space to pop up the completion list is ok. What is missing though is the possibility to autocomplete with just one keystroke whenever there is no ambiguity). SciTE, the Scintilla Editor that is based on the very same edit component as OpenSCAD uses CTRL+ENTER for that (the code in my original proposal did the same).
There is no way to trigger autocompletion from the menus. While I agree that menu usage for the functionality would be cumbersome, there is no way for someone to discover the possibility to use it. (I'm totally lost to trigger the templates for example).
My choice was to add 3 entries:
I finally found how template expansion works. Seems like CTRL+INS triggers it. Under Windows the very same key combination is still generally used as an alternative to CTRL+C (copy), so my humble opinion is that it's quite a poor choice.
Sadly it is not based on what appears to the left of the cursor as (again) in Scite. It just shows a popup menu to choose from. I think SciTE style template expansion is much more efficient. If no recognizable template name appears on le left of the cursor it seems reasonable to show the popup.
buttim wrote
The use of CTRL+Space to pop up the completion list is ok. What is missing
though is the possibility to autocomplete with just one keystroke whenever
there is no ambiguity).
When I get to a point where there is no ambiguity, and there is only one
choice in the completion list, I hit a tab, and it completes. ie. tra
followed by tab, gives me translate. If there is ambiguity, hitting a tab
will complete the top item in the list. ie. typing sq, followed by tab,
gives me sqrt.
If I type sq <down arrow> <tab>, I'll get square.
Fairly reasonable, I think.
My choice was to add 3 entries:
- Expand abbreviation Ctrl+B
- Complete word Ctrl+Return
- Complete symbol Ctrl+Space
How did you manage to do those?
I finally found how template expansion works. Seems like CTRL+INS triggers
it. Under Windows the very same key combination is still generally used as
an alternative to CTRL+C (copy), so my humble opinion is that it's quite a
poor choice.
Not for me, because I have never had to use it for anything, but I get the
point.
Thank you for pointing out this operation for me. Very handy. Is it new in
this RC?
--
Sent from: http://forum.openscad.org/
/When I get to a point where there is no ambiguity, and there is only one
choice in the completion list, I hit a tab, and it completes. ie. tra
followed by tab, gives me translate. If there is ambiguity, hitting a tab
will complete the top item in the list. ie. typing sq, followed by tab,
gives me sqrt.
If I type sq <down arrow> <tab>, I'll get square.
Fairly reasonable, I think./
Not bad I must admit, even though i prefer to type myLongVarN CTRL+ENTER
without even giving a look at the screen.
/> My choice was to add 3 entries:
How did you manage to do those?
/
I modified the code, if I understood the question, which I'm not sure
/Thank you for pointing out this operation for me. Very handy. Is it new in
this RC?
/
No idea, it's a while I don't check nightly builds
--
Sent from: http://forum.openscad.org/