locked
intellisense overreacting RRS feed

  • Question

  • Sorry for asking this question which has no doubt be asked numerous times.  I just can't seem to filter out the answer I need out of the all those intelisense posts.

    Anybody knows if there is a way to tell intellisense one of the following:

    1 -do not to autocomplete words which are already completed

    2 -only autocomplete only when certain keys are pressed (i.e. tab)

    or

    3 - suggest but don't autocomplete?

     

    Currently, intellisense replaces words already completed when typing a ".", "tab" or "space".  This is annoying when an already completed word gets replaced by another.

    For instance:

    keywords like select get replaced by table names like selectedmetrics

    table names like userinfo get replaced by other table name like UserInfoHistory

    I like to be suggested possibilities but I don't like when the computer takes control of my typing.  Can something be done about this?  I am using SSMS 2008.

    Wednesday, October 27, 2010 6:02 PM

Answers

  • Hi Antoine F,

     

    1 -do not to autocomplete words which are already completed

    If you ensure that this word is completed already, we could press ESC key to cancel the intellisense.

     

    2 -only autocomplete only when certain keys are pressed (i.e. tab)

    In order to achieve this goal, we have to disable the “Auto list members” primarily. Once we need the intellisense, we just have to press CTRL + J.

    Please follow step below to disable “Auto list members”:

    1.       Open SQL Server Management Studio

    2.       Click “Tools | Options…”

    3.       In the Options dialog, please expand Text Editor in the left pane and click Transact-SQL

    4.       Uncheck Auto list members in the right pane

     

    3 - suggest but don't autocomplete?

    If you think this feature is important, please provide Microsoft your feedback at https://connect.microsoft.com/SQLServer so that our product team will hear your voice and improve our products in the future.

     

    If anything is unclear, please let me know.


    Regards,
    Tom Li
    • Marked as answer by Tom Li - MSFT Friday, November 5, 2010 12:10 PM
    Friday, October 29, 2010 11:51 AM
  • Just fell on an article telling how to refresh the intellinsense.

    Via the menu, edit/intellisense/refresh local cache.

    Maybe this will help.

    • Marked as answer by Antoine F Friday, February 4, 2011 7:05 PM
    Thursday, February 3, 2011 6:24 PM

All replies

  • I would be very interested to know the answer to this as it is annoying the ^&%" out of me! For instance I can't type NULL and then a space without intellisense converting it to @@connections etc etc - it's fine if I remember to hit escape but SURELY reserved words should be part of the autocomplete list....?? I can only get rid of this by disabling the picklist completely which kind of defeats the point of having intellisense at all.

    Any of the above suggestions would work, or just add the SQL reserved words to the list.

    Unless there is a workaround/something I'm missing..?

    Thursday, October 28, 2010 1:43 PM
  • Happy to know I am not alone with that issue. 

    I think the issue is that intellisense always take the last possible suggestion alphabetically while the shortest / complete word is always the first in the list.  It seems to do the same for reserved words as well.  For instance, "in" would be replaced by "inner" and more.

    I still would like to have a work around this or to know if there is a possibility to configure it to behave better.

    • Edited by Antoine F Thursday, October 28, 2010 1:54 PM syntax
    Thursday, October 28, 2010 1:52 PM
  • I added a post on connect:  https://connect.microsoft.com/SQLServer/feedback/details/617586/prevent-intellisense-from-overreacting

    Please feel free to validate this behaviour if you would like it to be considered.

    Thursday, October 28, 2010 3:55 PM
  • I've added my comments there too. Thanks for logging it with MS! Hopefully we'll either get a fix or a workaround (other than hitting escape) as this is driving me insane. My chin starting twitching this morning and I swear it's related... :)
    Friday, October 29, 2010 6:40 AM
  • Hi Antoine F,

     

    1 -do not to autocomplete words which are already completed

    If you ensure that this word is completed already, we could press ESC key to cancel the intellisense.

     

    2 -only autocomplete only when certain keys are pressed (i.e. tab)

    In order to achieve this goal, we have to disable the “Auto list members” primarily. Once we need the intellisense, we just have to press CTRL + J.

    Please follow step below to disable “Auto list members”:

    1.       Open SQL Server Management Studio

    2.       Click “Tools | Options…”

    3.       In the Options dialog, please expand Text Editor in the left pane and click Transact-SQL

    4.       Uncheck Auto list members in the right pane

     

    3 - suggest but don't autocomplete?

    If you think this feature is important, please provide Microsoft your feedback at https://connect.microsoft.com/SQLServer so that our product team will hear your voice and improve our products in the future.

     

    If anything is unclear, please let me know.


    Regards,
    Tom Li
    • Marked as answer by Tom Li - MSFT Friday, November 5, 2010 12:10 PM
    Friday, October 29, 2010 11:51 AM
  • Tom,

    Is it not possible to be able to specify the character used to indicate a break in words. I should not have to hit ESC every time I want to type NULL into my query! It makes me wonder if any of your developers have used this feature in their day-to-day, as I'm sure they would very quickly see how frustrating it is to have the word "in" replaced by "index_col" (for example) every time they weren't paying attention.

    FYI I have been experiencing this a lot in the "when" clause of case statements - it does seem to make a difference where in the query you are typing.

    Friday, October 29, 2010 2:37 PM
  • Thanks Tom Li, I like it.

    Using suggestion no 2: I disabled it and press ctrl + j when I need it.  It works better for me than the opposite.

    One more question.  ctrl + j seems to work to list table names but not for column names.  Is there another key for column names or am I doing something wrong?

    Thanks for the help.

    The connect is already entered:  https://connect.microsoft.com/SQLServer/feedback/details/617586/prevent-intellisense-from-overreacting

    Friday, October 29, 2010 3:53 PM
  • Just Saw what Suzy wrote

    I believe you are right about the fact that where you are positioned in the statement seems to have different impact on intellisense.  For instance the derived table (select whithin a select) seems to give worst result than a simple select.

    Still, for developper with typing skills, having to remember to type esc is not a solution.  I type faster than intellisense gets displayed and even if it was not the case, I often type without looking (either reading somewhere else or performing other action).  To make the escape solution viable, I would have to either anticipate when the intellisense will act up or press escape after every word I type.  It is not a solution.

    The ctrl + j works better I can call it when I actually need it.  However it seems to have issue displaying columns.  Can something be done to display intellisense for columns once the Auto list members has been turned off?

    After turning auto list members of:

    if I type us ctrl + j, I see my table userinfo.

    If I type userinfo.na ctrl + j, no suggestion pops up.

    Can something be done about this?

    • Proposed as answer by Tom Li - MSFT Saturday, October 30, 2010 3:18 AM
    • Unproposed as answer by Tom Li - MSFT Saturday, October 30, 2010 3:18 AM
    Friday, October 29, 2010 9:03 PM
  • Hi Antoine F,

    Could you please provide us more detail about this scenario?

    Then I could test it in my environment.


    Regards,
    Tom Li
    Saturday, October 30, 2010 3:23 AM
  • Tom,

    To test: with Autolist turned on, type in select <tablename>.<start of column name> - both the table name and column name will bring up the autolist. Then turn off autolist. Type in select <tablename>.<start of column name> - when you type the start of the table name + ctrl-j, you get the autolist. When you type the start of the column name + ctrl-j, you do not.

    I think this is an ok workaround once the columns are working, but it seems counter-intuitive to have to turn OFF intellisense/autolist in order to get it in a usuable condition. For me it is much much much better to be able to specify the auto-complete character - i.e. I would probably use tab - anything but space!

    I also agree that typing esc to opt out of autocomplete is not a usable workaround as I too often type without looking. In any case, this seems to be erratic behaviour with autocomplete only replacing reserved words in some situations, like in case statements and subselects. So not only would I have to remember to type ESC, but also to do it only when in certain parts of the query!

     

    Monday, November 1, 2010 10:20 AM
  • Hi Tom,

    My intellisense seems to behave better since this weekend.

    I am not sure if it is due to the update/reboot of the servers or if it is beacuse the query I write this week are simplier than the ones I was writing last week but:

    Autolist member does not seem select the last member of the list anymore.  As such, complete words are not replaced anymore!

    ctrl + j seems to works for columns.

    I'll let you know as soon as I fall on additional cases.  If I I don't, I'll close the thread and update the connect.

    That said, the case Suzyt describes seems to be what I was experimenting last week.

    Monday, November 1, 2010 3:41 PM
  • Tom,

    Are you still looking into this?

    Cheers,

    Monday, November 8, 2010 8:14 AM
  • Hi suzyt,

    Any questions?


    Regards,
    Tom Li
    Monday, November 8, 2010 8:24 AM
  • Yes... Are you looking at a solution to the problem? Is there a way to disable autocomplete for reserved words? I have explained my problem in detail in previous posts
    Monday, November 8, 2010 12:50 PM
  • Hi suzyt,

    As I said above, I would like to recommend that you disable this feature, then we could press CTRL + J to display the intellisense while we need it.

    Meanwhle I would like to recommend that you use Bing or Google to check if there is such a tool.

    If you since this feature is useful, please provide Microsoft your feedback at https://connect.microsoft.com/SQLServer so that our product team could hear your voice and improve our product in the future.

    If anything is unclear, please let me know.


    Regards,
    Tom Li
    Tuesday, November 9, 2010 2:22 AM
  • There is already a feedback thread opened at https://connect.microsoft.com/SQLServer/feedback/details/617586/prevent-intellisense-from-overreacting

    As I said before, I should not have to disable intellisense in order to get it to work properly. Why does autocomplete ignore reserved words? To me this is a fundamental error with the way intellisense works for SQL server and should be addressed, rather than all the developers in the world having to disable this feature to prevent autocomplete on everyday SQL syntax.

    This is clearly a bug with the software, as I have explained previously, as this does not occur in all areas the SQL query. It seems to happen in subselects, case statements, and perhaps other places. This is a bug that must be fixed, not a quirk that needs a workaround.

    Thanks.

    Tuesday, November 9, 2010 7:56 AM
  • Tom,

    Do you have any comments on my latest post?

    Thanks,

    Thursday, November 11, 2010 7:41 AM
  • Hi suzyt,

    SQL Server Denali CTP has been released, I would like to recommend that you try the SQL Server Management Studio in it. Please download it from the following link:

    http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6a04f16f-f6be-4f92-9c92-f7e5677d91f9&displaylang=en

    Meanwhile I would like to recommend that you ask it in a new thread and you will get specific support. Then our product team might see your thread and provide you more information.


    Regards,
    Tom Li
    Thursday, November 11, 2010 8:55 AM
  • Since my intellisense seemed to improve a lot by updating/rebooting the server, is there a way to force refresh/reset the intellisense, other than rebooting.  Maybe it would help?
    Thursday, November 11, 2010 2:09 PM
  • Hi Antoine F,

    Have you tried reopening the SQL Server Management Studio?


    Regards,
    Tom Li
    Friday, November 12, 2010 1:53 AM
  • Thanks Tom. I've tried installing but am stuck as I need to wait for some updates to be applied to my PC - I'll get back to you if/when this happens. In the meantime I will raise this as a separate issue and see if there is any more info from your product team.

    Many thanks for your help.

    Friday, November 12, 2010 1:41 PM
  • Just fell on an article telling how to refresh the intellinsense.

    Via the menu, edit/intellisense/refresh local cache.

    Maybe this will help.

    • Marked as answer by Antoine F Friday, February 4, 2011 7:05 PM
    Thursday, February 3, 2011 6:24 PM
  • Refreshing the intellisense helped me, I think I might understand why, for a statement like CASE, I had fields in my database that started with case, I wonder if by using one of those fields in a previous query, if I confused intellisense to think the case statement = [case + the rest of my field name].  Sounds like a bug to me, but Antoine F's post solved this weird behavior for me in SSMS 2008 r2. 
    Friday, December 9, 2011 5:31 PM
  • This "Auto List Members" switch has been driving me crazy.

    Almost a year and half since your post and it is still doing good in the world!"  Thank you!

    Friday, March 16, 2012 4:29 PM