Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop PyCharm's completion from replacing word right of the cursor when tab completing

Tags:

pycharm

In PyCharm, tab completion replaces the word right of the cursor by default. This happens to me often when I insert some function into existing code. For example, if I want to add a call to foobar around an existing x+1 expression, I would type

enter image description here

which brings up the completion options. The result after tab-completing is

enter image description here

with x having been overwritten. Is there a way to make PyCharm's completion stop removing words right to the cursor?

like image 773
P-Gn Avatar asked Jan 22 '26 05:01

P-Gn


1 Answers

At least in my version of Pycharm, the option can be changed under Settings->Keymap in "Choose Lookup Item" and "Choose Lookup Item Replace"

enter image description here

I don't ever expect to see text replaced when doing tab completion, so I've moved "Tab" to "Choose Lookup Item."

like image 181
Tom B Avatar answered Jan 26 '26 01:01

Tom B



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!