Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Auto complete function applied to 1 thing

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
tjcbs Posted - May 19 2017 : 5:08:30 PM
Suppose I have a variable or symbol, SomeVarOrSymbol
Suppose I want to replace an occurance of SomeVarOrSymbol with a transformation of it, via a function: Transform(var).

So, I start typing (| == the cursor):
Tra|SomeVarOrSymbol

Auto Complete pops up, and I select Transform.

Default behavior, since "TraSomeVarOrSymbol" is not a symbol:
Transform|

If I change the registry setting HKCU\Software\Whole Tomato\Visual Assist X\<IDE spec>\CompletionOverwriteBehavior to 1:
Transform|SomeVarOrSymbol

What I want:
Transform(SomeVarOrSymbol)|
6   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jun 03 2017 : 09:48:58 AM
For your vote against assumptions, if you use the setting:

CompletionOverwriteBehavior = 1

in the registry, as explained here:

https://wholetomato.fogbugz.com/default.asp?W640

this should be exactly what you get. If it isn't what you get, then I would like to know what is happening for you, so we can try to work out why this is not working as designed.

For point 1, thinking a bit about what I am doing when I am editing existing text, and typing into the middle of a line, that any "always do X" setting is going to get in the way, since I am doing quite different things on different occasions.

For point 2, since you are changing a function call from one function to another, then yes, always deleting the duplicate text makes sense. I have put in a feature request for this, as an optional behaviour, to see what they make of it:

case=108651
Mordachai Posted - Jun 02 2017 : 12:17:38 PM
Moar thinking...

1. Why not have the suggestions follow up with suggestions on what to do with the rest of the text? i.e. insert, overwrite, wrap in parens, etc.? So you accept suggestion, then choose how to handle the rest (again, with prefs allowing you to say "ask, always X, always Y, always Z")

2. If the text following the insertion point matches the text being inserted - then delete the exact match.
This happens a lot to me:
I'll be creating a new variation of a type or a function or whatever - starting from FormatFractionData creating FormatAreaData - and as I delete Format|Data the suggestion includes "FormatAreaData" - if I accept that (with my settings of always insert) then I get FormatAreaDataData. Since the "Data" is an exact duplicate, that duplication could be elided I think every time always without question. I think ;)

Anyway - two more thoughts...
Mordachai Posted - Jun 02 2017 : 10:57:24 AM
Since I've been following this convo over in the other related feature request - and this issue is dear to my heart...

My "vote" is against any assumptions!

That's what got this feature into trouble in the first place!

_Just_ insert the rest of the text for the symbol selected in the suggestion.

Do NOTHING what-so-ever to any other text around it.

And life will be sooooo much simpler.

You can't know what I'm doing - you can't know what relationship it has to what follows, you can't know what relationship to what comes before - you simply cannot. So don't. Please!
feline Posted - May 24 2017 : 2:44:42 PM
If we move the cursor to the end of the line, how long before someone says they are typing:

Transform(!SomeVarOrSymbol)

making assumptions about what comes next is something we try to avoid doing to often, since it is easy to get tripped up by them.
tjcbs Posted - May 24 2017 : 2:08:08 PM
Then, at the very least, you can insert the opening bracket, and move the cursor to the end of the next symbol. You're solution won't work because I may be working with something in the middle of a line.
feline Posted - May 20 2017 : 10:40:42 AM
The problem here is that we don't know where the closing bracket should go, so we cannot just insert it automatically. When you are typing at the end of the line, inserting the closing bracket is reasonable, since then you can adjust it as required.

Here, if you use Shift + End to select "SomeVarOrSymbol" and then press ( the selected text will be surrounded in round brackets, giving you the result you are looking for.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000