This is a migrated thread and some comments may be shown as answers.

Smart Quotes

11 Answers 109 Views
Code Generation
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 09 Nov 2010, 03:30 PM
Can you tweak the logic for quotes a bit?

Take this:
string includeTemplatejs = <script text='text/javascript' src='http://{0}/usercontrols/tagmanager/tagscript.js' ></script>";

So there's a missing quote before <script which I need to fix...

So when I put the cursor there and press " I get this instead

""<script

Which then makes me need to delete the trailing quote and turns 1 keystroke into 2

11 Answers, 1 is accepted

Sort by
0
Accepted
Svetlozar
Telerik team
answered on 10 Nov 2010, 09:59 AM
Hello Steve,

You should have "Use Typing Assistance" option enabled. Currently, our Typing Assistance just adds closing " when you type " (we don't have analysis there). We have plans to improve that to address issues like the one you mentioned, but I can't promise you when this will be implemented.  

Kind regards,
Svetlozar Angelov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 10 Nov 2010, 02:13 PM
Great, thanks

Can it perhaps be added to PITS so I can track the progress?
0
Svetlozar
Telerik team
answered on 10 Nov 2010, 04:03 PM
Hi Steve,

I am sorry, it is my bad. I created an item for that and added your account to the associated PITS item. You should be able to monitor its progress.

Sorry for the inconvenience.

All the best,
Svetlozar Angelov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 10 Nov 2010, 04:04 PM
Thanks :)

No inconvenience, nothing to apologize for
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 03 Jan 2012, 03:54 PM
It's been a while (over a year now)...this bug\issue is still happening in the latest release

It's adding more keystrokes because I have to arrow over and delete, and if I delete the wrong quote it deletes both and I have to start over.

Can someone just please tweak the detection logic on this? (and braces\brackets)
0
Ivo Bratoev
Telerik team
answered on 11 Jan 2012, 12:57 PM
Hi,

We improved the typing assistance a few releases ago. For example if you don't have the '<' character in the beginning of the string JustCode will not add additional braces. Your exact case makes sense as well so I will raise its priority for the next release. It should be fixed in the upcoming Q1 2012 release.

Regards,
Ivo Bratoev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 11 Jan 2012, 03:26 PM
What about this one

//start with
string test = steve
 
//add the quote
string test = steve"
 
//justcode changes it to this
string test = steve""

So above I want to wrap steve in quotes, and since there's no plus sign after steve it should then only put a single quote and\or put the other quote at the start before the s to close the string.  Because when it does the double automatically assuming i'm about to START typing a string, that means I have to keystroke over before the first quote and add a plus so it'll be valid code (this even assumes "steve" was a variable where in this case it wasn't).

But the annoying part is that if I just press backspace to delete the front quote, it deletes both, then I have to press quote again, key forward to the end, THEN backspace (and thus causing me way more keystrokes)
0
Ivo Bratoev
Telerik team
answered on 13 Jan 2012, 01:59 PM
Hello,

 Just a quick note - you can use the Delete key to delete a single quote. Deleting both quotes with the backspace is something we implemented specifically as a feature. We like it internally but I am interested if you would have disabled it if possible?

The typing assistance works only after a very limited analysis of the file content. This is mostly because of performance - the quotes should appear immediately after you type them. There are different approaches to it and none of them is perfect. In you example you have forgotten to open the quotes when you wrote 'steve' but a similar example would be if you have forgotten the '+' sign between 'steve' and the next string. We can make it work for one scenario but it won't work in the other.

Our ideas in this direction to make the typing assistance a bit more passive - auto add quotes/braces/etc. only when we are sure they can be added at this location. This would lead to sometimes not adding quotes when you expect them but it would minimize the number of times when you have to delete a quote we have added. Any comments on this are welcome.

Your example makes sense and we will give it some more thought. Please continue sending us examples of when you feel that the typing assistance does not work correctly. This helps us a lot in planning our improvements.

Regards,
Ivo Bratoev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 13 Jan 2012, 02:39 PM
Oh!  I didn't know about the delete\backspace thing...interesting

Could you add it to the options as a toggle perhaps?  I do like that now knowing it exists...however it'll take some time to train myself to not just hit backspace :)
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 24 Oct 2012, 02:18 PM
Another video on it: http://screencast.com/t/sem9nggR8P ...this is in Q3 2012

Seriously, can we stop working on extension support and fix the core analysis?...it's so crazy stupid sometimes, makes typing physical code frustrating\annoying at times
0
Zdravko
Telerik team
answered on 29 Oct 2012, 07:16 AM
Hello,

 Thanks for pointing this Steve.
You are right that in this case when you have # in front, typing assistance's behaviour is a bit strange. We will take a look at it.
Thanks. 

Greetings,
Zdravko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Code Generation
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Svetlozar
Telerik team
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Ivo Bratoev
Telerik team
Zdravko
Telerik team
Share this question
or