如何禁用IntelliJ IDE/WebStorm自动添加字符?解决JS文件自动加+问题
Fix Auto-Added "+" in JavaScript Files (IntelliJ IDEA/WebStorm)
I’ve dealt with this exact frustrating quirk before—nothing throws off your coding flow like an unexpected + popping up mid-type. Here’s how to turn it off for good:
- Open the Settings/Preferences window:
- Windows/Linux: Go to
File > Settings - macOS: Go to
IntelliJ IDEA/WebStorm > Preferences
- Windows/Linux: Go to
- In the left sidebar, navigate to
Editor > General > Smart Keys - Scroll down until you see the JavaScript section (expand it if it’s collapsed)
- Look for the option called "Insert '+' on typing '+' in an expression"—this is the setting causing the unwanted auto-added
+ - Uncheck that box, hit
ApplythenOK, and you’re all set.
If you still run into similar auto-insert issues down the line, double-check the Editor > Code Style > JavaScript settings, but this one’s almost always the fix for the random + problem.
内容的提问来源于stack exchange,提问作者Alireza Mansoori
相关产品推荐
相关产品推荐

