Home

Issue with autocorrect.

Is there a way to disable auto-correction? I am experiencing an annoying behavior where in a LINQ join clause the "equals" keyword is being auto-corrected, capitalized, to "Equals". This only seems to occur when I am using composite keys for the join condition. e.g. new { .... } equals new { .... }

I love the CTRL+SPACE shortcut for auto-completion but the auto-correct is annoying me enough that I would like to turn it off or somehow have it ignore certain words.

I am on version 4.57.02(AnyCPU)

Comments

  • I would of expected the advanced setting "Show Completion List After Letter" to off, to disable auto-correct from popping up while you type, but I switched it off, and reopened link pad, and it still pops up. I find turning it off to be an odd concept though, because I paid to get the auto correct turned on. :smile:
  • I think I have a workaround after having some coffee this morning. It looks like I can hit escape and prevent the automatic change. However in most cases I am typing too quickly and there is no chance to cancel out. I agree, the other parts of the auto-complete functionality are extremely useful this just gets annoying when I am writing a ton of joins, which is quite often.

    Could it be trying to use VB syntax for the auto complete? My query is set to "C# statements" language.
  • Yes, equals is a LINQ query operator in C#, Try using the latest beta, and post how it goes.
  • There are a couple of things going on, here. Can you post a complete example?
  • No problem,

    This example is using a connection that is mapping multiple databases. I use an empty database as the initial connection then map the rest of the "real" databases using the "Include additional databases" option. This example isn't making any cross database joins but there are other databases mapped.

    In the example below, as soon as I type equals then hit space it is changed to "Equals". If I slow down I will see the auto-complete options while typing equals and I can hit escape at the end. Also once it changes the value to "Equals" I lose auto-complete functionality in the right hand side of the equals clause. I do also see the red squiggles indicating a syntax error appear under "Equals" (the tooltip says "equals expected.").

    ===
    C# Statement(s) mode
    ===
    string yrq = "B563";

    string[] itemNumbers = new string[] {"7238","7240","5600","7242", "7244", "7246", "7248", "7250", "1823", "5608", "7258", "7260", "7252", "7254", "5607", "7266", "7268", "7262", "7264", "5622", "5619"};

    const string waitingStatus = "W-LISTED";

    /*
    Determine class level waitlist status for the given list of class ids (yrq + item)
    */

    var q_base_set =
    from cd in T200VOLATILE.CLASS_Ds
    where
    cd.CLASS_YRQ.Equals(yrq)
    && itemNumbers.Contains(cd.CLASS_ITM_NUM)
    join cds in T200VOLATILE.CLASS_D_SCHDs
    on new {cd.CLASS_YRQ, cd.CLASS_ITM_NUM} equals new {cds.CLASS_YRQ, cds.CLASS_ITM_NUM}
  • regrettably, I have a NuGet dependency to a library that has a "var" type. type inferred declaration by "var" keyword is then annotated with a suggestion to include the irrelevant namespace. It is a different case than the one described, but perhaps in the same neck of the woods, code wise.
Sign In or Register to comment.