Please stop deleting my code on auto-complete

Why does Rider delete code to the right of my cursor when I use auto-complete? I just don't get it.

Take the following line:

In this line, I forgot to get the directory-name from the full filename. So I start typing:

That's good! I want "GetDirectoryName" and hit Tab.

As a result, Rider deletes the code to the right of my cursor:


I don't get it! 

This happens all the time while coding. And the workaround sucks:

Instead of just hitting Tab, I need to hit Escape, Space, Cursor left, Ctrl+Space and then Tab. And then I need to delete the space again.

What business does the auto-complete have with the code to the right of my cursor?

Comment actions Permalink

Hello Andreas,

Thank you for contacting Rider support. It happens because `Tab` key is responsible for `Choose Lookup Item Replace`. Also, there is a different action `Choose Lookup Item` which is assigned to `Enter`. 
I suggest the following solutions:

  1. To use `Enter` for autocomplete instead of `Tab` and use `Tab` if only you want to replace the code on the right.
  2. To remap `Tab` to `Choose Lookup Item` action from settings:
  • Find `File | Settings | Keymap | Editor Actions | Choose Lookup Item Replace` action (You can type `Choose Lookup` into search textbox to find it easier);
  • Right-click on it;
  • Select `Remove Tab`;
  • Find `File | Settings | Keymap | Editor Actions | Choose Lookup Item` action;
  • Right-click on it;
  • Select `Add Keyboard Shortcut`;
  • Click `+`;
  • Select `Set Tab` -> `Ok` -> `Keep`;

Hope it helps.

Comment actions Permalink

Thank you! All (!) members in my team changed the behavior as soon as the read your post. After each one cursed Rider for deleting code on the right side of the cursor.

Who does actually want this kind of behavior on a regular basis?

I think it could be a good idea to change the default-settings.


Please sign in to leave a comment.