Autocomplete incorrect when cursor in far left

I am not sure if this has been asked or covered, but has anyone else noticed that the IDE acts strangely when the cursor is in the far left position on a line of code? Other things like the spacebar or tab key won’t register either. If I have a character or two like “If” to start the line then it all works as I would expect. But if the cursor is starting off the line, the space bar doesn’t work and I can’t pull up anything on autocomplete.

I am on 2020r2 on Windows on a very new machine.

  1. You can’t put a space at the beginning of a line of code. The IDE handles indentation for you, so I’m not suprised that the space bar does nothing.

  2. What would you expect autocomplete to do on a blank line? The potential results would be overwhelming.

Keep in mind that autocomplete is sensitive to what comes before it on the line. So for instance, methods which return values will not appear unless you are doing an assignment or a comparison to the same type.

We did make some changes in 2020r2 so that AC will present enums more correctly when there are more than one with the same name. We are also aware of some issues with lines that begin with the RaiseEvent keyword.

Thanks Tim and Greg. I wasn’t trying to get the autocomplete to work there it was another thing I noticed. I was trying to move the exiting code over so I could think about what I was typing instead of having it butted right up to the exiting code. And the spacebar didn’t work. I tried it in 2015r4.1 and does allow the spacebar there. Where I first noticed was down at the bottom in an exception. it doesn’t indent the error message line I had, until after I save and restart.

On Replace, I think I misrepresented what I am seeing. “Rep” (with no quotes) to start the line and then hit tab, does not pull up “Replace” in Autocomplete. But if you do “If Rep” to start the line and then hit the Tab key shows the correct autocomplete list with “Replace” in it.

That is the correct behavior. As Greg mentioned, autocomplete is context sensitive. Replace returns a result, so “Rep” by itself shouldn’t autocomplete, but “If Rep” or “x = Rep” should.

OK, no big deal. Finally moving off 2015r4.1 to 2020r2, and just noticing some differences in the behavior of the IDE. All-in-all, much more polished and usable. I had just about given up hope on the Windows version around version 18.2, but it is just about as slick as the Mac version now.

Thanks for responding to me.

A trick Greg taught me almost 10 years ago for “consulting” the auto complete, was writing “call” before starting my desired expression. So Rep does not work but “call Re…” works. Call is also important when you just want to fire a method and discard its returned value, which I believe it was my intention by that time.

Thanks, Rick I always use Call… before a call to a method (makes me feel like I am back in the 80’s), but never have tried it for anything else. I’ll see how that works here and see if it changes anything I do in my work flow. Love getting tips, sometimes it addresses an issue you have been dealing with for years.