Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 More intelligent replace of suggestion.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

xMRi
Tomato Guru

Germany
315 Posts

Posted - Jan 05 2018 :  04:17:54 AM  Show Profile  Reply with Quote
Suppose the code that I have in C# (C++ same behavior)


public enum SearchFieldMode
{
    Input = 1,
    Output = 2,
};

void Foo()
{
    bool bInput = false;
    ....


Now I want to change the bool bInput to be an enumeration. I jump at the bool and select up to the next word just by pressing Shift+Ctrl+Right.

"bool " is now selected. The caret is in front of the bInput. The blank is selected too.

Now I type "Search" and the corresponding suggestion "SearchFieldMode" is shown. I press Tab!

Now the already typed word Search AND the following word "bInput" is completely replaced by SearchFieldMode.

Idea:
If the previous selection contains a space at the end, the replacement should only be performed on the selected text and not be extended to the text that follows with no space.

With this idea in VAX it is more productive, because the name and following parts are not replaced and I just type a space and have bInput still in my code.

I hope I explained my problem in a understandable way.

If I miss a setting that will already provide this behavior I am sorry, that I didn't found it. So show me how I can achieve this in any way.

Yes I know that I can get this behavior in not selecting the space, but pressing Shift+Ctrl+Right is easy and common.

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 05 2018 :  06:20:31 AM  Show Profile  Reply with Quote
There are a couple of options already available to you. This registry key may help a bit, but you will still be replacing the space, so it will still need to be re-typed:

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

Another thought, are you aware of the new Smart Select feature? This is a fairly recent addition, but is helpful at a time like this:

https://docs.wholetomato.com/default.asp?W560

Here, place the caret anywhere inside "bool" and press Shift+Alt+] and the word will be selected. If you are using something like "std::string" instead, 2 presses of Shift+Alt+] will select the entire type, but won't select the following space.

I know it requires developing a different keyboard habit, but it might be worth trying.

zen is the art of being at one with the two'ness
Go to Top of Page

xMRi
Tomato Guru

Germany
315 Posts

Posted - Jan 05 2018 :  06:44:58 AM  Show Profile  Reply with Quote
Thanks for this.
I switched by overwrite behavior.

I knew about the smart select and I use it. But you know, we always use the known stuff, in my case select a section with the Shift+Cursor keys.
I will see if the overwrite behavior will do what I want
I hope it has no other negative side effects... ;)

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 05 2018 :  07:10:35 AM  Show Profile  Reply with Quote
The default overwrite behaviour is trying to be "clever", but with a fairly simple and well defined rule. Still, it can be confusing when you see it in action, so fingers crossed this will help and work as you want.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000