Idea xml 粘贴文本保持原有格式 setting-》Editor-》Code Style->XML 在右边的面板中,单击第二个 “Other” 的页签,勾选“Keep white spaces”,重启idea。