Smart Quotes

12 posts, 1 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 09 Nov 2010 Link to this post

    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
  2. Answer
    Svetlozar
    Admin
    Svetlozar avatar
    269 posts

    Posted 10 Nov 2010 Link to this post

    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
  3. DevCraft banner
  4. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 10 Nov 2010 Link to this post

    Great, thanks

    Can it perhaps be added to PITS so I can track the progress?
  5. Svetlozar
    Admin
    Svetlozar avatar
    269 posts

    Posted 10 Nov 2010 Link to this post

    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
  6. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 10 Nov 2010 Link to this post

    Thanks :)

    No inconvenience, nothing to apologize for
  7. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 03 Jan 2012 Link to this post

    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)
  8. Ivo Bratoev
    Admin
    Ivo Bratoev avatar
    107 posts

    Posted 11 Jan 2012 Link to this post

    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 >>

  9. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 11 Jan 2012 Link to this post

    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)
  10. Ivo Bratoev
    Admin
    Ivo Bratoev avatar
    107 posts

    Posted 13 Jan 2012 Link to this post

    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 >>

  11. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 13 Jan 2012 Link to this post

    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 :)
  12. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 24 Oct 2012 Link to this post

    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
  13. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 29 Oct 2012 Link to this post

    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.

Back to Top
DevCraft banner