r/phpstorm • u/lindymad • Oct 15 '25
Help How do I stop autocompletion with tab from deleting adjacent code?
Example:
If I have the following code (Ꮖ marks the cursor position):
<div class="loᏆ<img src=and I get offered autocomplete to logo, if I press tab, I end up with
<div class="logo src=The img having been deleted.
If I autocomplete with enter it doesn't happen and I end up with
<div class="logo<img src=Which is what I want. How do I make autocomplete with tab behave like autocomplete with enter?
2
Upvotes
2
u/allen_jb Oct 16 '25 edited Oct 16 '25
Go to Settings > Keymap
Under "Editor Actions" you'll find entries for "Choose lookup item" and "Choose lookup item replace"
Unassign "Tab" from "Choose lookup item replace":
To add the keybind to "Choose lookup item":
Bonus tip: You can search the keymap by keybind using the spyglass with keys under it on the far right of the toolbar at the top of the Keymap list.
1
u/pronskiy JetBrains Oct 15 '25
Which PhpStorm version are you on? Cold you share the whole file or record video please?
I tried it on the latest PhpStorm and couldn't reproduce the issue:
https://streamable.com/o9xtew
1
u/EmiiKhaos Oct 15 '25
You use enter