PhpStorm在每次保存时删除选项卡/空格 [英] PhpStorm removing tabs/spaces on every save
问题描述
我刚刚更新到PhpStorm 2016,我注意到每次我按 Ctrl + S 保存文件时,都会突然删除测试了这一段代码后按下要继续写的空格/制表符
I just updated to PhpStorm 2016 and I noticed that suddenly every time I press Ctrl + S to save the file it removes the spaces/tabs that I pressed to continue writing after testing this bit of code.
请帮忙,这对我来说很烦人,因为我在每行代码之后都保存了文件.
Pleas help, this is very annoying for me, since I save my file after every line of code.
这是我要保存的屏幕快照,因此在按 Ctrl + S 后,文本光标将一直移到最左侧,删除所有空格&标签.
Here is a screenshot when I'm about to save, so after hitting Ctrl + S the text cursor will move all the way to the left, deleting all spaces & tabs.
推荐答案
禁用Settings/Preferences | Editor | General | Trim trailing spaces on Save
选项(设置为无").在ATM上就像这样.
Disable Settings/Preferences | Editor | General | Trim trailing spaces on Save
option (Set to "None"). ATM it works like that.
在最新的2016.3版本中,它甚至在当前行上也删除了多余的空白字符,而在以前的2016.2版本中,您不得不再使用一个选项来获取当前行为.
In most recent 2016.3 version it strips extra whitespace characters even on current line while in previous 2016.2 you had to use one more option to get current behaviour.
https://youtrack.jetbrains.com/issue/IDEA-164345 - -观看此票(星号/投票/评论)以获取有关任何进度的通知.
https://youtrack.jetbrains.com/issue/IDEA-164345 -- watch this ticket (star/vote/comment) to get notified on any progress.
BTW-没有2016
版本-此后也应该有一位数字(例如2016.3).
BTW -- there is no 2016
version -- there should be one digit after that as well (e.g. 2016.3).
这篇关于PhpStorm在每次保存时删除选项卡/空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!