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
 Technical Support
 Braces auto completion.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

freiza
New Member

6 Posts

Posted - Feb 19 2012 :  04:50:53 AM  Show Profile  Reply with Quote
Is there any way to just get out of the braces while using braces auto completion on hitting TAB/Enter key, without going down to the next line similar to some modern text editors like SlickEdit?

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Feb 20 2012 :  12:18:33 PM  Show Profile  Reply with Quote
Unfortunately I'm not familiar with SlickEdit. Can you please elaborate what are you trying to do? or a link to the description of a the feature would be helpful. I glanced Slickedit's web page, but didn't find anything about this.

Brace completion mean that when you hit the { button you get {|}. So you can either press the right arrow or you can press } because VA will overwrite the closing bracket rather that inserting one more.

If you mean the multiline version:
{
    |
}

then down arrow does what you need, but you said "without going down to the next line". Or you do want to go next line but you would like to do so via enter or tab without hitting down arrow?

If you are next to a bracket, like

    if (expression)
    {|
        // some code
    }

then you can use ctrl+] to "get out of the braces".

Edited by - accord on Feb 20 2012 12:20:06 PM
Go to Top of Page

freiza
New Member

6 Posts

Posted - Feb 21 2012 :  05:09:13 AM  Show Profile  Reply with Quote
Watch this.
http://youtu.be/8LMPSO0KBd4

The same can be done with Double qoutes, single qoutes, angle brackets, braces, big brackets etc.

Next video.

http://youtu.be/Fsn6nR3fz8Q

Using arrow keys in VA makes typing inefficient. Kindly Help.

Edited by - freiza on Feb 21 2012 05:17:32 AM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Feb 21 2012 :  6:38:32 PM  Show Profile  Reply with Quote
Thank you for recording and uploading the videos, now I get it.
I have a few more questions though :)
- What happens, if you not just type, but move your caret left and right, maybe you even leave the line, and go back and press enter. I guess it terminates this special state (since enter "normally" starts a new line). So for example, if the caret (| represents it) is here:
if (true| && false)
then what happens if you press enter?
- What if you want to start a new line? My normal process of constructing an if, for, etc. is that after the closing paren, I just hit { which results in {} and then press enter. A visual example:

    if (true) {|}

here, I press enter, and get this:

    if (true) {
        |
    }

which is very convenient for me, considering that I'm using this coding style (like Bjarne Stroustrup - it is not a rare style).

Anyway, I agree that arrows can be somewhat inconvenient to use so I tend to just type the closing parens which gets replaced, so I get the same result by hitting the closing paren what you get by hitting enter. And typing ')' is more convenient than using the right arrow, nearing the convenience factor of hitting enter. What do you think?
Go to Top of Page

freiza
New Member

6 Posts

Posted - Feb 22 2012 :  01:09:56 AM  Show Profile  Reply with Quote
@@- What happens, if you not just type, but move your caret left and right, maybe you even leave the line, and go back and press enter. I guess it terminates this special state (since enter "normally" starts a new line). So for example, if the caret (| represents it) is here:
if (true| && false)
then what happens if you press enter?


See this.

http://youtu.be/ki6r2W_fICM

Please consider this option. It makes me and many like me more productive.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Feb 22 2012 :  5:36:25 PM  Show Profile  Reply with Quote
Interesting. And wasn't it annoying first that enter does something different than it did "normally" in other editors like VS?
I have 3 more questions
1. Does it only work when the matching parens, brackets, etc. are in the same line? I mean, you are almost always inside a bracket when you work with C++. See the following example and the comment:

if (true) {
    int apple;| // it the caret would jump after the closing bracket instead of starting a new line, it would be "funny"
}

2. What happens if you open a file and move the caret inside parens that was typed formerly? Does enter move the caret outside as well?
3. What if the parens are not on the same line?

if (true| &&
    false)

So I press enter in the above situation.

I would like to see the whole picture so we know what it is like. To be honest, for me, this is a little strange. I'm not saying that it is not useful, just a little new way of doing things.

Edited by - accord on Feb 22 2012 5:38:09 PM
Go to Top of Page

freiza
New Member

6 Posts

Posted - Feb 22 2012 :  6:48:06 PM  Show Profile  Reply with Quote
@@ 1. Does it only work when the matching parens, brackets, etc. are in the same line? I mean, you are almost always inside a bracket when you work with C++. See the following example and the comment:


if (true) {
int apple;| // it the caret would jump after the closing bracket instead of starting a new line, it would be "funny"
}
.....NO.....

@@ 2. What happens if you open a file and move the caret inside parens that was typed formerly? Does enter move the caret outside as well?

It functions normally.... You land in next line.



@@ 3. What if the parens are not on the same line?


if (true| &&
false)

If you can download the trial version and try yourself that would be much better cuz it is difficult to address each point separately. SlickEdit is an intelligent editor.


@@@@ Anyway, I agree that arrows can be somewhat inconvenient to use so I tend to just type the closing parens which gets replaced, so I get the same result by hitting the closing paren what you get by hitting enter. And typing ')' is more convenient than using the right arrow, nearing the convenience factor of hitting enter. What do you think?

Using ')' key beats the whole idea of auto bracket completion. If I have to type it manually then what is the point of having bracket completion.


I also have 1 question to ask.
Is it very difficult to implement this feature as an option.

VA is an excellent software. But please do consider my point if possible.




Edited by - freiza on Feb 22 2012 6:52:15 PM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Feb 23 2012 :  5:49:35 PM  Show Profile  Reply with Quote
quote:
Is it very difficult to implement this feature as an option.

Normally, we would like to be consistent with Visual Studio and try to avoid features that changes how the IDE behaves. Also, we would like to keep the option dialog as simple as possible, we got a *lot* of requests to put even more and more options into it.

But, this idea seems interesting so I wanted to know your opinion and observations to get a better overall view, a kind of "feel" about the feature and was wondering about the edge cases.

I have put in a feature request for this to see what the developers make of it:

case=64901
Go to Top of Page

freiza
New Member

6 Posts

Posted - Feb 24 2012 :  12:28:46 PM  Show Profile  Reply with Quote
Thank You.
Go to Top of Page

freiza
New Member

6 Posts

Posted - Feb 26 2012 :  3:14:30 PM  Show Profile  Reply with Quote
http://www.skorkin.com/2011/04/coding-helpers-smart-parentheses-and-smart-brackets/#.T0qLWnnAGjc

See this.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Feb 27 2012 :  1:12:02 PM  Show Profile  Reply with Quote
Thank you for the link.
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